mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix arm32 issues.
This commit is contained in:
@@ -98,9 +98,12 @@ void binary_op_test(std::string name, Fn fun, RefFn ref) {
|
||||
Scalar a = actual(i, j);
|
||||
#if EIGEN_ARCH_ARM
|
||||
// Work around NEON flush-to-zero mode
|
||||
// if ref returns denormalized value and Eigen returns 0, then skip the test
|
||||
int ref_fpclass = std::fpclassify(e);
|
||||
if (a == Scalar(0) && ref_fpclass == FP_SUBNORMAL) continue;
|
||||
// if ref returns a subnormal value and Eigen returns 0, then skip the test
|
||||
if (a == Scalar(0) &&
|
||||
(e > -(std::numeric_limits<Scalar>::min)() && e < (std::numeric_limits<Scalar>::min)() &&
|
||||
e >= -std::numeric_limits<Scalar>::denorm_min() && e <= std::numeric_limits<Scalar>::denorm_min())) {
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
bool success = (a == e) || ((numext::isfinite)(e) && internal::isApprox(a, e, tol)) ||
|
||||
((numext::isnan)(a) && (numext::isnan)(e));
|
||||
|
||||
Reference in New Issue
Block a user