- 3.0.2 core module.
JacobianCGTest.h File Reference

Go to the source code of this file.

Typedefs

typedef DerivativesCppadJIT< inDim, outDimderivativesCppadJIT
 the Jacobian codegen class More...
 
typedef DerivativesCppadCG< inDim, outDimderivativesCppadCG
 
typedef DerivativesCppad< inDim, outDimderivativesCppad
 

Functions

template<typename SCALAR >
Eigen::Matrix< SCALAR, outDim, 1 > testFunction (const Eigen::Matrix< SCALAR, inDim, 1 > &x)
 
template<typename SCALAR >
Eigen::Matrix< SCALAR, outDim, inDimjacobianCheck (const Eigen::Matrix< SCALAR, inDim, 1 > &x)
 
template<typename SCALAR >
Eigen::Matrix< SCALAR, inDim, inDimhessianCheck (const Eigen::Matrix< SCALAR, inDim, 1 > &x, const Eigen::Matrix< SCALAR, outDim, 1 > &w)
 
void executeForwardZeroTest (const bool useDynamicLib)
 
void executeJITCompilationTest (bool useDynamicLib)
 
void executeJitHessianTest (bool useDynamicLib)
 
void executeJITCloneTest (bool useDynamicLib)
 
 TEST (JacobianCGTest, ForwardZeroTest)
 
 TEST (JacobianCGTest, JITCompilationTest)
 
 TEST (HessianCGTest, JITHessianTest)
 
 TEST (JacobianCGTest, DISABLED_LlvmCloneTest)
 
 TEST (JacobianCGTest, JitCloneTest)
 
 TEST (JacobianCGTest, CodegenTest)
 

Variables

const size_t inDim = 3
 dimension of x More...
 
const size_t outDim = 2
 dimension of y More...
 
const bool verbose = false
 

Typedef Documentation

◆ derivativesCppadJIT

typedef DerivativesCppadJIT<inDim, outDim> derivativesCppadJIT

the Jacobian codegen class

Examples:
JacobianCGTest.h.

◆ derivativesCppadCG

typedef DerivativesCppadCG<inDim, outDim> derivativesCppadCG
Examples:
JacobianCGTest.h.

◆ derivativesCppad

typedef DerivativesCppad<inDim, outDim> derivativesCppad
Examples:
JacobianCGTest.h.

Function Documentation

◆ testFunction()

template<typename SCALAR >
Eigen::Matrix<SCALAR, outDim, 1> testFunction ( const Eigen::Matrix< SCALAR, inDim, 1 > &  x)

A general vector-valued function.

Parameters
xthe input
Returns
output y = f(x)
Examples:
JacobianCGTest.h.

◆ jacobianCheck()

template<typename SCALAR >
Eigen::Matrix<SCALAR, outDim, inDim> jacobianCheck ( const Eigen::Matrix< SCALAR, inDim, 1 > &  x)

The analytically, manually derived Jacobian of testFunction() used for verification

Parameters
xthe input
Returns
output y = f(x)
Examples:
JacobianCGTest.h.

Referenced by executeJITCloneTest(), and executeJITCompilationTest().

◆ hessianCheck()

template<typename SCALAR >
Eigen::Matrix<SCALAR, inDim, inDim> hessianCheck ( const Eigen::Matrix< SCALAR, inDim, 1 > &  x,
const Eigen::Matrix< SCALAR, outDim, 1 > &  w 
)
Examples:
JacobianCGTest.h.

Referenced by executeJitHessianTest().

◆ executeForwardZeroTest()

void executeForwardZeroTest ( const bool  useDynamicLib)
Examples:
JacobianCGTest.h.

References inDim, and verbose.

Referenced by TEST().

◆ executeJITCompilationTest()

void executeJITCompilationTest ( bool  useDynamicLib)
Examples:
JacobianCGTest.h.

References i, jacobianCheck(), verbose, and x.

Referenced by TEST().

◆ executeJitHessianTest()

void executeJitHessianTest ( bool  useDynamicLib)
Examples:
JacobianCGTest.h.

References hessianCheck(), i, verbose, and x.

Referenced by TEST().

◆ executeJITCloneTest()

void executeJITCloneTest ( bool  useDynamicLib)
Examples:
JacobianCGTest.h.

References i, jacobianCheck(), verbose, and x.

Referenced by TEST().

◆ TEST() [1/6]

TEST ( JacobianCGTest  ,
ForwardZeroTest   
)

Test evaluation of the forward-zero function, which should be possible to evaluate in both uncompiled and compiled state

Examples:
JacobianCGTest.h.

References executeForwardZeroTest().

◆ TEST() [2/6]

TEST ( JacobianCGTest  ,
JITCompilationTest   
)

Test for just-in-time compilation of the Jacobian and subsequent evaluation of it

References executeJITCompilationTest().

◆ TEST() [3/6]

TEST ( HessianCGTest  ,
JITHessianTest   
)

◆ TEST() [4/6]

TEST ( JacobianCGTest  ,
DISABLED_LlvmCloneTest   
)

Test cloning of JIT compiled libraries

References executeJITCloneTest().

◆ TEST() [5/6]

TEST ( JacobianCGTest  ,
JitCloneTest   
)

Test cloning of JIT compiled libraries

References executeJITCloneTest().

◆ TEST() [6/6]

TEST ( JacobianCGTest  ,
CodegenTest   
)

Test for writing the codegenerated Jacobian to file

Variable Documentation

◆ inDim

const size_t inDim = 3

dimension of x

Examples:
JacobianCGTest.h.

Referenced by executeForwardZeroTest().

◆ outDim

const size_t outDim = 2

dimension of y

Examples:
JacobianCGTest.h.

◆ verbose