Disable bad "deprecated warning" edge-case in BDCSVD

This commit is contained in:
Arthur 2022-08-11 18:43:31 +00:00 committed by Rasmus Munk Larsen
parent b8e93bf589
commit 27367017bd
2 changed files with 21 additions and 0 deletions

View File

@ -910,6 +910,22 @@
#define EIGEN_UNUSED
#endif
#if EIGEN_COMP_GNUC
#define EIGEN_PRAGMA(tokens) _Pragma(#tokens)
#define EIGEN_DIAGNOSTICS(tokens) EIGEN_PRAGMA(GCC diagnostic tokens)
#define EIGEN_DIAGNOSTICS_OFF(msc, gcc) EIGEN_DIAGNOSTICS(gcc)
#elif EIGEN_COMP_MSVC
#define EIGEN_PRAGMA(tokens) __pragma(tokens)
#define EIGEN_DIAGNOSTICS(tokens) EIGEN_PRAGMA(warning(tokens))
#define EIGEN_DIAGNOSTICS_OFF(msc, gcc) EIGEN_DIAGNOSTICS(msc)
#else
#define EIGEN_PRAGMA(tokens)
#define EIGEN_DIAGNOSTICS(tokens)
#define EIGEN_DIAGNOSTICS_OFF(msc, gcc)
#endif
#define EIGEN_DISABLE_DEPRECATED_WARNING EIGEN_DIAGNOSTICS_OFF(disable : 4996, ignored "-Wdeprecated-declarations")
// Suppresses 'unused variable' warnings.
namespace Eigen {
namespace internal {

View File

@ -57,6 +57,9 @@ struct allocate_small_svd {
}
};
EIGEN_DIAGNOSTICS(push)
EIGEN_DISABLE_DEPRECATED_WARNING
template <typename MatrixType>
struct allocate_small_svd<MatrixType, 0> {
static void run(JacobiSVD<MatrixType>& smallSvd, Index rows, Index cols, unsigned int computationOptions) {
@ -64,6 +67,8 @@ struct allocate_small_svd<MatrixType, 0> {
}
};
EIGEN_DIAGNOSTICS(pop)
} // end namespace internal
/** \ingroup SVD_Module