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] Add unit tests for the SIMD __rfloordiv__() method and constraint check on the element types #2415

Closed
1 task done
peymanbr opened this issue Apr 26, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request mojo Issues that are related to mojo mojo-repo Tag all issues with this label mojo-stdlib Tag for issues related to standard library

Comments

@peymanbr
Copy link

Review Mojo's priorities

What is your request?

The Int and Object types support rfloordiv. I added this method to the SIMD type in this PR:
#2414

What is your motivation for this change?

Extending the SIMD type to support more math operations.

Any other details?

No response

@peymanbr peymanbr added enhancement New feature or request mojo Issues that are related to mojo labels Apr 26, 2024
@peymanbr
Copy link
Author

Since the SIMD type already includes mod() and rmod(), I have added rfloordiv() for greater comprehensiveness in built-in types. Additionally, the Int and Object types also support this method.
@JoeLoser I would appreciate it if you could assign this issue to me and review the PR.

@gryznar
Copy link
Contributor

gryznar commented Apr 26, 2024

This issue is missing title :)

@peymanbr peymanbr changed the title [Feature Request] [Feature Request] Add __rfloordiv__() to SIMD type Apr 26, 2024
@peymanbr peymanbr changed the title [Feature Request] Add __rfloordiv__() to SIMD type [Feature Request] Add __rfloordiv__() to SIMD type Apr 27, 2024
@JoeLoser JoeLoser added the mojo-stdlib Tag for issues related to standard library label Apr 28, 2024
@StandinKP
Copy link

I will take this up if noone is working on this.

@peymanbr
Copy link
Author

It's already assigned to me and there is a PR for the issue.

@StandinKP
Copy link

Oh. Np I couldn't see any PR in this thread. Didn't see it was already assigned🤟🏻

@ematejska ematejska added the mojo-repo Tag all issues with this label label Apr 29, 2024
@ematejska ematejska removed the mojo-stdlib Tag for issues related to standard library label May 3, 2024
@ematejska ematejska added the mojo-stdlib Tag for issues related to standard library label May 3, 2024 — with Linear
peymanbr pushed a commit to peymanbr/mojo that referenced this issue May 3, 2024
The __rfloordiv__() method is already supported by Int and Object.
The built-in SIMD includes support for reverse division operators,
specifically __rtruediv__() and __rmod__(). Furthermore, the SIMD
library has been extended to also support __rfloordiv__().

Fixes: modularml#2415

Signed-off-by: Peyman Barazandeh <peymanb@gmail.com>
peymanbr added a commit to peymanbr/mojo that referenced this issue May 3, 2024
The __rfloordiv__() method is already supported by Int and Object.
The built-in SIMD includes support for reverse division operators,
specifically __rtruediv__() and __rmod__(). Furthermore, the SIMD
library has been extended to also support __rfloordiv__().

Fixes: modularml#2415

Signed-off-by: Peyman Barazandeh <peymanb@gmail.com>
@ematejska ematejska removed the mojo-stdlib Tag for issues related to standard library label May 6, 2024
@ematejska ematejska added the mojo-stdlib Tag for issues related to standard library label May 6, 2024 — with Linear
@gabrieldemarmiesse
Copy link
Contributor

Maybe we can close this PR as this has already been implemented in f5aee40 ?

@peymanbr peymanbr changed the title [Feature Request] Add __rfloordiv__() to SIMD type [stdlib] Add unit tests for the SIMD __rfloordiv__() method and constraint check on the element types May 7, 2024
@peymanbr
Copy link
Author

peymanbr commented May 7, 2024

In #2414 I added unit tests and the constraint check for __rfloordiv_ method that was added in f5aee40
and changed the issue's title.

@peymanbr peymanbr closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mojo Issues that are related to mojo mojo-repo Tag all issues with this label mojo-stdlib Tag for issues related to standard library
Projects
None yet
Development

No branches or pull requests

6 participants