diff --git a/gtsam/nonlinear/internal/ExecutionTrace.h b/gtsam/nonlinear/internal/ExecutionTrace.h index a147f505e..ace0aaea8 100644 --- a/gtsam/nonlinear/internal/ExecutionTrace.h +++ b/gtsam/nonlinear/internal/ExecutionTrace.h @@ -35,7 +35,7 @@ template struct CallRecord; /// Storage type for the execution trace. /// It enforces the proper alignment in a portable way. /// 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; template diff --git a/gtsam/nonlinear/tests/testExpression.cpp b/gtsam/nonlinear/tests/testExpression.cpp index bde79e780..7a06179b4 100644 --- a/gtsam/nonlinear/tests/testExpression.cpp +++ b/gtsam/nonlinear/tests/testExpression.cpp @@ -196,6 +196,7 @@ TEST(Expression, BinaryDimensions) { TEST(Expression, BinaryTraceSize) { typedef internal::BinaryExpression Binary; size_t expectedTraceSize = sizeof(Binary::Record); + internal::upAlign(expectedTraceSize); EXPECT_LONGS_EQUAL(expectedTraceSize, binary::p_cam.traceSize()); }