-
Notifications
You must be signed in to change notification settings - Fork 99
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
Fix radix test failure involving integer sign #561
Conversation
Now, serial radix sorts enforce that the key is unsigned. This was really the assumption all along (that values were always nonnegative).
Bowman PR: blas trsm tests failing due to #559, unrelated to these changes
RIDE PR: failures are due to #344 (also unrelated)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @brian-kelley !
Can we add documentation for sorting routines in the internal repo ? |
@brian-kelley did this get tested with Tpetra? I'm assuming this may impact |
@ndellingwood Hmm, I didn't try it with Tpetra. But it doesn't call the sort functions directly so it should be fine. Spadd is currently the only place where these sorts are called, but I would like to update Tpetra::Details::sortCrsEntries to use them. |
Now, the serial radix sorts enforce at compile time that the key is an unsigned integer.
This was really the assumption all along (that values were always
nonnegative). No longer adding a bias to the keys while sorting, since all the keys are at least 0.
This was causing the char radix sort unit test to fail in an OpenMP debug configuration - I think because of undefined overflow behavior when the chars were normalized from range (min, max) to range (0, max-min). This PR sorts only nonnegative chars and reinterprets as
unsigned char
, which is safe.