Module vek::simd_traits

source ·
Expand description

SIMD traits; they are useful when the features “repr_simd” and “platform_intrinsics” are enabled.

Traits

This trait should be implemented by scalar types, vectors of which are supported by SIMD intrinsics. For instance, i16 and f32 can implement this trait, as well as #[repr(transparent)] wrappers of these, but not hand-built numeric types.
Implemented by unsigned integer types that can represent the result of SIMD comparison elements: semantically, these are booleans, but in their representation, zero is false and any other value is true. Typically, SIMD comparison of two vectors will yield a vector of mask elements, on which you can call reduce_and() or reduce_or().