Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_KokkosViewMPVectorUnitTest_Threads.cpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Stokhos Package
4 //
5 // Copyright 2009 NTESS and the Stokhos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
13 
15 
16 #include "Kokkos_Core.hpp"
17 
18 // Instantiate test for Threads device
19 using Kokkos::Threads;
21 
22 int main( int argc, char* argv[] ) {
23  Teuchos::GlobalMPISession mpiSession(&argc, &argv);
24 
25  // Initialize threads
26  size_t num_cores =
27  Kokkos::hwloc::get_available_numa_count() *
28  Kokkos::hwloc::get_available_cores_per_numa();
29  size_t num_hyper_threads =
30  Kokkos::hwloc::get_available_threads_per_core();
31 
32  Kokkos::InitializationSettings init_args;
33  init_args.set_num_threads(num_cores*num_hyper_threads);
34  Kokkos::initialize( init_args );
35  Kokkos::print_configuration(std::cout);
36 
37  // Run tests
39 
40  // Finish up
41  Kokkos::finalize();
42 
43  return ret;
44 }
#define VIEW_MP_VECTOR_TESTS_DEVICE(DEVICE)
static int runUnitTestsFromMain(int argc, char *argv[])
int main(int argc, char **argv)