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:
Sameer Agarwal
2012-06-17 08:55:01 -07:00
parent 64f1410272
commit eb893404fa
5 changed files with 83 additions and 41 deletions
+2 -1
View File
@@ -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