diff --git a/Eigen/Core b/Eigen/Core index af3b4de98..e671f7879 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -3,6 +3,7 @@ #include "CoreDeclarations" #include +#include #ifdef EIGEN_VECTORIZE // it seems we cannot assume posix_memalign is defined in the stdlib header diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 8daedcc7d..973dcaa3c 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -750,9 +750,9 @@ inline void Product::_cacheFriendlyEvalAndAdd(DestDerived& RhsCopy rhs(m_rhs); ei_cache_friendly_product( rows(), cols(), lhs.cols(), - _LhsCopy::Flags&RowMajorBit, &(lhs.const_cast_derived().coeffRef(0,0)), lhs.stride(), - _RhsCopy::Flags&RowMajorBit, &(rhs.const_cast_derived().coeffRef(0,0)), rhs.stride(), - Flags&RowMajorBit, &(res.coeffRef(0,0)), res.stride() + _LhsCopy::Flags&RowMajorBit, (const Scalar*)&(lhs.const_cast_derived().coeffRef(0,0)), lhs.stride(), + _RhsCopy::Flags&RowMajorBit, (const Scalar*)&(rhs.const_cast_derived().coeffRef(0,0)), rhs.stride(), + Flags&RowMajorBit, (Scalar*)&(res.coeffRef(0,0)), res.stride() ); }