Conditional aligned new, but not sure it has effect since inherits from pair

release/4.3a0
Frank Dellaert 2018-11-03 00:21:36 -04:00
parent 2d0ba69fa4
commit 8900739bd3
1 changed files with 6 additions and 0 deletions

View File

@ -209,6 +209,12 @@ public:
v << v1, v2;
return v;
}
// Alignment, see https://eigen.tuxfamily.org/dox/group__TopicStructHavingEigenMembers.html
enum { NeedsToAlign = (sizeof(M1) % 16) == 0 || (sizeof(M2) % 16) == 0
};
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
};
// Define any direct product group to be a model of the multiplicative Group concept