diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-02-21 16:17:58 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-02-21 16:17:58 +0100 |
commit | 8bee573a78108656135cdb44a126d9a17209a08b (patch) | |
tree | 698be16a94d9f2ea245dfd0912943524b6038fa0 | |
parent | fb1a29fed5ed37c96ead5babcb0050eb21b75d12 (diff) |
workaround ICC aggressive optimization
-rw-r--r-- | test/stable_norm.cpp | 5 |
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) |