-
Notifications
You must be signed in to change notification settings - Fork 330
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
Zero masked arithmetic operations #2426
Zero masked arithmetic operations #2426
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
439cc55
to
3ab06f2
Compare
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.
Nice :)
Remove OrZero suffixes for consistency Rename MaskedDIvide for consistency Rename HWY_SVE_RETV_ARGMVVZ etc. for consistency Undef all new macros at end of file Remove unused macro Remove unnecessary wrapper functions Remove MulLower, the rest of this implementation is in google#2429 Remove docs for ops not in this branch Add missing MaskedMax op Consolidate MulAdd tests
a927dd0
to
b4c66f7
Compare
This one also failed due to a shadowed local variable at masked_arithmetic_test.cc:636, sorry I didn't see that. |
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.
Shadowed variable at masked_arithmetic_test.cc:636.
CI looks good, hopefully will be merged soon. |
Introduces:
Max(a, b)[i]
orzero
ifm[i]
is falsea[i] + b[i]
or0
ifm[i]
is false.a[i] - b[i]
or0
ifm[i]
is false.a[i] * b[i]
or0
ifm[i]
is false.a[i] / b[i]
or0
ifm[i]
is false.a[i] + b[i]
saturated to the minimum/maximum representable value, or0
if m[i]` is false.a[i] - b[i]
saturated to the minimum/maximum representable value, or0
if m[i]` is false.0
ifm[i]
is false.a[i] * b[i] + c[i]
or0
ifm[i]
is false.-a[i] * b[i] + c[i]
or0
ifm[i]
is false.a
andb
toTFromD<D>
and computesa[2*i+1]*b[2*i+1] + a[2*i+0]*b[2*i+0]
, or0
ifm[i]
is false.Testing is included for all operations where both the masking and the underlying operation is tested.