Skip to content
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

Correct documentation on NaN behavior #73

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

zbjornson
Copy link
Contributor

This fixes the readme to reflect the current actual behavior. avx512_qsort behaves differently from argsort and qselect, and I'm not sure if that's intentional. #49 changed the behavior to move the bit-exact NaNs to the end of the array for those two functions only.

I also reworded it to state that the behavior is undefined if hasbool=false but the input has NaNs. That's the case because:

  • If the fallback to std::sort is encountered, there's no defined behavior w.r.t. NaNs.
  • The bitonic networks use vminps/vmaxps, which produce the second operand if one operand is NaN, and which value is the second operand varies.

Copy link
Contributor

@r-devulap r-devulap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing it!

@r-devulap r-devulap merged commit 527248c into intel:main Sep 14, 2023
4 checks passed
@zbjornson zbjornson deleted the zb/nan-readme branch September 14, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants