From a7b7f3ca8a25bfef4058d8a212cdc504bf5aa50e Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Tue, 23 Apr 2019 17:23:19 -0700 Subject: [PATCH] Add missing EIGEN_DEPRECATED annotations to deprecated functions and fix few other doxygen warnings --- Eigen/src/Core/CwiseNullaryOp.h | 4 ++-- Eigen/src/Core/DenseBase.h | 4 ++-- Eigen/src/Core/EigenBase.h | 2 +- Eigen/src/Core/Reshaped.h | 2 +- Eigen/src/Core/TriangularMatrix.h | 6 +++--- unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorContraction.h | 13 ++++++++++--- .../Eigen/CXX11/src/Tensor/TensorCostModel.h | 3 ++- 8 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Eigen/src/Core/CwiseNullaryOp.h b/Eigen/src/Core/CwiseNullaryOp.h index ef708197b..8612c27b9 100644 --- a/Eigen/src/Core/CwiseNullaryOp.h +++ b/Eigen/src/Core/CwiseNullaryOp.h @@ -235,7 +235,7 @@ DenseBase::Constant(const Scalar& value) * \sa LinSpaced(Index,Scalar,Scalar), setLinSpaced(Index,const Scalar&,const Scalar&) */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::RandomAccessLinSpacedReturnType +EIGEN_DEPRECATED 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) @@ -247,7 +247,7 @@ DenseBase::LinSpaced(Sequential_t, Index size, const Scalar& low, const * \sa LinSpaced(Scalar,Scalar) */ template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase::RandomAccessLinSpacedReturnType +EIGEN_DEPRECATED 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) diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index 2289fe41f..9c53fd3ae 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -266,7 +266,7 @@ template class DenseBase /** \internal Represents a matrix with all coefficients equal to one another*/ typedef CwiseNullaryOp,PlainObject> ConstantReturnType; /** \internal \deprecated Represents a vector with linearly spaced coefficients that allows sequential access only. */ - typedef CwiseNullaryOp,PlainObject> SequentialLinSpacedReturnType; + EIGEN_DEPRECATED typedef CwiseNullaryOp,PlainObject> SequentialLinSpacedReturnType; /** \internal Represents a vector with linearly spaced coefficients that allows random access. */ typedef CwiseNullaryOp,PlainObject> RandomAccessLinSpacedReturnType; /** \internal the return type of MatrixBase::eigenvalues() */ @@ -305,7 +305,7 @@ template class DenseBase * Copies \a other into *this without evaluating other. \returns a reference to *this. * \deprecated */ template - EIGEN_DEVICE_FUNC + EIGEN_DEPRECATED EIGEN_DEVICE_FUNC Derived& lazyAssign(const DenseBase& other); EIGEN_DEVICE_FUNC diff --git a/Eigen/src/Core/EigenBase.h b/Eigen/src/Core/EigenBase.h index b195506a9..a197d2694 100644 --- a/Eigen/src/Core/EigenBase.h +++ b/Eigen/src/Core/EigenBase.h @@ -35,7 +35,7 @@ template struct EigenBase * \deprecated Since Eigen 3.3, its usage is deprecated. Use Eigen::Index instead. * \sa StorageIndex, \ref TopicPreprocessorDirectives. */ - typedef Eigen::Index Index; + EIGEN_DEPRECATED typedef Eigen::Index Index; // FIXME is it needed? typedef typename internal::traits::StorageKind StorageKind; diff --git a/Eigen/src/Core/Reshaped.h b/Eigen/src/Core/Reshaped.h index c955815e6..a78fd880f 100644 --- a/Eigen/src/Core/Reshaped.h +++ b/Eigen/src/Core/Reshaped.h @@ -12,6 +12,7 @@ #define EIGEN_RESHAPED_H namespace Eigen { +namespace internal { /** \class Reshaped * \ingroup Core_Module @@ -43,7 +44,6 @@ namespace Eigen { * \sa DenseBase::reshaped(NRowsType,NColsType) */ -namespace internal { template struct traits > : traits { diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h index cf3532f06..b31972ad0 100644 --- a/Eigen/src/Core/TriangularMatrix.h +++ b/Eigen/src/Core/TriangularMatrix.h @@ -451,12 +451,12 @@ template class TriangularViewImpl<_Mat /** \deprecated */ template - EIGEN_DEVICE_FUNC + EIGEN_DEPRECATED EIGEN_DEVICE_FUNC void lazyAssign(const TriangularBase& other); /** \deprecated */ template - EIGEN_DEVICE_FUNC + EIGEN_DEPRECATED EIGEN_DEVICE_FUNC void lazyAssign(const MatrixBase& other); #endif @@ -539,7 +539,7 @@ template class TriangularViewImpl<_Mat /** \deprecated * Shortcut for \code (*this).swap(other.triangularView<(*this)::Mode>()) \endcode */ template - EIGEN_DEVICE_FUNC + EIGEN_DEPRECATED EIGEN_DEVICE_FUNC void swap(MatrixBase const & other) { EIGEN_STATIC_ASSERT_LVALUE(OtherDerived); diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h b/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h index 91c77b05a..0db637405 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h @@ -41,7 +41,7 @@ struct cond { } // namespace /** - * \class TensorBlockShapeType + * \enum TensorBlockShapeType * \ingroup CXX11_Tensor_Module * * \brief Tensor block shape type. diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h index d9400163c..614475fc0 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h @@ -367,9 +367,16 @@ struct NoOpOutputKernel { */ template EIGEN_ALWAYS_INLINE void operator()( - const internal::blas_data_mapper& /*output_mapper*/, - const TensorContractionParams& /*params*/, Index /*i*/, - Index /*j*/, Index /*num_rows*/, Index /*num_cols*/) const {} + const internal::blas_data_mapper& output_mapper, + const TensorContractionParams& params, Index i, + Index j, Index num_rows, Index num_cols) const { + EIGEN_UNUSED_VARIABLE(output_mapper); + EIGEN_UNUSED_VARIABLE(params); + EIGEN_UNUSED_VARIABLE(i); + EIGEN_UNUSED_VARIABLE(j); + EIGEN_UNUSED_VARIABLE(num_rows); + EIGEN_UNUSED_VARIABLE(num_cols); + } }; template diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h b/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h index 7f79ac30d..195267ce8 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h @@ -177,7 +177,8 @@ class TensorCostModel { double threads = (cost - kStartupCycles) / kPerThreadCycles + 0.9; // Make sure we don't invoke undefined behavior when we convert to an int. threads = numext::mini(threads, GenericNumTraits::highest()); - return numext::mini(max_threads, numext::maxi(1, threads)); + return numext::mini(max_threads, + numext::maxi(1, static_cast(threads))); } // taskSize assesses parallel task size.