-
Notifications
You must be signed in to change notification settings - Fork 83
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
Make sure we don't miss any other trait methods that people expect to be lanewise instead #257
Comments
I'll note that LLVM has vector intrinsics for integer min/max now: https://llvm.org/docs/LangRef.html#llvm-smax-intrinsic |
Why is |
masks are effectively a list of bools, doesn't make sense to clamp them really. |
because the list is whatever stuff i felt like adding at the time...it still needs to be filled out. |
That would be an argument for not having
Okay. :) Given that it was listed for integers, not having it listed for masks looked like a deliberate decision. |
I made the list formatted nice and I left clamp out because my brain failed to parse what clamp even does on, yes, a "vector of bools". |
clamp is defined the moment max and min are defined, so if you can imagine max and min on bools then just derive clamp from that. ;) fn clamp(self, lo, up) { self.max(lo).min(up) } I think it would be a mistake to overload |
This is now done via the |
we currently have min/max (#247) and clamp (#253) that are missing from Simd for integers, we should go through all the trait methods for std traits implemented by Simd and Mask and ensure that users get the appropriate lanewise version where expected.
incomplete list (edit as needed):
Integers
...
Masks
...
The text was updated successfully, but these errors were encountered: