-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
Rust now RustFFT relies on #[target_feature=...] unsafe fn functions for runtime detection of SSE and AVX. This obscures which operations are actually unsafe, such as loads/stores by raw pointer, and which are perfectly safe as long as the CPU supports the required instructions.
Rust 1.86 has stabilized the target-feature-1.1 RFC. Starting with Rust 1.86 it is no longer necessary to use unsafe fn for functions annotated with #[target_feature=...]. They are safe to call as long as they are being called from a context with the same target features, so e.g. AVX functions can freely call other AVX functions without unsafe.
Removing the now-redundant unsafe would make the codebase much easier to understand and audit.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels