Stokhos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp File Reference
#include "Teuchos_UnitTestHelpers.hpp"
#include "Stokhos_UnitTestHelpers.hpp"
#include "Stokhos_Sacado_Kokkos_MP_Vector.hpp"
#include "Stokhos_Ensemble_Sizes.hpp"
#include "Kokkos_CrsMatrix_MP_Vector.hpp"
#include "Kokkos_CrsMatrix_MP_Vector_Cuda.hpp"
#include "Kokkos_Core.hpp"
Include dependency graph for Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ScalarTol< Scalar >
struct  ScalarTol< float >
struct  ScalarTol< double >
struct  ReplaceDiagonalValuesKernel< MatrixType >
struct  AddDiagonalValuesKernel< MatrixType >
struct  AddDiagonalValuesAtomicKernel< MatrixType >
struct  RankTypeSelector< ViewType, OrdinalType, I >
struct  RankTypeSelector< ViewType, OrdinalType, 1 >
struct  RankTypeSelector< ViewType, OrdinalType, 0 >
struct  Kokkos_MV_Multiply_Op
struct  Stokhos_MV_Multiply_Op< Tag >

Macros

#define CRSMATRIX_MP_VECTOR_TESTS_MATRIXSCALAR(SCALAR)
#define CRSMATRIX_MP_VECTOR_TESTS_STORAGE(STORAGE)
#define CRSMATRIX_MP_VECTOR_TESTS_ORDINAL_SCALAR_DEVICE(ORDINAL, SCALAR, DEVICE)
#define CRSMATRIX_MP_VECTOR_TESTS_DEVICE(DEVICE)

Typedefs

typedef Kokkos_MV_Multiply_Op KokkosMultiply
typedef Stokhos_MV_Multiply_Op< Stokhos::DefaultMultiplyDefaultMultiply

Functions

template<typename IntType>
IntType map_fem_graph_coord (const IntType &N, const IntType &i, const IntType &j, const IntType &k)
template<typename ordinal>
ordinal generate_fem_graph (ordinal N, std::vector< std::vector< ordinal > > &graph)
template<typename scalar, typename ordinal>
scalar generate_matrix_coefficient (const ordinal nFEM, const ordinal nStoch, const ordinal iRowFEM, const ordinal iColFEM, const ordinal iStoch)
template<typename scalar, typename ordinal>
scalar generate_vector_coefficient (const ordinal nFEM, const ordinal nStoch, const ordinal iColFEM, const ordinal iStoch)
template<typename array_type, typename scalar_type>
bool compare_rank_2_views (const array_type &y, const array_type &y_exp, const scalar_type rel_tol, const scalar_type abs_tol, Teuchos::FancyOStream &out)
template<typename MatrixType>
MatrixType buildDiagonalMatrix (typename MatrixType::ordinal_type nrow, typename MatrixType::ordinal_type mp_vector_size)
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Kokkos_CrsMatrix_MP, ReplaceValues, MatrixScalar)
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Kokkos_CrsMatrix_MP, SumIntoValues, MatrixScalar)
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Kokkos_CrsMatrix_MP, SumIntoValuesAtomic, MatrixScalar)
template<typename VectorType, typename Multiply>
bool test_embedded_vector (const typename VectorType::ordinal_type nGrid, const typename VectorType::ordinal_type stoch_length, KokkosSparse::DeviceConfig dev_config, Multiply multiply_op, Teuchos::FancyOStream &out)

Variables

const unsigned VectorSize = STOKHOS_DEFAULT_ENSEMBLE_SIZE

Macro Definition Documentation

◆ CRSMATRIX_MP_VECTOR_TESTS_MATRIXSCALAR

#define CRSMATRIX_MP_VECTOR_TESTS_MATRIXSCALAR ( SCALAR)
Value:
TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( \
Kokkos_CrsMatrix_MP, ReplaceValues, SCALAR ) \
TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( \
Kokkos_CrsMatrix_MP, SumIntoValues, SCALAR ) \
TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( \
Kokkos_CrsMatrix_MP, SumIntoValuesAtomic, SCALAR )

Definition at line 609 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

◆ CRSMATRIX_MP_VECTOR_TESTS_STORAGE

#define CRSMATRIX_MP_VECTOR_TESTS_STORAGE ( STORAGE)
Value:
typedef Sacado::MP::Vector<STORAGE> MP_Vector_ ## STORAGE; \
CRSMATRIX_MP_VECTOR_TESTS_MATRIXSCALAR( MP_Vector_ ## STORAGE )

Definition at line 617 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

◆ CRSMATRIX_MP_VECTOR_TESTS_ORDINAL_SCALAR_DEVICE

#define CRSMATRIX_MP_VECTOR_TESTS_ORDINAL_SCALAR_DEVICE ( ORDINAL,
SCALAR,
DEVICE )
Value:
CRSMATRIX_MP_VECTOR_TESTS_STORAGE( SFS ) \
CRSMATRIX_MP_VECTOR_TESTS_STORAGE( DS )
Statically allocated storage class.

Definition at line 621 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

◆ CRSMATRIX_MP_VECTOR_TESTS_DEVICE

#define CRSMATRIX_MP_VECTOR_TESTS_DEVICE ( DEVICE)
Value:
#define CRSMATRIX_MP_VECTOR_TESTS_ORDINAL_SCALAR_DEVICE(ORDINAL, SCALAR, DEVICE)

Definition at line 627 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

Typedef Documentation

◆ KokkosMultiply

◆ DefaultMultiply

Function Documentation

◆ map_fem_graph_coord()

template<typename IntType>
IntType map_fem_graph_coord ( const IntType & N,
const IntType & i,
const IntType & j,
const IntType & k )
inline

Definition at line 56 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

◆ generate_fem_graph()

template<typename ordinal>
ordinal generate_fem_graph ( ordinal N,
std::vector< std::vector< ordinal > > & graph )
inline

Definition at line 66 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

◆ generate_matrix_coefficient()

template<typename scalar, typename ordinal>
scalar generate_matrix_coefficient ( const ordinal nFEM,
const ordinal nStoch,
const ordinal iRowFEM,
const ordinal iColFEM,
const ordinal iStoch )
inline

Definition at line 100 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

◆ generate_vector_coefficient()

template<typename scalar, typename ordinal>
scalar generate_vector_coefficient ( const ordinal nFEM,
const ordinal nStoch,
const ordinal iColFEM,
const ordinal iStoch )
inline

Definition at line 117 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

◆ compare_rank_2_views()

template<typename array_type, typename scalar_type>
bool compare_rank_2_views ( const array_type & y,
const array_type & y_exp,
const scalar_type rel_tol,
const scalar_type abs_tol,
Teuchos::FancyOStream & out )

Definition at line 135 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

◆ buildDiagonalMatrix()

template<typename MatrixType>
MatrixType buildDiagonalMatrix ( typename MatrixType::ordinal_type nrow,
typename MatrixType::ordinal_type mp_vector_size )

Definition at line 174 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [1/3]

TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Kokkos_CrsMatrix_MP ,
ReplaceValues ,
MatrixScalar  )

Definition at line 350 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [2/3]

TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Kokkos_CrsMatrix_MP ,
SumIntoValues ,
MatrixScalar  )

Definition at line 370 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [3/3]

TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Kokkos_CrsMatrix_MP ,
SumIntoValuesAtomic ,
MatrixScalar  )

Definition at line 390 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

◆ test_embedded_vector()

template<typename VectorType, typename Multiply>
bool test_embedded_vector ( const typename VectorType::ordinal_type nGrid,
const typename VectorType::ordinal_type stoch_length,
KokkosSparse::DeviceConfig dev_config,
Multiply multiply_op,
Teuchos::FancyOStream & out )

Definition at line 440 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.

Variable Documentation

◆ VectorSize

const unsigned VectorSize = STOKHOS_DEFAULT_ENSEMBLE_SIZE

Definition at line 348 of file Stokhos_KokkosCrsMatrixMPVectorUnitTest.hpp.