Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_KokkosArrayKernelsUnitTestDecl.hpp
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 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, CrsMatrixFree, Scalar, Device ) {
11  typedef Stokhos::DefaultMultiply SparseMatOps;
12  success = test_crs_matrix_free<Scalar,Device,SparseMatOps>(setup, out);
13 }
14 
15 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, CrsMatrixFreeView, Scalar, Device ) {
16  typedef Stokhos::DefaultMultiply SparseMatOps;
17  success = test_crs_matrix_free_view<Scalar,Device,SparseMatOps>(setup, out);
18 }
19 
20 #ifdef HAVE_STOKHOS_KOKKOSLINALG
21 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, CrsMatrixFreeKokkos, Scalar, Device ) {
22  success = test_crs_matrix_free_kokkos<Scalar,Device>(setup, out);
23 }
24 #else
25 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, CrsMatrixFreeKokkos, Scalar, Device ) {}
26 #endif
27 
28 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, CrsMatrixFreeSingleCol, Scalar, Device ) {
29  typedef Stokhos::SingleColumnMultivectorMultiply SparseMatOps;
30  success = test_crs_matrix_free<Scalar,Device,SparseMatOps>(setup, out);
31 }
32 
33 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, CrsDenseBlock, Scalar, Device) {
34  success = test_crs_dense_block<Scalar,Device>(setup, out);
35 }
36 
37 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, CrsFlatCommuted, Scalar, Device ) {
38  success = test_crs_flat_commuted<Scalar,Device>(setup, out);
39 }
40 
41 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, CrsFlatOriginal, Scalar, Device ) {
42  success = test_crs_flat_original<Scalar,Device>(setup, out);
43 }
44 
45 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, CrsProductTensor, Scalar, Device ) {
47  success = test_crs_product_tensor<Scalar,Tensor,Device>(setup, out);
48 }
49 
50 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, TiledCrsProductTensor, Scalar, Device ) {
53  params.set("Tile Size", 10);
54  params.set("Max Tiles", 10000);
55  success = test_crs_product_tensor<Scalar,Tensor,Device>(setup, out, params);
56 }
57 
58 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, SimpleTiledCrsProductTensor, Scalar, Device ){
61  params.set("Tile Size", 10);
62  success = test_crs_product_tensor<Scalar,Tensor,Device>(setup, out, params);
63 }
64 
65 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, CooProductTensorPacked, Scalar, Device ) {
67  success = test_crs_product_tensor<Scalar,Tensor,Device>(setup, out);
68 }
69 
70 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, CooProductTensorUnpacked, Scalar, Device ) {
72  success = test_crs_product_tensor<Scalar,Tensor,Device>(setup, out);
73 }
74 
75 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, FlatSparse3Tensor, Scalar, Device ) {
77  success = test_crs_product_tensor<Scalar,Tensor,Device>(setup, out);
78 }
79 
80 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, FlatSparse3Tensor_kji, Scalar, Device ) {
82  success = test_crs_product_tensor<Scalar,Tensor,Device>(setup, out);
83 }
84 
85 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, LinearTensorSymmetric, Scalar, Device ) {
86  const bool symmetric = true;
88  s.setup(1, 10);
89  success = test_linear_tensor<Scalar,Device,4>(s, out, symmetric);
90 }
91 
92 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, LinearTensorAsymmetric, Scalar, Device ) {
93  const bool symmetric = false;
95  s.setup(1, 10);
96  success = test_linear_tensor<Scalar,Device,4>(s, out, symmetric);
97 }
98 
99 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL( Kokkos_SG_SpMv, LexoBlockTensor, Scalar, Device ) {
100  success = test_lexo_block_tensor<Scalar,Device>(setup, out);
101 }
102 
103 // ETP 6/23/14: CooProductTensor tests are failing with Intel compiler
104 // (optimized with AVX). Probably alignment issue
105 
106 // ETP 5/12/16: LinearProductTensor tests are failing with Intel compiler too.
107 
108 #define UNIT_TEST_GROUP_SCALAR_DEVICE( SCALAR, DEVICE ) \
109  TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsMatrixFree, SCALAR, DEVICE ) \
110  TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsMatrixFreeView, SCALAR, DEVICE ) \
111  TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsMatrixFreeKokkos, SCALAR, DEVICE ) \
112  TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsMatrixFreeSingleCol, SCALAR, DEVICE ) \
113  TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsDenseBlock, SCALAR, DEVICE ) \
114  TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsFlatCommuted, SCALAR, DEVICE ) \
115  TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsFlatOriginal, SCALAR, DEVICE ) \
116  TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsProductTensor, SCALAR, DEVICE ) \
117  TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, TiledCrsProductTensor, SCALAR, DEVICE ) \
118  TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, SimpleTiledCrsProductTensor, SCALAR, DEVICE ) \
119  /*TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CooProductTensorPacked, SCALAR, DEVICE )*/ \
120  /*TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CooProductTensorUnpacked, SCALAR, DEVICE )*/ \
121  TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, FlatSparse3Tensor, SCALAR, DEVICE ) \
122  TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, FlatSparse3Tensor_kji, SCALAR, DEVICE ) \
123  /*TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, LinearTensorSymmetric, SCALAR, DEVICE )*/ \
124  /*TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, LinearTensorAsymmetric, SCALAR, DEVICE )*/ \
125  TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, LexoBlockTensor, SCALAR, DEVICE )
ParameterList & set(std::string const &name, T &&value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Sparse product tensor with replicated entries to provide subsets with a given coordinate.
Sparse product tensor with replicated entries to provide subsets with a given coordinate.
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL(Kokkos_SG_SpMv, CrsProductTensorCijk, Scalar, Device)
Sparse product tensor with replicated entries to provide subsets with a given coordinate.
Sparse product tensor using &#39;COO&#39;-like storage format.