MCPcopy Create free account
hub / github.com/PX4/eigen / run_nesting_ops_1

Function run_nesting_ops_1

test/nesting_ops.cpp:33–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33template <typename MatrixType> void run_nesting_ops_1(const MatrixType& _m)
34{
35 typename internal::nested_eval<MatrixType,2>::type m(_m);
36
37 // Make really sure that we are in debug mode!
38 VERIFY_RAISES_ASSERT(eigen_assert(false));
39
40 // The only intention of these tests is to ensure that this code does
41 // not trigger any asserts or segmentation faults... more to come.
42 VERIFY_IS_APPROX( (m.transpose() * m).diagonal().sum(), (m.transpose() * m).diagonal().sum() );
43 VERIFY_IS_APPROX( (m.transpose() * m).diagonal().array().abs().sum(), (m.transpose() * m).diagonal().array().abs().sum() );
44
45 VERIFY_IS_APPROX( (m.transpose() * m).array().abs().sum(), (m.transpose() * m).array().abs().sum() );
46}
47
48template <typename MatrixType> void run_nesting_ops_2(const MatrixType& _m)
49{

Callers 1

test_nesting_opsFunction · 0.85

Calls 5

absMethod · 0.80
sumMethod · 0.45
diagonalMethod · 0.45
transposeMethod · 0.45
arrayMethod · 0.45

Tested by 1

test_nesting_opsFunction · 0.68