Expand description
A crate to help you go wide.
This crate provides SIMD-compatible data types.
When possible, explicit SIMD is used with all the math operations here. As a fallback, the fact that all the lengths of a fixed length array are doing the same thing will often make LLVM notice that it should use SIMD instructions to complete the task. In the worst case, the code just becomes totally scalar (though the math is still correct, at least).
§Casting
The SIMD types implement the bytemuck::Pod trait, which means that it
is possible to do bitwise casts between SIMD types of the same size with
the bytemuck::cast() function and others. bytemuck is re-exported by
this crate for convenience.
This typically does not have much, if any, runtime overhead in optimized builds.
§Crate Features
std: This causes the feature to link tostd.- Currently this just improves the performance of
sqrtwhen an explicit SIMDsqrtisn’t available.
- Currently this just improves the performance of
Re-exports§
pub use bytemuck;
Structs§
- f32x4
- f32x8
- f32x16
- f64x2
- f64x4
- f64x8
- i8x16
- i8x32
- i16x8
- i16x16
- i16x32
- i32x4
- i32x8
- i32x16
- i64x2
- i64x4
- i64x8
- u8x16
- u8x32
- u16x8
- u16x16
- u16x32
- u32x4
- u32x8
- u32x16
- u64x2
- u64x4
- u64x8