29 using namespace gtsam;
53 CallConfig(
int compTimeRows,
int compTimeCols,
int runTimeRows,
int runTimeCols):
54 compTimeRows(compTimeRows),
55 compTimeCols(compTimeCols),
56 runTimeRows(runTimeRows),
57 runTimeCols(runTimeCols)
68 void print(
const std::string & prefix)
const {
69 std::cout << prefix <<
"{" << compTimeRows <<
", " << compTimeCols <<
", " << runTimeRows <<
", " << runTimeCols <<
"}\n" ;
78 struct Record:
public internal::CallRecordImplementor<Record, Cols> {
82 void print(
const std::string& indent)
const {
89 template<
typename SomeMatrix>
90 void reverseAD4(
const SomeMatrix & dFdT, internal::JacobianMap& jacobians)
const {
97 template<
typename Derived,
int Rows>
98 friend struct internal::CallRecordImplementor;
101 internal::JacobianMap*
NJM_ptr =
static_cast<internal::JacobianMap *
>(
nullptr);
107 TEST(CallRecord, virtualReverseAdDispatching) {
115 record.CallRecord::reverseAD2(Eigen::MatrixXd(Rows,
Cols),
NJM);
124 record.CallRecord::reverseAD2(Eigen::MatrixXd(Rows,
Cols),
NJM);
133 record.CallRecord::reverseAD2(Eigen::MatrixXd(Rows,
Cols),
NJM);
142 record.CallRecord::reverseAD2(Eigen::MatrixXd(Rows,
Cols),
NJM);
151 record.CallRecord::reverseAD2(Eigen::MatrixXd(Rows,
Cols),
NJM);
160 record.CallRecord::reverseAD2(Eigen::MatrixXd(Rows,
Cols),
NJM);
internal::JacobianMap & NJM
void startReverseAD4(internal::JacobianMap &jacobians) const
void print(const std::string &prefix) const
Concept check for values that can be used in unit tests.
static int runAllTests(TestResult &result)
int dynamicIfAboveMax(int i)
void reverseAD4(const SomeMatrix &dFdT, internal::JacobianMap &jacobians) const
Eigen::Matrix< double, Eigen::Dynamic, Cols > DynRowMat
CallConfig(int rows, int cols)
CallConfig(int compTimeRows, int compTimeCols, int runTimeRows, int runTimeCols)
bool equals(const CallConfig &c, double) const
#define EXPECT(condition)
Internals for Expression.h, not for general consumption.
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
The matrix class, also used for vectors and row-vectors.
internal::JacobianMap * NJM_ptr
const int CallRecordMaxVirtualStaticRows
void print(const std::string &indent) const
TEST(CallRecord, virtualReverseAdDispatching)