-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
ENH: Add min values comparison for floating point #18882
Conversation
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.
LGTM, Thank you!
close/open to re-run travis-ci. |
This seems to be a follow-on PR to adding max value comparison. Which PR was that? |
ahh, #18863 |
@@ -390,6 +390,8 @@ SIMD_IMPL_INTRIN_1(@intrin@_@sfx@, v@sfx@, v@sfx@) | |||
#if @fp_only@ | |||
SIMD_IMPL_INTRIN_2(max_@sfx@, v@sfx@, v@sfx@, v@sfx@) | |||
SIMD_IMPL_INTRIN_2(maxp_@sfx@, v@sfx@, v@sfx@, v@sfx@) | |||
SIMD_IMPL_INTRIN_2(min_@sfx@, v@sfx@, v@sfx@, v@sfx@) | |||
SIMD_IMPL_INTRIN_2(minp_@sfx@, v@sfx@, v@sfx@, v@sfx@) |
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.
style nit: just above there is a repeat clause for 4 values, here all 4 are spelled out explicitly. Can we unify the approach?
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.
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.
So let me refactor to this way
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.
done
I understand correctly that these two PRs only add the intrinsic, there will be a follow-on one to use it? |
|
9a97e80
to
a70e5eb
Compare
Add the similar implementation for minimum value comparison.
Thanks @howjmay |
Thank you @mattip and @seiko2plus |
@howjmay, |
""" | ||
Test intrinics: | ||
npyv_max_##SFX | ||
npyv_maxp_##SFX | ||
""" |
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.
I didn't see these changes during my latest review.
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.
Sorry for removing this accidentally
I will fix this in the following PR of maximum and minimum
@@ -346,6 +341,31 @@ def test_max(self): | |||
_max = self.max(vdata_a, vdata_b) | |||
assert _max == data_max | |||
|
|||
def test_min(self): |
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.
the following are missing too
"""
Test intrinics:
npyv_min_##SFX
npyv_minp_##SFX
"""
I think these changes made during your latest push
Add the similar implementation for minimum value comparison.