Disable bad "deprecated warning" edge-case in BDCSVD
What does this implement/fix?
This fixes a couple of invalid deprecation warnings in BDCSVD.
If no computationOptions are set with the runtime parameters, BDCSVD dispatches to JacobiSVD at runtime. BDCSVD has to pass a 0 as the computationOptions to JacobiSVD's deprecated constructor. Unfortunately, I don't think there is a simple way to naturally prevent this in the implementation. So, I just disable the warning when bdcsvd tries to call jacobisvd's deprecated constructor.
#include <Eigen/Core>
#include <Eigen/SVD>
int main() {
Eigen::MatrixXd m = Eigen::MatrixXd::Random(100, 100);
// Valid input, to get the singular values, but shows deprecation warning for JacobiSVD!
Eigen::BDCSVD<Eigen::MatrixXd> svd1(m);
// Deprecated warning for both BDCSVD and JacobiSVD.
Eigen::BDCSVD<Eigen::MatrixXd> svd2(m, Eigen::ComputeFullU);
return 0;
}
I just borrowed the stuff to disable the warning from highway. this should work for the compiler versions eigen supports...