pub trait SimdArch:
Sealed
+ Send
+ Sync
+ 'static
+ Copy
+ Clone {
const NAME: &'static str;
const REGISTER_WIDTH_BITS: u32;
const ISA_FAMILY: IsaFamily;
const FMA_THROUGHPUT_HINT: u32;
// Required method
fn is_runtime_supported() -> bool;
}Expand description
Trait representing a SIMD instruction set architecture.
Implemented by Zero-Sized Types (ZSTs). Constants are queryable without a scalar
type parameter — contrast with SimdKernel<T> which requires T to be known.
Required Associated Constants§
Sourceconst REGISTER_WIDTH_BITS: u32
const REGISTER_WIDTH_BITS: u32
Width of vector registers in bits.
| Architecture | Width |
|---|---|
Scalar | 0 |
Neon | 128 |
Avx2 | 256 |
Avx512 | 512 |
Sourceconst ISA_FAMILY: IsaFamily
const ISA_FAMILY: IsaFamily
ISA family for this architecture.
Sourceconst FMA_THROUGHPUT_HINT: u32
const FMA_THROUGHPUT_HINT: u32
Suggested TILE_M value for tiled_dot to saturate FMA throughput.
This is a hint, not a constraint. Optimal values:
Scalar: 1 (no tiling benefit)Neon: 4 (4 NEON regs × 4-cycle FMA latency)Avx2: 4 (16 YMM / TILE_M=4 leaves headroom for loop overhead)Avx512: 8 (32 ZMM / TILE_M=8 saturates two FMA ports)
Required Methods§
Sourcefn is_runtime_supported() -> bool
fn is_runtime_supported() -> bool
Returns true when the current host may execute this architecture’s native instructions from safe wrappers.
Emulated backends return true; native ISA backends must include the
OS-enabled register-state checks covered by the platform feature probe.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".