Stokhos Package Browser (Single Doxygen Collection)
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
test
UnitTest
Stokhos_KokkosArrayKernelsUnitTestDecl.hpp
Go to the documentation of this file.
1
// @HEADER
2
// ***********************************************************************
3
//
4
// Stokhos Package
5
// Copyright (2009) Sandia Corporation
6
//
7
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8
// license for use of this work by or on behalf of the U.S. Government.
9
//
10
// Redistribution and use in source and binary forms, with or without
11
// modification, are permitted provided that the following conditions are
12
// met:
13
//
14
// 1. Redistributions of source code must retain the above copyright
15
// notice, this list of conditions and the following disclaimer.
16
//
17
// 2. Redistributions in binary form must reproduce the above copyright
18
// notice, this list of conditions and the following disclaimer in the
19
// documentation and/or other materials provided with the distribution.
20
//
21
// 3. Neither the name of the Corporation nor the names of the
22
// contributors may be used to endorse or promote products derived from
23
// this software without specific prior written permission.
24
//
25
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
//
37
// Questions? Contact Eric T. Phipps (etphipp@sandia.gov).
38
//
39
// ***********************************************************************
40
// @HEADER
41
42
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, CrsMatrixFree,
Scalar
, Device ) {
43
typedef
Stokhos::DefaultMultiply
SparseMatOps;
44
success = test_crs_matrix_free<Scalar,Device,SparseMatOps>(
setup
, out);
45
}
46
47
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, CrsMatrixFreeView,
Scalar
, Device ) {
48
typedef
Stokhos::DefaultMultiply
SparseMatOps;
49
success = test_crs_matrix_free_view<Scalar,Device,SparseMatOps>(
setup
, out);
50
}
51
52
#ifdef HAVE_STOKHOS_KOKKOSLINALG
53
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, CrsMatrixFreeKokkos,
Scalar
, Device ) {
54
success = test_crs_matrix_free_kokkos<Scalar,Device>(
setup
, out);
55
}
56
#else
57
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, CrsMatrixFreeKokkos,
Scalar
, Device ) {}
58
#endif
59
60
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, CrsMatrixFreeSingleCol,
Scalar
, Device ) {
61
typedef
Stokhos::SingleColumnMultivectorMultiply
SparseMatOps;
62
success = test_crs_matrix_free<Scalar,Device,SparseMatOps>(
setup
, out);
63
}
64
65
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, CrsDenseBlock,
Scalar
, Device) {
66
success = test_crs_dense_block<Scalar,Device>(
setup
, out);
67
}
68
69
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, CrsFlatCommuted,
Scalar
, Device ) {
70
success = test_crs_flat_commuted<Scalar,Device>(
setup
, out);
71
}
72
73
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, CrsFlatOriginal,
Scalar
, Device ) {
74
success = test_crs_flat_original<Scalar,Device>(
setup
, out);
75
}
76
77
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, CrsProductTensor,
Scalar
, Device ) {
78
typedef
Stokhos::CrsProductTensor<Scalar,Device>
Tensor;
79
success = test_crs_product_tensor<Scalar,Tensor,Device>(
setup
, out);
80
}
81
82
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, TiledCrsProductTensor,
Scalar
, Device ) {
83
typedef
Stokhos::TiledCrsProductTensor<Scalar,Device>
Tensor;
84
Teuchos::ParameterList params;
85
params.set(
"Tile Size"
, 10);
86
params.set(
"Max Tiles"
, 10000);
87
success = test_crs_product_tensor<Scalar,Tensor,Device>(
setup
, out, params);
88
}
89
90
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, SimpleTiledCrsProductTensor,
Scalar
, Device ){
91
typedef
Stokhos::SimpleTiledCrsProductTensor<Scalar,Device>
Tensor;
92
Teuchos::ParameterList params;
93
params.set(
"Tile Size"
, 10);
94
success = test_crs_product_tensor<Scalar,Tensor,Device>(
setup
, out, params);
95
}
96
97
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, CooProductTensorPacked,
Scalar
, Device ) {
98
typedef
Stokhos::CooProductTensor<Scalar,Device,true>
Tensor;
99
success = test_crs_product_tensor<Scalar,Tensor,Device>(
setup
, out);
100
}
101
102
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, CooProductTensorUnpacked,
Scalar
, Device ) {
103
typedef
Stokhos::CooProductTensor<Scalar,Device,false>
Tensor;
104
success = test_crs_product_tensor<Scalar,Tensor,Device>(
setup
, out);
105
}
106
107
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, FlatSparse3Tensor,
Scalar
, Device ) {
108
typedef
Stokhos::FlatSparse3Tensor<Scalar,Device>
Tensor;
109
success = test_crs_product_tensor<Scalar,Tensor,Device>(
setup
, out);
110
}
111
112
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, FlatSparse3Tensor_kji,
Scalar
, Device ) {
113
typedef
Stokhos::FlatSparse3Tensor_kji<Scalar,Device>
Tensor;
114
success = test_crs_product_tensor<Scalar,Tensor,Device>(
setup
, out);
115
}
116
117
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, LinearTensorSymmetric,
Scalar
, Device ) {
118
const
bool
symmetric =
true
;
119
UnitTestSetup<Device>
s;
120
s.setup(1, 10);
121
success = test_linear_tensor<Scalar,Device,4>(s, out, symmetric);
122
}
123
124
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, LinearTensorAsymmetric,
Scalar
, Device ) {
125
const
bool
symmetric =
false
;
126
UnitTestSetup<Device>
s;
127
s.setup(1, 10);
128
success = test_linear_tensor<Scalar,Device,4>(s, out, symmetric);
129
}
130
131
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
( Kokkos_SG_SpMv, LexoBlockTensor,
Scalar
, Device ) {
132
success = test_lexo_block_tensor<Scalar,Device>(
setup
, out);
133
}
134
135
// ETP 6/23/14: CooProductTensor tests are failing with Intel compiler
136
// (optimized with AVX). Probably alignment issue
137
138
// ETP 5/12/16: LinearProductTensor tests are failing with Intel compiler too.
139
140
#define UNIT_TEST_GROUP_SCALAR_DEVICE( SCALAR, DEVICE ) \
141
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsMatrixFree, SCALAR, DEVICE ) \
142
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsMatrixFreeView, SCALAR, DEVICE ) \
143
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsMatrixFreeKokkos, SCALAR, DEVICE ) \
144
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsMatrixFreeSingleCol, SCALAR, DEVICE ) \
145
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsDenseBlock, SCALAR, DEVICE ) \
146
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsFlatCommuted, SCALAR, DEVICE ) \
147
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsFlatOriginal, SCALAR, DEVICE ) \
148
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CrsProductTensor, SCALAR, DEVICE ) \
149
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, TiledCrsProductTensor, SCALAR, DEVICE ) \
150
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, SimpleTiledCrsProductTensor, SCALAR, DEVICE ) \
151
/*TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CooProductTensorPacked, SCALAR, DEVICE )*/
\
152
/*TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, CooProductTensorUnpacked, SCALAR, DEVICE )*/
\
153
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, FlatSparse3Tensor, SCALAR, DEVICE ) \
154
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, FlatSparse3Tensor_kji, SCALAR, DEVICE ) \
155
/*TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, LinearTensorSymmetric, SCALAR, DEVICE )*/
\
156
/*TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, LinearTensorAsymmetric, SCALAR, DEVICE )*/
\
157
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT( Kokkos_SG_SpMv, LexoBlockTensor, SCALAR, DEVICE )
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL
TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL(Kokkos_SG_SpMv, CrsMatrixFree, Scalar, Device)
Definition
Stokhos_KokkosArrayKernelsUnitTestDecl.hpp:42
setup
UnitTestSetup< Kokkos::Cuda > setup
Definition
Stokhos_KokkosArrayKernelsUnitTest_Cuda.cpp:53
Stokhos::CooProductTensor
Sparse product tensor using 'COO'-like storage format.
Definition
Stokhos_CooProductTensor.hpp:68
Stokhos::CrsProductTensor
Sparse product tensor with replicated entries to provide subsets with a given coordinate.
Definition
Stokhos_CrsProductTensor.hpp:78
Stokhos::DefaultMultiply
Definition
Stokhos_Multiply.hpp:78
Stokhos::FlatSparse3Tensor_kji
Sparse product tensor with replicated entries to provide subsets with a given coordinate.
Definition
Stokhos_FlatSparse3Tensor_kji.hpp:61
Stokhos::FlatSparse3Tensor
Sparse product tensor with replicated entries to provide subsets with a given coordinate.
Definition
Stokhos_FlatSparse3Tensor.hpp:62
Stokhos::SimpleTiledCrsProductTensor
Definition
Stokhos_SimpleTiledCrsProductTensor.hpp:61
Stokhos::SingleColumnMultivectorMultiply
Definition
Stokhos_CrsMatrix.hpp:614
Stokhos::TiledCrsProductTensor
Definition
Stokhos_TiledCrsProductTensor.hpp:61
Scalar
pce_type Scalar
Definition
linear2d_diffusion_scalar_types.hpp:49
UnitTestSetup
Definition
Stokhos_SacadoMPVectorCommTests.cpp:71
Generated by
1.17.0