Merged in fix/execution-trace-alignment (pull request #371)
Attempt to fix alignment error in expression factors Approved-by: Frank Dellaert <dellaert@cc.gatech.edu>release/4.3a0
commit
48f586e822
|
@ -35,7 +35,7 @@ template<int T> struct CallRecord;
|
||||||
/// Storage type for the execution trace.
|
/// Storage type for the execution trace.
|
||||||
/// It enforces the proper alignment in a portable way.
|
/// It enforces the proper alignment in a portable way.
|
||||||
/// Provide a traceSize() sized array of this type to traceExecution as traceStorage.
|
/// Provide a traceSize() sized array of this type to traceExecution as traceStorage.
|
||||||
static const unsigned TraceAlignment = 16;
|
static const unsigned TraceAlignment = 32;
|
||||||
typedef boost::aligned_storage<1, TraceAlignment>::type ExecutionTraceStorage;
|
typedef boost::aligned_storage<1, TraceAlignment>::type ExecutionTraceStorage;
|
||||||
|
|
||||||
template<bool UseBlock, typename Derived>
|
template<bool UseBlock, typename Derived>
|
||||||
|
|
|
@ -196,6 +196,7 @@ TEST(Expression, BinaryDimensions) {
|
||||||
TEST(Expression, BinaryTraceSize) {
|
TEST(Expression, BinaryTraceSize) {
|
||||||
typedef internal::BinaryExpression<Point3, Pose3, Point3> Binary;
|
typedef internal::BinaryExpression<Point3, Pose3, Point3> Binary;
|
||||||
size_t expectedTraceSize = sizeof(Binary::Record);
|
size_t expectedTraceSize = sizeof(Binary::Record);
|
||||||
|
internal::upAlign(expectedTraceSize);
|
||||||
EXPECT_LONGS_EQUAL(expectedTraceSize, binary::p_cam.traceSize());
|
EXPECT_LONGS_EQUAL(expectedTraceSize, binary::p_cam.traceSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue