-
Notifications
You must be signed in to change notification settings - Fork 11
Introduce semantic conversion traits #31
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
Conversation
1b0786f
to
28aba20
Compare
Open question: Should this supplant |
28aba20
to
cbafbac
Compare
Discussion about this proposal: https://xi.zulipchat.com/#narrow/channel/514230-simd/topic/Ergonomic.20native-width.20conversions |
3a57607
to
5b83500
Compare
5b83500
to
80b5c5c
Compare
Second draft:
I don't like the trait or primitive method names much at all; please bikeshed. Especially "float" as a verb feels bad. |
788569b
to
39df826
Compare
Tweaked naming, factored out common generation logic, and expanded to a superset of existing conversion operations. I think this is ready now, though still happy to brainstorm on better names. |
39df826
to
f9f9141
Compare
1f94ffd
to
7a9bd6d
Compare
Reworked to allow conversions for e.g. |
d26ca59
to
eed1d41
Compare
Sorry for the lack of communication – I plan to discuss this PR and proposal at the next Renderer office hours. Thank you for your excellent work! |
eed1d41
to
b1b3115
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raised this PR at the Linebender Renderer Office Hours and we have consensus to move forward with names as currently written. I love the direction of this PR. We discussed not worrying too much about bike-shedding as fearless_simd is still very early and we can always make a breaking change in these early days if we find something doesn't work well for us.
One minor complexity is that I think you need to rebase this PR and make sure that the code generator output is updated to reflect the latest main
branch.
Thank you thank you!
b1b3115
to
6d2898b
Compare
Rebased and regenerated. |
Whoops, needs some tweaks to handle i64. |
6d2898b
to
27b6088
Compare
27b6088
to
cc4e07d
Compare
We don't actually have u/i64xN yet, so I've just masked those cases off for now. |
Thanks! |
This proposes a generic API for conversions between vectors of the same element size and count, usable on generic native-width vectors. If I get positive feedback I'll fill out some more cases before merging.