Skip to content

Add Simd::cast #232

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

Merged
merged 2 commits into from
Jan 27, 2022
Merged

Add Simd::cast #232

merged 2 commits into from
Jan 27, 2022

Conversation

workingjubilee
Copy link
Member

We've gotten a few requests for some kind of cast, and I needed a reason to force myself to work through learning about 2FA hardware keys. I know there's been some discussion about what exactly to do, but I believe we were drifting in the direction of providing this function?

Also, thanks @calebzulawski for implementing the saturating intrinsic!

@calebzulawski
Copy link
Member

Could you add a test for this? I know it uses the same conversion code as as, but I'd like to guarantee it.

@programmerjake
Copy link
Member

you could remove round_from_int afaict because it's functionality is completely supplanted by cast

@programmerjake
Copy link
Member

also to_int_unchecked should be generic over return type

@workingjubilee
Copy link
Member Author

Yes, I was thinking "hm, do I want to touch fn round_from_int?" but then I realized I didn't have a good vibe anymore for how strong the consensus was around fn round_from_int and fn to_int_unchecked, so I was going to bring that up at our next sync.

@programmerjake
Copy link
Member

ok, let's just merge this PR as is then, and handle to_int_unchecked and round_from_int in separate PR(s).

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.

3 participants