8000 Backport gh-6438: BUG: mask nan to 1 in ordered compare by charris · Pull Request #6447 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Backport gh-6438: BUG: mask nan to 1 in ordered compare #6447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
BUG: mask nan to 1 in ordered compare
msvc2008 32 bit seems to miscompile it otherwise.
closes gh-6428
  • Loading branch information
juliantaylor authored and charris committed Oct 11, 2015
commit 04211c681222442933ca4fa276efcc10f1666e2b
4 changes: 3 additions & 1 deletion numpy/core/src/umath/simd.inc.src
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,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
Expand Down
0