mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 00:50:37 +08:00
Fix alignment issues with Jets.
1. Test that reproduces the failure on macos. 2. Move the alignment macros from manual_constructor.h to macros.h and rename them to prevent conflicts. 3. The inline array used by FixedArray is now aligned. 4. Jet has been modified to be eigen friendly. Change-Id: I4563847a767a92156dabab1ab420f0cdddb8ba77
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <glog/logging.h>
|
||||
#include "ceres/internal/macros.h"
|
||||
#include "ceres/internal/manual_constructor.h"
|
||||
|
||||
namespace ceres {
|
||||
@@ -149,7 +150,7 @@ class FixedArray {
|
||||
|
||||
// Allocate some space, not an array of elements of type T, so that we can
|
||||
// skip calling the T constructors and destructors for space we never use.
|
||||
ManualConstructor<InnerContainer> inline_space_[kInlineElements];
|
||||
ManualConstructor<InnerContainer> inline_space_[kInlineElements] CERES_ALIGN_ATTRIBUTE(16);
|
||||
};
|
||||
|
||||
// Implementation details follow
|
||||
|
||||
Reference in New Issue
Block a user