Created attachment 281 [details] replace 'RealScalar' arguments by 'const RealScalar&' in the Core module This is needed when the scalar type requires some specific alignment since MSVC cannot align function arguments.
the patch is incomplete, we need to check the other modules too.
a first pass: https://bitbucket.org/eigen/eigen/changeset/0c5fc8f89361/ changeset: 0c5fc8f89361 user: ggael date: 2012-06-28 02:08:59 summary: bug 482: pass scalar arguments by const references. This changeset only concerns the Core and Geometry modules We need an automatic process to track them.
pass on sparse module: https://bitbucket.org/eigen/eigen/changeset/28c7f269dac7/ changeset: 28c7f269dac7 user: ggael date: 2012-06-28 21:01:02 summary: bug 482: pass scalar by const ref - pass on the sparse module (also fix a compilation issue due to previous pass)
Pass 3: https://bitbucket.org/eigen/eigen/commits/56956bb0c314/ changeset: 56956bb0c314 user: ggael date: 2013-02-25 18:05:57 summary: bug 482: pass scalar arguments by const references. It only remains the following cases that I'm not sure about because I thin they might break the ABI: Eigen/src/Core/DenseBase.h: select(const DenseBase<ThenDerived>& thenMatrix, typename ThenDerived::Scalar elseScalar) const; Eigen/src/Core/DenseBase.h: select(typename ElseDerived::Scalar thenScalar, const DenseBase<ElseDerived>& elseMatrix) const; Eigen/src/Core/GlobalFunctions.h: operator/(typename Derived::Scalar s, const Eigen::ArrayBase<Derived>& a) Eigen/src/Core/MatrixBase.h: const MatrixPowerReturnValue<Derived> pow(RealScalar p) const; Eigen/src/Core/ProductBase.h:operator*(const ProductBase<Derived,Lhs,Rhs>& prod, typename Derived::Scalar x) Eigen/src/Core/ProductBase.h:operator*(typename Derived::Scalar x,const ProductBase<Derived,Lhs,Rhs>& prod) Eigen/src/Core/products/SelfadjointProduct.h:::rankUpdate(const MatrixBase<DerivedU>& u, Scalar alpha) Eigen/src/Core/products/SelfadjointRank2Update.h:::rankUpdate(const MatrixBase<DerivedU>& u, const MatrixBase<DerivedV>& v, Scalar alpha) Eigen/src/Core/SelfAdjointView.h: SelfAdjointView& rankUpdate(const MatrixBase<DerivedU>& u, const MatrixBase<DerivedV>& v, Scalar alpha = Scalar(1)); Eigen/src/Core/SelfAdjointView.h: SelfAdjointView& rankUpdate(const MatrixBase<DerivedU>& u, Scalar alpha = Scalar(1)); Eigen/src/Geometry/Quaternion.h: template<class OtherDerived> Quaternion<Scalar> slerp(Scalar t, const QuaternionBase<OtherDerived>& other) const; Eigen/src/Geometry/Quaternion.h:QuaternionBase<Derived>::slerp(Scalar t, const QuaternionBase<OtherDerived>& other) const Eigen/src/SuperLUSupport/SuperLUSupport.h: eigen_assert(false && "Scalar type not supported by SuperLU");
Finally, I don't think such a change might break ABI in practice, and moreover such a change is really important to preserve alignment. https://bitbucket.org/eigen/eigen/commits/6332c61ffc97/ Changeset: 6332c61ffc97 User: ggael Date: 2013-04-12 15:26:55 Summary: Fix bug 482: pass scalar value by const reference (it remained a few cases)
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/482.