-
Notifications
You must be signed in to change notification settings - Fork 25
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
Opt-in std::simd
support
#37
Comments
"Using experimental, unstable, nightly-only features to get less unsafe implementation." I looked through |
It's not like the portable SIMD implementation is incomplete, it's just that the API stability is not guaranteed yet. That's the same situation in which
Ah, yes, that could be a problem. There might be a pattern of several higher-level operations that the compiler will recognize and optimize down into a single instruction. Or there might not. Gotta play around with godbolt and see. |
I'm afraid there will be different patterns for different architectures. And these patterns may be unstable and change from one version of Rust to another. I may try to do what you want, but I can't promise I'll do it soon. Right now I want to add support for multi-threading. |
That's fair! I don't expect it will fully replace the existing handwritten SIMD for every platform. More like, it will provide something in between no simd at all and platform-specific unsafe intrinsics. Thank you for considering this request! |
The
std::simd
module provides a safe, portable API for SIMD. Together with themultiversion
crate it allows for SIMD that works from a single source file on every platform, and entirely in safe code!The drawback is that it is nightly-only, and still technically unstable despite not having changed in quite some time. It would be great to add support for it and expose this as an opt-in feature, e.g.
nightly-portable-simd
. While the platform coverage of this crate is already outstanding, this would allow people on nightly channel to use an implementation with less unsafe code.The text was updated successfully, but these errors were encountered: