-
Notifications
You must be signed in to change notification settings - Fork 2.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
[stdlib] Constrain simd.bool()
to size == 1
#2502
Conversation
Actually, I wish they were called |
i was thinking the same thing, but they can be separate to avoid bitwise ambiguity |
Just a quick update here: this has been approved internally, but I need to go fix up more uses internally this breaks before we can land it. |
I was about to try adding edit: I did it anyway, but can't open the pr till I get online... |
I thought there was something else that should get done before |
a2d125b
to
4ceb858
Compare
Signed-off-by: Max Brylski <helehex@gmail.com>
4ceb858
to
bb3de08
Compare
[External] [stdlib] Add builtin `any()`/`all()` functions Adds builtin functions for testing if there are truthy elements in `List`, `Set`, `SIMD`. Should change to check iterators eventually. Also mentioned [here](#2502) --------- Co-authored-by: Helehex <Helehex@gmail.com> Closes #2600 MODULAR_ORIG_COMMIT_REV_ID: 894768635c30c41fa359a69e5110b60adce735f8
[External] [stdlib] Add builtin `any()`/`all()` functions Adds builtin functions for testing if there are truthy elements in `List`, `Set`, `SIMD`. Should change to check iterators eventually. Also mentioned [here](modularml#2502) --------- Co-authored-by: Helehex <Helehex@gmail.com> Closes modularml#2600 MODULAR_ORIG_COMMIT_REV_ID: 894768635c30c41fa359a69e5110b60adce735f8 Signed-off-by: Lukas Hermann <lukashermann28@gmail.com>
✅🟣 This contribution has been merged 🟣✅ Your pull request has been merged to the internal upstream Mojo sources. It will be reflected here in the Mojo repository on the nightly branch during the next Mojo nightly release, typically within the next 24-48 hours. We use Copybara to merge external contributions, click here to learn more. |
Landed in a31a0e6! Thank you for your contribution 🎉 |
[External] [stdlib] Add builtin `any()`/`all()` functions Adds builtin functions for testing if there are truthy elements in `List`, `Set`, `SIMD`. Should change to check iterators eventually. Also mentioned [here](modularml#2502) --------- Co-authored-by: Helehex <Helehex@gmail.com> Closes modularml#2600 MODULAR_ORIG_COMMIT_REV_ID: 894768635c30c41fa359a69e5110b60adce735f8
[External] [stdlib] Constrain `simd.bool()` to `size == 1` Use explicit `reduce_or()`/`reduce_and()` instead See modularml#2412. Co-authored-by: Helehex <Helehex@gmail.com> Closes modularml#2502 MODULAR_ORIG_COMMIT_REV_ID: b0e954912430469a9a60fb73ea46a4e7edf96964
…bitwise operations (#40348) [External] [stdlib] Change `SIMD.reduce_and()`/`SIMD.reduce_or()` to bitwise operations changes the behavior of simd `reduce_and()`/`reduce_or()` to be bitwise operations. Theres a few things that are related to this: [builtin `any()`/`all()` functions](#2600) [constrain simd bool to size=1](#2502) Co-authored-by: Helehex <Helehex@gmail.com> Closes #2671 MODULAR_ORIG_COMMIT_REV_ID: 1ab75b0817529420ea8dd4baf3014ea97dc162ad
[External] [stdlib] Add builtin `any()`/`all()` functions Adds builtin functions for testing if there are truthy elements in `List`, `Set`, `SIMD`. Should change to check iterators eventually. Also mentioned [here](modularml#2502) --------- Co-authored-by: Helehex <Helehex@gmail.com> Closes modularml#2600 MODULAR_ORIG_COMMIT_REV_ID: 894768635c30c41fa359a69e5110b60adce735f8
[External] [stdlib] Constrain `simd.bool()` to `size == 1` Use explicit `reduce_or()`/`reduce_and()` instead See modularml#2412. Co-authored-by: Helehex <Helehex@gmail.com> Closes modularml#2502 MODULAR_ORIG_COMMIT_REV_ID: b0e954912430469a9a60fb73ea46a4e7edf96964
…bitwise operations (#40348) [External] [stdlib] Change `SIMD.reduce_and()`/`SIMD.reduce_or()` to bitwise operations changes the behavior of simd `reduce_and()`/`reduce_or()` to be bitwise operations. Theres a few things that are related to this: [builtin `any()`/`all()` functions](modularml#2600) [constrain simd bool to size=1](modularml#2502) Co-authored-by: Helehex <Helehex@gmail.com> Closes modularml#2671 MODULAR_ORIG_COMMIT_REV_ID: 1ab75b0817529420ea8dd4baf3014ea97dc162ad
Use explicit
reduce_or()
/reduce_and()
insteadsee #2412