Skip to content
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] Apply any()/all() for SIMD cases #2735

Closed
wants to merge 1 commit into from

Conversation

helehex
Copy link
Contributor

@helehex helehex commented May 18, 2024

Switch to using the builtin any()/all() functions instead of SIMD.reduce_and()/SIMD.reduce_or() where applicable. This simplifies the code and reads very nice.
I tested the mandelbrot notebook example to ensure it still works.

@helehex helehex requested review from jackos and a team as code owners May 18, 2024 09:01
@helehex
Copy link
Contributor Author

helehex commented May 18, 2024

oh, should i have ran the notebook once after clearing the outputs? i noticed the large -diff

Copy link
Collaborator

@JoeLoser JoeLoser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup! Don't worry about the metatdata of the notebook. We're not always great about clearing the cells prior to it being checked in. That's one of the problems of checking in ipynb into version control if you're not careful.

@JoeLoser JoeLoser self-assigned this May 21, 2024
@JoeLoser
Copy link
Collaborator

!sync

@modularbot modularbot added the imported-internally Signals that a given pull request has been imported internally. label May 21, 2024
Signed-off-by: Max Brylski <helehex@gmail.com>
@JoeLoser
Copy link
Collaborator

!sync

@modularbot
Copy link
Collaborator

✅🟣 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.

@modularbot modularbot added merged-internally Indicates that this pull request has been merged internally merged-externally Merged externally in public mojo repo labels May 21, 2024
@modularbot
Copy link
Collaborator

Landed in ee0bd6e! Thank you for your contribution 🎉

modularbot pushed a commit that referenced this pull request May 22, 2024
[External] [stdlib] Apply `any()`/`all()` for `SIMD` cases

Switch to using the builtin `any()`/`all()` functions instead of
`SIMD.reduce_and()`/`SIMD.reduce_or()` where applicable.
This simplifies the code *and* reads very nice.

I tested the mandelbrot notebook example to ensure it still works.

Co-authored-by: Helehex <Helehex@gmail.com>
Closes #2735
MODULAR_ORIG_COMMIT_REV_ID: d08203ce31e7d654c29bf09441845e2e1ed007dd
@modularbot modularbot closed this May 22, 2024
martinvuyk pushed a commit to martinvuyk/mojo that referenced this pull request May 24, 2024
[External] [stdlib] Apply `any()`/`all()` for `SIMD` cases

Switch to using the builtin `any()`/`all()` functions instead of
`SIMD.reduce_and()`/`SIMD.reduce_or()` where applicable.
This simplifies the code *and* reads very nice.

I tested the mandelbrot notebook example to ensure it still works.

Co-authored-by: Helehex <Helehex@gmail.com>
Closes modularml#2735
MODULAR_ORIG_COMMIT_REV_ID: d08203ce31e7d654c29bf09441845e2e1ed007dd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported-internally Signals that a given pull request has been imported internally. merged-externally Merged externally in public mojo repo merged-internally Indicates that this pull request has been merged internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants