Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Typedefs | Functions
Stokhos_SacadoMPVectorUnitTest.cpp File Reference
#include "Teuchos_UnitTestHarness.hpp"
#include "Teuchos_TestingHelpers.hpp"
#include "Teuchos_UnitTestRepository.hpp"
#include "Teuchos_GlobalMPISession.hpp"
#include "Stokhos_Sacado_Kokkos_MP_Vector.hpp"
#include "Stokhos_UnitTestHelpers.hpp"
#include <Kokkos_Core.hpp>
Include dependency graph for Stokhos_SacadoMPVectorUnitTest.cpp:

Go to the source code of this file.

Classes

struct  UnitTestSetup< VecType, FadType >
 

Namespaces

 DynamicVecTest
 
 DynamicStridedVecTest
 
 StaticVecTest
 
 StaticFixedVecTest
 

Macros

#define UNARY_UNIT_TEST(VEC, OP, OPNAME)
 
#define BINARY_UNIT_TEST(VEC, OP, OPNAME)
 
#define BINARYFUNC_UNIT_TEST(VEC, OP, SOP, OPNAME)
 
#define OPASSIGN_UNIT_TEST(VEC, OP, OPNAME)
 
#define SAXPY_UNIT_TEST(VEC)
 
#define TERNARY_UNIT_TEST(VEC)
 
#define VECTOR_UNIT_TESTS(VEC)
 

Typedefs

typedef UnitTestSetup< vec_type > DynamicVecTest::UTS
 
typedef UnitTestSetup< vec_type > DynamicStridedVecTest::UTS
 
typedef UnitTestSetup< vec_type > StaticVecTest::UTS
 
typedef UnitTestSetup< vec_type > StaticFixedVecTest::UTS
 

Functions

int main (int argc, char *argv[])
 

Macro Definition Documentation

#define UNARY_UNIT_TEST (   VEC,
  OP,
  OPNAME 
)
Value:
UTS::vec_type u = OP(setup.x); \
UTS::vec_type v(setup.sz, 0.0); \
for (int i=0; i<setup.sz; i++) \
v.fastAccessCoeff(i) = OP(setup.x.fastAccessCoeff(i)); \
success = compareVecs(u, "u",v, "v", \
setup.rtol, setup.atol, out); \
} \
TEUCHOS_UNIT_TEST( VEC, OPNAME##_const) { \
UTS::vec_type u = OP(setup.cx); \
UTS::vec_type v(1, 0.0); \
for (int i=0; i<v.size(); i++) \
v.fastAccessCoeff(i) = OP(setup.cx.fastAccessCoeff(0)); \
success = compareVecs(u, "u",v, "v", \
setup.rtol, setup.atol, out); \
} \
TEUCHOS_UNIT_TEST( VEC, OPNAME##_resize) { \
u = OP(setup.x); \
UTS::vec_type v(setup.sz, 0.0); \
for (int i=0; i<setup.sz; i++) \
v.fastAccessCoeff(i) = OP(setup.x.fastAccessCoeff(i)); \
success = compareVecs(u, "u",v, "v", \
setup.rtol, setup.atol, out); \
}
#define OPNAME
bool compareVecs(const VectorType1 &a1, const std::string &a1_name, const VectorType2 &a2, const std::string &a2_name, const ValueType &rel_tol, const ValueType &abs_tol, Teuchos::FancyOStream &out)
UnitTestSetup< vec_type > UTS
Sacado::MP::Vector< storage_type > vec_type
TEUCHOS_UNIT_TEST(tAdaptivityManager, test_interface)

Definition at line 91 of file Stokhos_SacadoMPVectorUnitTest.cpp.

#define BINARY_UNIT_TEST (   VEC,
  OP,
  OPNAME 
)

Definition at line 121 of file Stokhos_SacadoMPVectorUnitTest.cpp.

#define BINARYFUNC_UNIT_TEST (   VEC,
  OP,
  SOP,
  OPNAME 
)

Definition at line 215 of file Stokhos_SacadoMPVectorUnitTest.cpp.

#define OPASSIGN_UNIT_TEST (   VEC,
  OP,
  OPNAME 
)

Definition at line 310 of file Stokhos_SacadoMPVectorUnitTest.cpp.

#define SAXPY_UNIT_TEST (   VEC)

Definition at line 354 of file Stokhos_SacadoMPVectorUnitTest.cpp.

#define TERNARY_UNIT_TEST (   VEC)
Value:
TEUCHOS_UNIT_TEST( VEC, ternay) { \
UTS::vec_type u = std::sin(setup.x); \
UTS::vec_type v = -std::sin(setup.x); \
u = u >= 0 ? -u : u; \
success = compareVecs(u, "u", v, "v", \
setup.rtol, setup.atol, out); \
}
bool compareVecs(const VectorType1 &a1, const std::string &a1_name, const VectorType2 &a2, const std::string &a2_name, const ValueType &rel_tol, const ValueType &abs_tol, Teuchos::FancyOStream &out)
UnitTestSetup< vec_type > UTS
KOKKOS_INLINE_FUNCTION PCE< Storage > sin(const PCE< Storage > &a)
Sacado::MP::Vector< storage_type > vec_type
TEUCHOS_UNIT_TEST(tAdaptivityManager, test_interface)

Definition at line 400 of file Stokhos_SacadoMPVectorUnitTest.cpp.

#define VECTOR_UNIT_TESTS (   VEC)

Definition at line 410 of file Stokhos_SacadoMPVectorUnitTest.cpp.

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 509 of file Stokhos_SacadoMPVectorUnitTest.cpp.