Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | Typedefs
LogicalSparseUnitTests.hpp File Reference
#include "Sacado_No_Kokkos.hpp"
#include "Sacado_Random.hpp"
#include <cppunit/extensions/HelperMacros.h>
Include dependency graph for LogicalSparseUnitTests.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  LogicalSparseOpsUnitTest
 

Macros

#define BINARY_OP_TEST(TESTNAME, OP)
 
#define RELOP_TEST(TESTNAME, OP)
 
#define BINARY_FUNC_TEST(TESTNAME, FUNC)
 
#define UNARY_OP_TEST(TESTNAME, OP)
 
#define UNARY_FUNC_TEST(TESTNAME, FUNC)
 
#define UNARY_ASSIGNOP_TEST(TESTNAME, OP)
 

Typedefs

typedef Sacado::Fad::DFad< double > DFadType
 
typedef
Sacado::LFad::LogicalSparse
< double, bool > 
LSType
 

Macro Definition Documentation

#define BINARY_OP_TEST (   TESTNAME,
  OP 
)
Value:
void TESTNAME () { \
c_dfad = a_dfad OP b_dfad; \
c_ls = a_ls OP b_ls; \
compareFads(c_dfad, c_ls); \
\
double val = urand.number(); \
c_dfad = a_dfad OP val; \
c_ls = a_ls OP val; \
compareFads(c_dfad, c_ls); \
\
c_dfad = val OP b_dfad; \
c_ls = val OP b_ls; \
compareFads(c_dfad, c_ls); \
}
expr val()

Definition at line 45 of file LogicalSparseUnitTests.hpp.

#define RELOP_TEST (   TESTNAME,
  OP 
)
Value:
void TESTNAME () { \
bool r1 = a_dfad OP b_dfad; \
bool r2 = a_ls OP b_ls; \
CPPUNIT_ASSERT(r1 == r2); \
\
double val = urand.number(); \
r1 = a_dfad OP val; \
r2 = a_ls OP val; \
CPPUNIT_ASSERT(r1 == r2); \
\
r1 = val OP b_dfad; \
r2 = val OP b_ls; \
CPPUNIT_ASSERT(r1 == r2); \
}
expr val()

Definition at line 61 of file LogicalSparseUnitTests.hpp.

#define BINARY_FUNC_TEST (   TESTNAME,
  FUNC 
)
Value:
void TESTNAME () { \
c_dfad = FUNC (a_dfad,b_dfad); \
c_ls = FUNC (a_ls,b_ls); \
compareFads(c_dfad, c_ls); \
\
double val = urand.number(); \
c_dfad = FUNC (a_dfad,val); \
c_ls = FUNC (a_ls,val); \
compareFads(c_dfad, c_ls); \
\
c_dfad = FUNC (val,b_dfad); \
c_ls = FUNC (val,b_ls); \
compareFads(c_dfad, c_ls); \
}
expr val()

Definition at line 77 of file LogicalSparseUnitTests.hpp.

#define UNARY_OP_TEST (   TESTNAME,
  OP 
)
Value:
void TESTNAME () { \
c_dfad = OP a_dfad; \
c_ls = OP a_ls; \
compareFads(c_dfad, c_ls); \
}

Definition at line 93 of file LogicalSparseUnitTests.hpp.

#define UNARY_FUNC_TEST (   TESTNAME,
  FUNC 
)
Value:
void TESTNAME () { \
c_dfad = FUNC (a_dfad); \
c_ls = FUNC (a_ls); \
compareFads(c_dfad, c_ls); \
}

Definition at line 100 of file LogicalSparseUnitTests.hpp.

#define UNARY_ASSIGNOP_TEST (   TESTNAME,
  OP 
)
Value:
void TESTNAME () { \
c_dfad OP a_dfad; \
c_ls OP a_ls; \
compareFads(c_dfad, c_ls); \
\
double val = urand.number(); \
c_dfad OP val; \
c_ls OP val; \
compareFads(c_dfad, c_ls); \
}
expr val()

Definition at line 107 of file LogicalSparseUnitTests.hpp.

Typedef Documentation

typedef Sacado::Fad::DFad<double> DFadType

Definition at line 39 of file LogicalSparseUnitTests.hpp.

typedef Sacado::LFad::LogicalSparse<double,bool> LSType

Definition at line 40 of file LogicalSparseUnitTests.hpp.