LogicalSparseUnitTests.hpp File Reference

#include "Sacado.hpp"
#include "Sacado_Random.hpp"
#include <cppunit/extensions/HelperMacros.h>
Include dependency graph for LogicalSparseUnitTests.hpp:

Go to the source code of this file.

Classes

class  LogicalSparseOpsUnitTest

Defines

#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

Define 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);      \
  }

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);     \
  }

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);    \
  }

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);        \
  }

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.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:19:40 2011 for Sacado Package Browser (Single Doxygen Collection) by  doxygen 1.6.3