mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Fix Eigen >= 3.3 compilation if EIGEN_DONT_VECTORIZE set
Would result in compilation error include/ceres/jet.h:296:59: error: requested alignment is not a positive power of 2 alignas(kAlignment) Eigen::Matrix<T, N, 1, kAlignOrNot> v; because CERES_JET_ALIGN_BYTES = EIGEN_MAX_ALIGN_BYTES = 0 in that case. Change-Id: I247653d3b7555e80891d3fb78676acfa302a9e1d
This commit is contained in:
+1
-1
@@ -258,7 +258,7 @@ struct Jet {
|
|||||||
// supported is < 16, in which case we do not specify an alignment, as this
|
// supported is < 16, in which case we do not specify an alignment, as this
|
||||||
// implies the host is not a modern x86 machine. If using < C++11, we cannot
|
// implies the host is not a modern x86 machine. If using < C++11, we cannot
|
||||||
// specify alignment.
|
// specify alignment.
|
||||||
#ifndef CERES_USE_CXX11
|
#if !defined(CERES_USE_CXX11) || defined(EIGEN_DONT_VECTORIZE)
|
||||||
// Without >= C++11, we cannot specify the alignment so fall back to safe,
|
// Without >= C++11, we cannot specify the alignment so fall back to safe,
|
||||||
// unvectorised version.
|
// unvectorised version.
|
||||||
Eigen::Matrix<T, N, 1, Eigen::DontAlign> v;
|
Eigen::Matrix<T, N, 1, Eigen::DontAlign> v;
|
||||||
|
|||||||
Reference in New Issue
Block a user