diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2015-10-10 00:36:20 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2015-10-10 00:43:33 +0200 |
commit | fbf549b9c2912a356dfeb71f3a411874879c9556 (patch) | |
tree | 36c9912a8915d603d216c47ba9b66c918070cf9e | |
parent | a62abc814584047e22a630c92fe355783a5e9fc7 (diff) | |
download | numpy-fbf549b9c2912a356dfeb71f3a411874879c9556.tar.gz |
BUG: mask nan to 1 in ordered compare
msvc2008 32 bit seems to miscompile it otherwise.
closes gh-6428
-rw-r--r-- | numpy/core/src/umath/simd.inc.src | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/core/src/umath/simd.inc.src b/numpy/core/src/umath/simd.inc.src index 7652f18c5..48c29483f 100644 --- a/numpy/core/src/umath/simd.inc.src +++ b/numpy/core/src/umath/simd.inc.src @@ -536,11 +536,13 @@ sse2_compress4_to_byte_@TYPE@(@vtype@ r1, @vtype@ r2, @vtype@ r3, @vtype@ * r4, static NPY_INLINE int sse2_ordered_cmp_@kind@_@TYPE@(const @type@ a, const @type@ b) { + @vtype@ one = @vpre@_set1_@vsuf@(1); @type@ tmp; @vtype@ v = @vpre@_@VOP@_@vsufs@(@vpre@_load_@vsufs@(&a), @vpre@_load_@vsufs@(&b)); + v = @vpre@_and_@vsuf@(v, one); @vpre@_store_@vsufs@(&tmp, v); - return !(tmp == 0.); + return tmp; } static void |