Skip to content

Additional rounding functions #38

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

Closed
3 of 5 tasks
calebzulawski opened this issue Oct 13, 2020 · 3 comments
Closed
3 of 5 tasks

Additional rounding functions #38

calebzulawski opened this issue Oct 13, 2020 · 3 comments

Comments

@calebzulawski
Copy link
Member

calebzulawski commented Oct 13, 2020

round_to_int can't be directly implemented in LLVM, since llvm.lround doesn't work on vectors. I'm not sure this function is actually necessary since you can do x.round().to_int().

@workingjubilee
Copy link
Member

I am working on the PR that restores these.

@workingjubilee workingjubilee self-assigned this Apr 16, 2021
@calebzulawski
Copy link
Member Author

Regarding saturating int-to-float rounding:
rust-lang/stdarch#1194 (comment)

The name/semantics of simd_cast are confusing so I'd tend to agree. simd_cast should be safe to call on any vector types of the same lane count, and we should have a new intrinsic that does unsafe int-to-float casts.

@workingjubilee workingjubilee removed their assignment Feb 7, 2022
@workingjubilee
Copy link
Member

Closed by #232.

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

No branches or pull requests

2 participants