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

@@ -466,7 +466,7 @@ void test_stl_iterators(int rows = Rows, int cols = Cols) {
VectorType col = VectorType::Random(rows);
// Prevent overflows for integer types.
if (Eigen::NumTraits<Scalar>::IsInteger) {
constexpr Scalar kMaxVal = Scalar(1000);
Scalar kMaxVal = Scalar(1000);
row.array() = row.array() - kMaxVal * (row.array() / kMaxVal);
col.array() = col.array() - kMaxVal * (col.array() / kMaxVal);
}