Port SelfCwiseBinaryOp and Dot.h to nvcc, fix portability issue with std::min/max

This commit is contained in:
Gael Guennebaud
2013-04-05 16:35:49 +02:00
parent d93c1c113b
commit 12439e1249
17 changed files with 104 additions and 44 deletions

View File

@@ -766,7 +766,7 @@ JacobiSVD<MatrixType, QRPreconditioner>::compute(const MatrixType& matrix, unsig
// if this 2x2 sub-matrix is not diagonal already...
// notice that this comparison will evaluate to false if any NaN is involved, ensuring that NaN's don't
// keep us iterating forever. Similarly, small denormal numbers are considered zero.
using std::max;
EIGEN_USING_STD_MATH(max);
RealScalar threshold = (max)(considerAsZero, precision * (max)(abs(m_workMatrix.coeff(p,p)),
abs(m_workMatrix.coeff(q,q))));
if((max)(abs(m_workMatrix.coeff(p,q)),abs(m_workMatrix.coeff(q,p))) > threshold)