Sidestep alignment issue by using 16 (default for Eigen).

release/4.3a0
Frank Dellaert 2023-02-04 23:38:25 -08:00
parent fdb910fc07
commit 3c512d6a4f
1 changed files with 1 additions and 6 deletions

View File

@ -18,11 +18,6 @@
#pragma once
// The MSVC compiler insists on knowing extended alignment is ok.
#ifdef _MSC_VER
#define _ENABLE_EXTENDED_ALIGNED_STORAGE
#endif
#include <gtsam/config.h> // Configuration from CMake
#include <gtsam/nonlinear/internal/JacobianMap.h>
#include <gtsam/inference/Key.h>
@ -42,7 +37,7 @@ template<int T> 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 = 32;
static const unsigned TraceAlignment = 16; // 16 bytes is the default alignment used by Eigen.
typedef std::aligned_storage<1, TraceAlignment>::type ExecutionTraceStorage;
template<bool UseBlock, typename Derived>