Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fad_KokkosTests_NoViewSpec_Threads.cpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Sacado Package
4 //
5 // Copyright 2006 NTESS and the Sacado contributors.
6 // SPDX-License-Identifier: LGPL-2.1-or-later
7 // *****************************************************************************
8 // @HEADER
9 
13 
14 // Disable view specializations
15 #define SACADO_DISABLE_FAD_VIEW_SPEC
16 
17 #define SACADO_TEST_DFAD 1
18 #include "Fad_KokkosTests.hpp"
19 
20 // Instantiate tests for Threads device
21 using Kokkos::Threads;
22 VIEW_FAD_TESTS_D( Threads )
23 
24 int main( int argc, char* argv[] ) {
25  Teuchos::GlobalMPISession mpiSession(&argc, &argv);
26 
27  // Initialize threads
28  size_t num_cores =
29  Kokkos::hwloc::get_available_numa_count() *
30  Kokkos::hwloc::get_available_cores_per_numa();
31  size_t num_hyper_threads =
32  Kokkos::hwloc::get_available_threads_per_core();
33 
34  Kokkos::InitializationSettings init_args;
35  init_args.set_num_threads(num_cores*num_hyper_threads);
36  Kokkos::initialize( init_args );
37  Kokkos::print_configuration(std::cout);
38 
40 
41  // Finalize threads
42  Kokkos::finalize();
43 
44  return res;
45 }
static int runUnitTestsFromMain(int argc, char *argv[])
int main()
Definition: ad_example.cpp:171
#define VIEW_FAD_TESTS_D(D)