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

Move element-specific functions to traits #278

Merged
merged 4 commits into from
May 31, 2022
Merged

Conversation

calebzulawski
Copy link
Member

@calebzulawski calebzulawski commented Apr 15, 2022

This serves a few purposes:

  • Deduplicates functions that are reimplemented for each element type (the docs are dramatically better)
  • Distinguishes between functions on particular element types and functions that work on any element type (also helps docs)
  • Distinguishes between functions that are slightly different between different elements (like abs)

I believe this should close #85 and #228 (and maybe #15 as well)

Copy link
Member

@programmerjake programmerjake left a comment

Choose a reason for hiding this comment

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

Other than 1 nit, lgtm!

crates/core_simd/src/elements/float.rs Outdated Show resolved Hide resolved
@calebzulawski
Copy link
Member Author

Just upgraded the bound from Sized to Copy since some of the functions take self rather than &self (and clippy helpfully gave a warning)

@calebzulawski
Copy link
Member Author

@workingjubilee do you mind if I merge this?

@calebzulawski calebzulawski mentioned this pull request May 21, 2022
@calebzulawski calebzulawski merged commit c44a608 into master May 31, 2022
@calebzulawski calebzulawski deleted the feature/simd-traits branch October 17, 2022 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve rustdoc views
2 participants