aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/stable_norm.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/stable_norm.cpp b/test/stable_norm.cpp
index 4480c5203..d78496fc3 100644
--- a/test/stable_norm.cpp
+++ b/test/stable_norm.cpp
@@ -29,9 +29,12 @@ template<typename T> bool isNotNaN(const T& x)
return x==x;
}
+// workaround aggressive optimization in ICC
+template<typename T> EIGEN_DONT_INLINE T sub(T a, T b) { return a - b; }
+
template<typename T> bool isFinite(const T& x)
{
- return isNotNaN(x-x);
+ return isNotNaN(sub(x,x));
}
template<typename T> EIGEN_DONT_INLINE T copy(const T& x)