fix tests when scalar is bfloat16, half

This commit is contained in:
Charles Schlosser
2024-02-07 04:50:11 +00:00
committed by Antonio Sánchez
parent 3ebaab8a63
commit 3ab8f48256
4 changed files with 5 additions and 5 deletions

View File

@@ -26,7 +26,7 @@ void array_for_matrix(const MatrixType& m) {
// Prevent overflows for integer types.
if (Eigen::NumTraits<Scalar>::IsInteger) {
constexpr Scalar kMaxVal = Scalar(10000);
Scalar kMaxVal = Scalar(10000);
m1.array() = m1.array() - kMaxVal * (m1.array() / kMaxVal);
m2.array() = m2.array() - kMaxVal * (m2.array() / kMaxVal);
}