diff --git a/Eigen/src/Core/CwiseNullaryOp.h b/Eigen/src/Core/CwiseNullaryOp.h index 13a542a023f9ce65c479025641a8b55a78126cdf..e4c5fedc3fc52ec00175cda8586bebd62bfa2391 100644 --- a/Eigen/src/Core/CwiseNullaryOp.h +++ b/Eigen/src/Core/CwiseNullaryOp.h @@ -235,8 +235,7 @@ DenseBase::Constant(const Scalar& value) { * \sa LinSpaced(Index,const Scalar&, const Scalar&), setLinSpaced(Index,const Scalar&,const Scalar&) */ template -EIGEN_DEPRECATED EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase< - Derived>::RandomAccessLinSpacedReturnType +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::RandomAccessLinSpacedReturnType DenseBase::LinSpaced(Sequential_t, Index size, const Scalar& low, const Scalar& high) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) return DenseBase::NullaryExpr(size, internal::linspaced_op(low, high, size)); @@ -247,8 +246,7 @@ DenseBase::LinSpaced(Sequential_t, Index size, const Scalar& low, const * \sa LinSpaced(const Scalar&, const Scalar&) */ template -EIGEN_DEPRECATED EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase< - Derived>::RandomAccessLinSpacedReturnType +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::RandomAccessLinSpacedReturnType DenseBase::LinSpaced(Sequential_t, const Scalar& low, const Scalar& high) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived) diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index 0333ad167adae4aca7100ec54adeb5cd0920191f..c81e1d109a5e8fb4e45f3f06a569250d37fc69ab 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -306,12 +306,12 @@ class DenseBase EIGEN_DEVICE_FUNC static const ConstantReturnType Constant(Index size, const Scalar& value); EIGEN_DEVICE_FUNC static const ConstantReturnType Constant(const Scalar& value); - EIGEN_DEPRECATED EIGEN_DEVICE_FUNC static const RandomAccessLinSpacedReturnType LinSpaced(Sequential_t, Index size, - const Scalar& low, - const Scalar& high); - EIGEN_DEPRECATED EIGEN_DEVICE_FUNC static const RandomAccessLinSpacedReturnType LinSpaced(Sequential_t, - const Scalar& low, - const Scalar& high); + EIGEN_DEPRECATED_WITH_REASON("The method may result in accuracy loss. Use .EqualSpaced() instead.") + EIGEN_DEVICE_FUNC static const RandomAccessLinSpacedReturnType LinSpaced(Sequential_t, Index size, const Scalar& low, + const Scalar& high); + EIGEN_DEPRECATED_WITH_REASON("The method may result in accuracy loss. Use .EqualSpaced() instead.") + EIGEN_DEVICE_FUNC static const RandomAccessLinSpacedReturnType LinSpaced(Sequential_t, const Scalar& low, + const Scalar& high); EIGEN_DEVICE_FUNC static const RandomAccessLinSpacedReturnType LinSpaced(Index size, const Scalar& low, const Scalar& high); diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 8d5c47e472f7a9efc1af90d5b9666f08e1bf5d4f..045993d466054cbcee1760eb520b6db1706e5534 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -373,12 +373,14 @@ class MatrixBase : public DenseBase { template inline JacobiSVD jacobiSvd() const; template - EIGEN_DEPRECATED inline JacobiSVD jacobiSvd(unsigned int computationOptions) const; + EIGEN_DEPRECATED_WITH_REASON("Options should be specified using method's template parameter.") + inline JacobiSVD jacobiSvd(unsigned int computationOptions) const; template inline BDCSVD bdcSvd() const; template - EIGEN_DEPRECATED inline BDCSVD bdcSvd(unsigned int computationOptions) const; + EIGEN_DEPRECATED_WITH_REASON("Options should be specified using method's template parameter.") + inline BDCSVD bdcSvd(unsigned int computationOptions) const; /////////// Geometry module /////////// @@ -391,7 +393,8 @@ class MatrixBase : public DenseBase { EIGEN_DEVICE_FUNC inline PlainObject unitOrthogonal(void) const; - EIGEN_DEPRECATED EIGEN_DEVICE_FUNC inline Matrix eulerAngles(Index a0, Index a1, Index a2) const; + EIGEN_DEPRECATED_WITH_REASON("Use .canonicalEulerAngles() instead.") + EIGEN_DEVICE_FUNC inline Matrix eulerAngles(Index a0, Index a1, Index a2) const; EIGEN_DEVICE_FUNC inline Matrix canonicalEulerAngles(Index a0, Index a1, Index a2) const; diff --git a/Eigen/src/Core/products/Parallelizer.h b/Eigen/src/Core/products/Parallelizer.h index 4f3668944fcd5a6f81adf029c27c1d64be13c592..b1b89ef971bea550e4c4c0f8edccd48c18484990 100644 --- a/Eigen/src/Core/products/Parallelizer.h +++ b/Eigen/src/Core/products/Parallelizer.h @@ -47,7 +47,7 @@ inline void manage_multi_threading(Action action, int* v); // Public APIs. /** Must be call first when calling Eigen from multiple threads */ -EIGEN_DEPRECATED inline void initParallel() {} +EIGEN_DEPRECATED_WITH_REASON("Initialization is no longer needed.") inline void initParallel() {} /** \returns the max number of threads reserved for Eigen * \sa setNbThreads */ diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 35eb1613612e813a5e1336ad27e407723aee1206..db4a63089b08e4172978cff0d97cc55ed02ee4c5 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -940,6 +940,18 @@ #define EIGEN_DEPRECATED #endif +#ifndef EIGEN_NO_DEPRECATED_WARNING +#if EIGEN_COMP_GNUC +#define EIGEN_DEPRECATED_WITH_REASON(message) __attribute__((deprecated(message))) +#elif EIGEN_COMP_MSVC +#define EIGEN_DEPRECATED_WITH_REASON(message) __declspec(deprecated(message)) +#else +#define EIGEN_DEPRECATED_WITH_REASON(message) +#endif +#else +#define EIGEN_DEPRECATED_WITH_REASON(message) +#endif + #if EIGEN_COMP_GNUC #define EIGEN_UNUSED __attribute__((unused)) #else diff --git a/Eigen/src/Geometry/EulerAngles.h b/Eigen/src/Geometry/EulerAngles.h index ad6b821bea14a0e618f6ef8a739e8364c81e3fbc..366a32ce42466a28f80034df58b462e7c7e0b5b3 100644 --- a/Eigen/src/Geometry/EulerAngles.h +++ b/Eigen/src/Geometry/EulerAngles.h @@ -133,8 +133,8 @@ EIGEN_DEVICE_FUNC inline Matrix::Scalar, 3, 1> Matr * \sa class AngleAxis */ template -EIGEN_DEPRECATED EIGEN_DEVICE_FUNC inline Matrix::Scalar, 3, 1> -MatrixBase::eulerAngles(Index a0, Index a1, Index a2) const { +EIGEN_DEVICE_FUNC inline Matrix::Scalar, 3, 1> MatrixBase::eulerAngles( + Index a0, Index a1, Index a2) const { /* Implemented from Graphics Gems IV */ EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Derived, 3, 3) diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index 6fab905e54b86f327f28921ccf9f6eb35baa7e2f..db1e4a2640ef905fcfc6b1d415dc8e991d896d2c 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -155,7 +155,8 @@ class BDCSVD : public SVDBase > { * \deprecated Will be removed in the next major Eigen version. Options should * be specified in the \a Options template parameter. */ - EIGEN_DEPRECATED BDCSVD(Index rows, Index cols, unsigned int computationOptions) : m_algoswap(16), m_numIters(0) { + EIGEN_DEPRECATED_WITH_REASON("Options should be specified using the class template parameter.") + BDCSVD(Index rows, Index cols, unsigned int computationOptions) : m_algoswap(16), m_numIters(0) { internal::check_svd_options_assertions(computationOptions, rows, cols); allocate(rows, cols, computationOptions); } @@ -183,8 +184,8 @@ class BDCSVD : public SVDBase > { * be specified in the \a Options template parameter. */ template - EIGEN_DEPRECATED BDCSVD(const MatrixBase& matrix, unsigned int computationOptions) - : m_algoswap(16), m_numIters(0) { + EIGEN_DEPRECATED_WITH_REASON("Options should be specified using the class template parameter.") + BDCSVD(const MatrixBase& matrix, unsigned int computationOptions) : m_algoswap(16), m_numIters(0) { internal::check_svd_options_assertions(computationOptions, matrix.rows(), matrix.cols()); compute_impl(matrix, computationOptions); } @@ -211,7 +212,8 @@ class BDCSVD : public SVDBase > { * be specified in the \a Options template parameter. */ template - EIGEN_DEPRECATED BDCSVD& compute(const MatrixBase& matrix, unsigned int computationOptions) { + EIGEN_DEPRECATED_WITH_REASON("Options should be specified using the class template parameter.") + BDCSVD& compute(const MatrixBase& matrix, unsigned int computationOptions) { internal::check_svd_options_assertions(computationOptions, matrix.rows(), matrix.cols()); return compute_impl(matrix, computationOptions); } diff --git a/Eigen/src/SVD/JacobiSVD.h b/Eigen/src/SVD/JacobiSVD.h index 1abde17fd90ceab909779b4dcdddad72a425d95c..da2f295930542229ed26e52530c2e95bcde41167 100644 --- a/Eigen/src/SVD/JacobiSVD.h +++ b/Eigen/src/SVD/JacobiSVD.h @@ -555,7 +555,8 @@ class JacobiSVD : public SVDBase > { * \deprecated Will be removed in the next major Eigen version. Options should * be specified in the \a Options template parameter. */ - EIGEN_DEPRECATED JacobiSVD(Index rows, Index cols, unsigned int computationOptions) { + EIGEN_DEPRECATED_WITH_REASON("Options should be specified using the class template parameter.") + JacobiSVD(Index rows, Index cols, unsigned int computationOptions) { internal::check_svd_options_assertions(computationOptions, rows, cols); allocate(rows, cols, computationOptions); } @@ -610,7 +611,8 @@ class JacobiSVD : public SVDBase > { * be specified in the \a Options template parameter. */ template - EIGEN_DEPRECATED JacobiSVD& compute(const MatrixBase& matrix, unsigned int computationOptions) { + EIGEN_DEPRECATED_WITH_REASON("Options should be specified using the class template parameter.") + JacobiSVD& compute(const MatrixBase& matrix, unsigned int computationOptions) { internal::check_svd_options_assertions, Options>(m_computationOptions, matrix.rows(), matrix.cols()); return compute_impl(matrix, computationOptions); diff --git a/Eigen/src/SparseCore/SparseVector.h b/Eigen/src/SparseCore/SparseVector.h index 3f72a34dabd9510a72b45e63a618ae22c769bf10..d19a00dd9fc164237d7c0ae72b287e980f98288f 100644 --- a/Eigen/src/SparseCore/SparseVector.h +++ b/Eigen/src/SparseCore/SparseVector.h @@ -354,40 +354,40 @@ class SparseVector : public SparseCompressedBase