Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_KokkosArrayKernelsUnitTest_OpenMP.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 
10 // Utilities
14 
15 // Device
16 #include "Kokkos_Core.hpp"
17 
18 // Kernels
19 #include "Stokhos_ConfigDefs.h"
21 #ifdef HAVE_STOKHOS_MKL
23 #endif
24 
25 // Tests
27 
28 using namespace KokkosKernelsUnitTest;
29 
31 
32 // Test declarations
35 
36 // Tests using OpenMP device
37 using Kokkos::OpenMP;
38 UNIT_TEST_GROUP_SCALAR_DEVICE( double, OpenMP )
39 UNIT_TEST_GROUP_SCALAR_HOST_DEVICE( double, OpenMP )
40 
41 #ifdef HAVE_STOKHOS_MKL
42 TEUCHOS_UNIT_TEST( Kokkos_SG_SpMv, double_OpenMP_CrsMatrixFree_MKL ) {
43  typedef double Scalar;
44  typedef Kokkos::OpenMP Device;
45  typedef Stokhos::MKLMultiply SparseMatOps;
46  success = test_crs_matrix_free<Scalar,Device,SparseMatOps>(
47  setup, out);
48 }
49 #endif
50 
51 int main( int argc, char* argv[] ) {
52  // Setup the MPI session
53  Teuchos::GlobalMPISession mpiSession(&argc, &argv);
54 
55  // Initialize Kokkos
56  Kokkos::initialize(argc, argv);
57 
58  // Setup (has to happen after initialization)
59  setup.setup();
60 
61  // Run tests
63 
64  // Finish up
65  Kokkos::finalize();
66 
67  return ret;
68 }
static int runUnitTestsFromMain(int argc, char *argv[])
#define UNIT_TEST_GROUP_SCALAR_HOST_DEVICE(SCALAR, DEVICE)
int main(int argc, char **argv)
#define UNIT_TEST_GROUP_SCALAR_DEVICE(SCALAR, DEVICE)
TEUCHOS_UNIT_TEST(tAdaptivityManager, test_interface)