#include "Sacado_No_Kokkos.hpp"
#include "Sacado_Random.hpp"
#include "Fad/fad.h"
#include <cppunit/extensions/HelperMacros.h>
Go to the source code of this file.
#define COMPARE_VALUES |
( |
|
a, |
|
|
|
b |
|
) |
| CPPUNIT_ASSERT( std::abs(a-b) < this->tol_a + this->tol_r*std::abs(a) ); |
#define COMPARE_FADS |
( |
|
a, |
|
|
|
b |
|
) |
| |
Value:CPPUNIT_ASSERT(
a.size() == b.size()); \
CPPUNIT_ASSERT(
a.hasFastAccess() == b.hasFastAccess());
\
for (
int i=0; i<
a.size(); i++) {
\
} \
;
#define COMPARE_VALUES(a, b)
Definition at line 48 of file FadUnitTests.hpp.
#define BINARY_OP_TEST |
( |
|
TESTNAME, |
|
|
|
OP |
|
) |
| |
Value:void TESTNAME () { \
c_dfad = a_dfad OP b_dfad; \
c_fad = a_fad OP b_fad;
\
\
double
val = urand.number(); \
c_dfad = a_dfad OP
val; \
\
c_dfad = val OP b_dfad; \
}
#define COMPARE_FADS(a, b)
Definition at line 58 of file FadUnitTests.hpp.
#define RELOP_TEST |
( |
|
TESTNAME, |
|
|
|
OP |
|
) |
| |
Value:void TESTNAME () { \
bool r1 = a_dfad OP b_dfad; \
bool r2 = a_fad OP b_fad; \
CPPUNIT_ASSERT(r1 == r2); \
\
double
val = urand.number(); \
CPPUNIT_ASSERT(r1 == r2); \
\
r1 = val OP b_dfad; \
r2 = val OP b_fad; \
CPPUNIT_ASSERT(r1 == r2); \
}
Definition at line 74 of file FadUnitTests.hpp.
#define BINARY_FUNC_TEST |
( |
|
TESTNAME, |
|
|
|
FUNC |
|
) |
| |
Value:void TESTNAME () { \
c_dfad = FUNC (a_dfad,b_dfad); \
c_fad = FUNC (a_fad,b_fad);
\
\
double
val = urand.number(); \
c_dfad = FUNC (a_dfad,val); \
c_fad = FUNC (a_fad,val);
\
\
c_dfad = FUNC (val,b_dfad); \
c_fad = FUNC (val,b_fad);
\
}
#define COMPARE_FADS(a, b)
Definition at line 90 of file FadUnitTests.hpp.
#define UNARY_OP_TEST |
( |
|
TESTNAME, |
|
|
|
OP |
|
) |
| |
Value:void TESTNAME () { \
c_dfad = OP a_dfad; \
}
#define COMPARE_FADS(a, b)
Definition at line 106 of file FadUnitTests.hpp.
#define UNARY_FUNC_TEST |
( |
|
TESTNAME, |
|
|
|
FUNC |
|
) |
| |
Value:void TESTNAME () { \
c_dfad = FUNC (a_dfad); \
}
#define COMPARE_FADS(a, b)
Definition at line 113 of file FadUnitTests.hpp.
#define UNARY_ASSIGNOP_TEST |
( |
|
TESTNAME, |
|
|
|
OP |
|
) |
| |
Value:void TESTNAME () { \
c_dfad OP a_dfad; \
\
double
val = urand.number(); \
}
#define COMPARE_FADS(a, b)
Definition at line 120 of file FadUnitTests.hpp.