Skip to main content

Module aligned

Module aligned 

Source
Expand description

Enforced-alignment vector types.

Aligned4 through Aligned64 are siblings of Simd: fixed-length lane vectors over [T; N] that share one implementation with it — every impl block in this crate is written once and instantiated for Simd and the five aligned types together, so the whole operation surface is identical across the six types. The only difference is the enforced byte alignment of 4/8/16/32/64.

The concrete aliases (f64x8, …) pick the type whose alignment is the vector’s byte size rounded up to a power of two, capped at 64 bytes. Conversions between plain and aligned vectors are From/.0/ to_simd.

Masks (Simd<bool, N>) are never aligned: they are register-resident temporaries. Comparisons on any vector type return plain masks, and per-lane selection is value.mask_select(mask, other).

Structs§

Aligned4
A fixed-length vector of N lanes of element type T over [T; N] with enforced 4-byte alignment; see the module docs.
Aligned8
A fixed-length vector of N lanes of element type T over [T; N] with enforced 8-byte alignment; see the module docs.
Aligned16
A fixed-length vector of N lanes of element type T over [T; N] with enforced 16-byte alignment; see the module docs.
Aligned32
A fixed-length vector of N lanes of element type T over [T; N] with enforced 32-byte alignment; see the module docs.
Aligned64
A fixed-length vector of N lanes of element type T over [T; N] with enforced 64-byte alignment; see the module docs.