summaryrefslogtreecommitdiffstats
path: root/vec_sse_float4.h
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-07-02 22:34:42 -0400
committerErik Schnetter <schnetter@gmail.com>2013-07-02 22:34:42 -0400
commite4fbcb8815d919662b9c100e7e2aed1ab5599add (patch)
tree4737af6bf9d00d67de0258b936a0a18cd7d1c64a /vec_sse_float4.h
parent9545770072d5e3c4cc4fd2ad0bff37e8bb93d20f (diff)
downloadvecmathlib-e4fbcb8815d919662b9c100e7e2aed1ab5599add.zip
vecmathlib-e4fbcb8815d919662b9c100e7e2aed1ab5599add.tar.gz
Correct isnan on x86; improve isnan on other architectures
Diffstat (limited to 'vec_sse_float4.h')
-rw-r--r--vec_sse_float4.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/vec_sse_float4.h b/vec_sse_float4.h
index 2163e09..366c7bb 100644
--- a/vec_sse_float4.h
+++ b/vec_sse_float4.h
@@ -550,7 +550,14 @@ namespace vecmathlib {
intvec_t ilogb() const { return MF::vml_ilogb(*this); }
boolvec_t isfinite() const { return MF::vml_isfinite(*this); }
boolvec_t isinf() const { return MF::vml_isinf(*this); }
- boolvec_t isnan() const { return _mm_cmpunord_ps(v, v);; }
+ boolvec_t isnan() const
+ {
+#if defined VML_HAVE_NAN
+ return _mm_cmpunord_ps(v, v);
+#else
+ return BV(false);
+#endif
+ }
boolvec_t isnormal() const { return MF::vml_isnormal(*this); }
realvec ldexp(int_t n) const { return MF::vml_ldexp(*this, n); }
realvec ldexp(intvec_t n) const { return MF::vml_ldexp(*this, n); }
OpenPOWER on IntegriCloud