44#include "Kokkos_Core.hpp"
46#ifdef KOKKOS_ENABLE_THREADS
49#ifdef KOKKOS_ENABLE_OPENMP
57template<
typename Scalar,
typename Device>
60 static void run(
bool test_flat,
bool test_orig,
bool test_deg,
bool test_lin,
61 bool test_block,
bool symmetric,
bool mkl) {
71 3 , 1 , 9 , nGrid , nIter , test_block , symmetric );
73 5 , 1 , 5 , nGrid , nIter , test_block , symmetric );
89 3 , 1 , 9 , nGrid , nIter , test_block , symmetric );
92 3 , 1 , 12 , nGrid , nIter , test_block , symmetric );
95 5 , 1, 6 , nGrid , nIter , test_block , symmetric );
107 3 , 1 , 12 , nGrid , nIter , test_block , symmetric );
119 31 , 255 , 32 , nGrid , nIter , test_block , symmetric );
129template <
typename Scalar,
typename Device>
130int mainHost(
bool test_flat,
bool test_orig,
bool test_deg,
bool test_lin,
131 bool test_block,
bool symmetric,
bool mkl)
133 const size_t team_count =
134 Kokkos::hwloc::get_available_numa_count() *
135 Kokkos::hwloc::get_available_cores_per_numa();
136 const size_t threads_per_team =
137 Kokkos::hwloc::get_available_threads_per_core();
139 Kokkos::InitializationSettings init_args;
140 init_args.set_num_threads(team_count*threads_per_team);
141 Kokkos::initialize( init_args );
143 std::string name =
"Host";
144#ifdef KOKKOS_ENABLE_THREADS
145 Kokkos::Threads().print_configuration( std::cout );
146 if (std::is_same<Device,Kokkos::Threads>::value)
149#ifdef KOKKOS_ENABLE_OPENMP
150 Kokkos::OpenMP().print_configuration( std::cout );
151 if (std::is_same<Device,Kokkos::OpenMP>::value)
154 std::cout << std::endl <<
"\"" << name <<
" Performance with "
155 << team_count * threads_per_team <<
" threads\"" << std::endl ;
158 test_flat, test_orig, test_deg, test_lin, test_block, symmetric, mkl);
165#ifdef KOKKOS_ENABLE_SERIAL
170#ifdef KOKKOS_ENABLE_THREADS
175#ifdef KOKKOS_ENABLE_OPENMP
int mainHost(bool test_flat, bool test_orig, bool test_deg, bool test_lin, bool test_block, bool symmetric, bool mkl)
void performance_test_driver_linear(const int minvar, const int maxvar, const int varinc, const int nGrid, const int nIter, const bool test_block, const bool symmetric)
void performance_test_driver_poly_deg(const int nvar, const int minp, const int maxp, const int nGrid, const int nIter, const bool test_block, const bool symmetric)
void performance_test_driver_poly(const int pdeg, const int minvar, const int maxvar, const int nGrid, const int nIter, const bool test_block, const bool symmetric)
void performance_test_driver_all(const int pdeg, const int minvar, const int maxvar, const int nGrid, const int nIter, const bool test_block, const bool symmetric)