Skip to main content

Scalar

Struct Scalar 

Source
pub struct Scalar;
Expand description

Fallback scalar implementation marker.

Trait Implementations§

Source§

impl Clone for Scalar

Source§

fn clone(&self) -> Scalar

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Scalar

Source§

impl Debug for Scalar

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for Scalar

Source§

impl PartialEq for Scalar

Source§

fn eq(&self, other: &Scalar) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl SimdArch for Scalar

Source§

const NAME: &'static str = "scalar"

Human-readable ISA name ("avx2", "avx512", "neon", "scalar").
Source§

const REGISTER_WIDTH_BITS: u32 = 0

Width of vector registers in bits. Read more
Source§

const ISA_FAMILY: IsaFamily = hermes_simd_core::arch::IsaFamily::Scalar

ISA family for this architecture.
Source§

const FMA_THROUGHPUT_HINT: u32 = 1

Suggested TILE_M value for tiled_dot to saturate FMA throughput. Read more
Source§

fn is_runtime_supported() -> bool

Returns true when the current host may execute this architecture’s native instructions from safe wrappers. Read more
Source§

impl SimdKernel<Bf4> for Scalar

Source§

const LANE_COUNT: usize = 16

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [Bf4; 16]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 16]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 16]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const Bf4) -> <Scalar as SimdKernel<Bf4>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const Bf4) -> <Scalar as SimdKernel<Bf4>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut Bf4, val: <Scalar as SimdKernel<Bf4>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned( ptr: *mut Bf4, val: <Scalar as SimdKernel<Bf4>>::Vector, )

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<Bf4>>::Vector, b: <Scalar as SimdKernel<Bf4>>::Vector, ) -> <Scalar as SimdKernel<Bf4>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<Bf4>>::Vector, b: <Scalar as SimdKernel<Bf4>>::Vector, ) -> <Scalar as SimdKernel<Bf4>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<Bf4>>::Vector, b: <Scalar as SimdKernel<Bf4>>::Vector, ) -> <Scalar as SimdKernel<Bf4>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Scalar as SimdKernel<Bf4>>::Vector, ) -> <Scalar as SimdKernel<Bf4>>::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<Bf4>>::Vector, b: <Scalar as SimdKernel<Bf4>>::Vector, c: <Scalar as SimdKernel<Bf4>>::Vector, ) -> <Scalar as SimdKernel<Bf4>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<Bf4>>::Vector) -> Bf4

Horizontal sum of all lanes. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<Bf4>>::Vector, mask: <Scalar as SimdKernel<Bf4>>::Mask, ) -> <Scalar as SimdKernel<Bf4>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<Bf4>>::Vector, mask: <Scalar as SimdKernel<Bf4>>::Mask, fill: <Scalar as SimdKernel<Bf4>>::Vector, ) -> <Scalar as SimdKernel<Bf4>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const Bf4, indices: <Scalar as SimdKernel<Bf4>>::IndexVector, ) -> <Scalar as SimdKernel<Bf4>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const Bf4, indices: <Scalar as SimdKernel<Bf4>>::IndexVector, mask: <Scalar as SimdKernel<Bf4>>::Mask, src: <Scalar as SimdKernel<Bf4>>::Vector, ) -> <Scalar as SimdKernel<Bf4>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<Bf4>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<Bf4>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<Bf4>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: Bf4) -> <Scalar as SimdKernel<Bf4>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<Bf4>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<Bf4>>::Mask, ) -> <Scalar as SimdKernel<Bf4>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<Bf4>>::Vector, ) -> <Scalar as SimdKernel<Bf4>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut T, mask: Self::Mask, val: Self::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<Bf8> for Scalar

Source§

const LANE_COUNT: usize = 16

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [Bf8; 16]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 16]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 16]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const Bf8) -> <Scalar as SimdKernel<Bf8>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const Bf8) -> <Scalar as SimdKernel<Bf8>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut Bf8, val: <Scalar as SimdKernel<Bf8>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned( ptr: *mut Bf8, val: <Scalar as SimdKernel<Bf8>>::Vector, )

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<Bf8>>::Vector, b: <Scalar as SimdKernel<Bf8>>::Vector, ) -> <Scalar as SimdKernel<Bf8>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<Bf8>>::Vector, b: <Scalar as SimdKernel<Bf8>>::Vector, ) -> <Scalar as SimdKernel<Bf8>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<Bf8>>::Vector, b: <Scalar as SimdKernel<Bf8>>::Vector, ) -> <Scalar as SimdKernel<Bf8>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Scalar as SimdKernel<Bf8>>::Vector, ) -> <Scalar as SimdKernel<Bf8>>::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<Bf8>>::Vector, b: <Scalar as SimdKernel<Bf8>>::Vector, c: <Scalar as SimdKernel<Bf8>>::Vector, ) -> <Scalar as SimdKernel<Bf8>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<Bf8>>::Vector) -> Bf8

Horizontal sum of all lanes. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<Bf8>>::Vector, mask: <Scalar as SimdKernel<Bf8>>::Mask, ) -> <Scalar as SimdKernel<Bf8>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<Bf8>>::Vector, mask: <Scalar as SimdKernel<Bf8>>::Mask, fill: <Scalar as SimdKernel<Bf8>>::Vector, ) -> <Scalar as SimdKernel<Bf8>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const Bf8, indices: <Scalar as SimdKernel<Bf8>>::IndexVector, ) -> <Scalar as SimdKernel<Bf8>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const Bf8, indices: <Scalar as SimdKernel<Bf8>>::IndexVector, mask: <Scalar as SimdKernel<Bf8>>::Mask, src: <Scalar as SimdKernel<Bf8>>::Vector, ) -> <Scalar as SimdKernel<Bf8>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<Bf8>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<Bf8>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<Bf8>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: Bf8) -> <Scalar as SimdKernel<Bf8>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<Bf8>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<Bf8>>::Mask, ) -> <Scalar as SimdKernel<Bf8>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<Bf8>>::Vector, ) -> <Scalar as SimdKernel<Bf8>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut T, mask: Self::Mask, val: Self::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<Bf16> for Scalar

Source§

const LANE_COUNT: usize = 8

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [Bf16; 8]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 8]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 8]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const Bf16) -> <Scalar as SimdKernel<Bf16>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned( ptr: *const Bf16, ) -> <Scalar as SimdKernel<Bf16>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned( ptr: *mut Bf16, val: <Scalar as SimdKernel<Bf16>>::Vector, )

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned( ptr: *mut Bf16, val: <Scalar as SimdKernel<Bf16>>::Vector, )

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<Bf16>>::Vector, b: <Scalar as SimdKernel<Bf16>>::Vector, ) -> <Scalar as SimdKernel<Bf16>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<Bf16>>::Vector, b: <Scalar as SimdKernel<Bf16>>::Vector, ) -> <Scalar as SimdKernel<Bf16>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<Bf16>>::Vector, b: <Scalar as SimdKernel<Bf16>>::Vector, ) -> <Scalar as SimdKernel<Bf16>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Scalar as SimdKernel<Bf16>>::Vector, ) -> <Scalar as SimdKernel<Bf16>>::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<Bf16>>::Vector, b: <Scalar as SimdKernel<Bf16>>::Vector, c: <Scalar as SimdKernel<Bf16>>::Vector, ) -> <Scalar as SimdKernel<Bf16>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<Bf16>>::Vector) -> Bf16

Horizontal sum of all lanes. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<Bf16>>::Vector, mask: <Scalar as SimdKernel<Bf16>>::Mask, ) -> <Scalar as SimdKernel<Bf16>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<Bf16>>::Vector, mask: <Scalar as SimdKernel<Bf16>>::Mask, fill: <Scalar as SimdKernel<Bf16>>::Vector, ) -> <Scalar as SimdKernel<Bf16>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const Bf16, indices: <Scalar as SimdKernel<Bf16>>::IndexVector, ) -> <Scalar as SimdKernel<Bf16>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const Bf16, indices: <Scalar as SimdKernel<Bf16>>::IndexVector, mask: <Scalar as SimdKernel<Bf16>>::Mask, src: <Scalar as SimdKernel<Bf16>>::Vector, ) -> <Scalar as SimdKernel<Bf16>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<Bf16>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<Bf16>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<Bf16>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: Bf16) -> <Scalar as SimdKernel<Bf16>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<Bf16>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<Bf16>>::Mask, ) -> <Scalar as SimdKernel<Bf16>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<Bf16>>::Vector, ) -> <Scalar as SimdKernel<Bf16>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut T, mask: Self::Mask, val: Self::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<F4> for Scalar

Source§

const LANE_COUNT: usize = 16

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [F4; 16]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 16]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 16]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const F4) -> <Scalar as SimdKernel<F4>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const F4) -> <Scalar as SimdKernel<F4>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut F4, val: <Scalar as SimdKernel<F4>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned(ptr: *mut F4, val: <Scalar as SimdKernel<F4>>::Vector)

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<F4>>::Vector, b: <Scalar as SimdKernel<F4>>::Vector, ) -> <Scalar as SimdKernel<F4>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<F4>>::Vector, b: <Scalar as SimdKernel<F4>>::Vector, ) -> <Scalar as SimdKernel<F4>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<F4>>::Vector, b: <Scalar as SimdKernel<F4>>::Vector, ) -> <Scalar as SimdKernel<F4>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Scalar as SimdKernel<F4>>::Vector, ) -> <Scalar as SimdKernel<F4>>::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<F4>>::Vector, b: <Scalar as SimdKernel<F4>>::Vector, c: <Scalar as SimdKernel<F4>>::Vector, ) -> <Scalar as SimdKernel<F4>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<F4>>::Vector) -> F4

Horizontal sum of all lanes. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<F4>>::Vector, mask: <Scalar as SimdKernel<F4>>::Mask, ) -> <Scalar as SimdKernel<F4>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<F4>>::Vector, mask: <Scalar as SimdKernel<F4>>::Mask, fill: <Scalar as SimdKernel<F4>>::Vector, ) -> <Scalar as SimdKernel<F4>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const F4, indices: <Scalar as SimdKernel<F4>>::IndexVector, ) -> <Scalar as SimdKernel<F4>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const F4, indices: <Scalar as SimdKernel<F4>>::IndexVector, mask: <Scalar as SimdKernel<F4>>::Mask, src: <Scalar as SimdKernel<F4>>::Vector, ) -> <Scalar as SimdKernel<F4>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<F4>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<F4>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<F4>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: F4) -> <Scalar as SimdKernel<F4>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<F4>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<F4>>::Mask, ) -> <Scalar as SimdKernel<F4>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<F4>>::Vector, ) -> <Scalar as SimdKernel<F4>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut T, mask: Self::Mask, val: Self::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<F8> for Scalar

Source§

const LANE_COUNT: usize = 16

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [F8; 16]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 16]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 16]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const F8) -> <Scalar as SimdKernel<F8>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const F8) -> <Scalar as SimdKernel<F8>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut F8, val: <Scalar as SimdKernel<F8>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned(ptr: *mut F8, val: <Scalar as SimdKernel<F8>>::Vector)

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<F8>>::Vector, b: <Scalar as SimdKernel<F8>>::Vector, ) -> <Scalar as SimdKernel<F8>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<F8>>::Vector, b: <Scalar as SimdKernel<F8>>::Vector, ) -> <Scalar as SimdKernel<F8>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<F8>>::Vector, b: <Scalar as SimdKernel<F8>>::Vector, ) -> <Scalar as SimdKernel<F8>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Scalar as SimdKernel<F8>>::Vector, ) -> <Scalar as SimdKernel<F8>>::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<F8>>::Vector, b: <Scalar as SimdKernel<F8>>::Vector, c: <Scalar as SimdKernel<F8>>::Vector, ) -> <Scalar as SimdKernel<F8>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<F8>>::Vector) -> F8

Horizontal sum of all lanes. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<F8>>::Vector, mask: <Scalar as SimdKernel<F8>>::Mask, ) -> <Scalar as SimdKernel<F8>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<F8>>::Vector, mask: <Scalar as SimdKernel<F8>>::Mask, fill: <Scalar as SimdKernel<F8>>::Vector, ) -> <Scalar as SimdKernel<F8>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const F8, indices: <Scalar as SimdKernel<F8>>::IndexVector, ) -> <Scalar as SimdKernel<F8>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const F8, indices: <Scalar as SimdKernel<F8>>::IndexVector, mask: <Scalar as SimdKernel<F8>>::Mask, src: <Scalar as SimdKernel<F8>>::Vector, ) -> <Scalar as SimdKernel<F8>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<F8>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<F8>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<F8>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: F8) -> <Scalar as SimdKernel<F8>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<F8>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<F8>>::Mask, ) -> <Scalar as SimdKernel<F8>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<F8>>::Vector, ) -> <Scalar as SimdKernel<F8>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut T, mask: Self::Mask, val: Self::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<F16> for Scalar

Source§

const LANE_COUNT: usize = 8

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [F16; 8]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 8]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 8]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const F16) -> <Scalar as SimdKernel<F16>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const F16) -> <Scalar as SimdKernel<F16>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut F16, val: <Scalar as SimdKernel<F16>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned( ptr: *mut F16, val: <Scalar as SimdKernel<F16>>::Vector, )

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<F16>>::Vector, b: <Scalar as SimdKernel<F16>>::Vector, ) -> <Scalar as SimdKernel<F16>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<F16>>::Vector, b: <Scalar as SimdKernel<F16>>::Vector, ) -> <Scalar as SimdKernel<F16>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<F16>>::Vector, b: <Scalar as SimdKernel<F16>>::Vector, ) -> <Scalar as SimdKernel<F16>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<F16>>::Vector, b: <Scalar as SimdKernel<F16>>::Vector, c: <Scalar as SimdKernel<F16>>::Vector, ) -> <Scalar as SimdKernel<F16>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<F16>>::Vector) -> F16

Horizontal sum of all lanes. Read more
Source§

unsafe fn masked_load_unaligned( ptr: *const F16, mask: <Scalar as SimdKernel<F16>>::Mask, src: <Scalar as SimdKernel<F16>>::Vector, ) -> <Scalar as SimdKernel<F16>>::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut F16, mask: <Scalar as SimdKernel<F16>>::Mask, val: <Scalar as SimdKernel<F16>>::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: <Scalar as SimdKernel<F16>>::Vector, b: <Scalar as SimdKernel<F16>>::Vector, mask: <Scalar as SimdKernel<F16>>::Mask, src: <Scalar as SimdKernel<F16>>::Vector, ) -> <Scalar as SimdKernel<F16>>::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: <Scalar as SimdKernel<F16>>::Vector, b: <Scalar as SimdKernel<F16>>::Vector, mask: <Scalar as SimdKernel<F16>>::Mask, src: <Scalar as SimdKernel<F16>>::Vector, ) -> <Scalar as SimdKernel<F16>>::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: <Scalar as SimdKernel<F16>>::Vector, b: <Scalar as SimdKernel<F16>>::Vector, c: <Scalar as SimdKernel<F16>>::Vector, mask: <Scalar as SimdKernel<F16>>::Mask, ) -> <Scalar as SimdKernel<F16>>::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce( v: <Scalar as SimdKernel<F16>>::Vector, mask: <Scalar as SimdKernel<F16>>::Mask, ) -> F16

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<F16>>::Vector, mask: <Scalar as SimdKernel<F16>>::Mask, ) -> <Scalar as SimdKernel<F16>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<F16>>::Vector, mask: <Scalar as SimdKernel<F16>>::Mask, fill: <Scalar as SimdKernel<F16>>::Vector, ) -> <Scalar as SimdKernel<F16>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const F16, indices: <Scalar as SimdKernel<F16>>::IndexVector, ) -> <Scalar as SimdKernel<F16>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const F16, indices: <Scalar as SimdKernel<F16>>::IndexVector, mask: <Scalar as SimdKernel<F16>>::Mask, src: <Scalar as SimdKernel<F16>>::Vector, ) -> <Scalar as SimdKernel<F16>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<F16>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<F16>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<F16>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: F16) -> <Scalar as SimdKernel<F16>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<F16>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<F16>>::Mask, ) -> <Scalar as SimdKernel<F16>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<F16>>::Vector, ) -> <Scalar as SimdKernel<F16>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn neg(a: Self::Vector) -> Self::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<F32> for Scalar

Source§

const LANE_COUNT: usize = 4

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [F32; 4]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 4]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 4]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const F32) -> <Scalar as SimdKernel<F32>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const F32) -> <Scalar as SimdKernel<F32>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut F32, val: <Scalar as SimdKernel<F32>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned( ptr: *mut F32, val: <Scalar as SimdKernel<F32>>::Vector, )

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<F32>>::Vector, b: <Scalar as SimdKernel<F32>>::Vector, ) -> <Scalar as SimdKernel<F32>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<F32>>::Vector, b: <Scalar as SimdKernel<F32>>::Vector, ) -> <Scalar as SimdKernel<F32>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<F32>>::Vector, b: <Scalar as SimdKernel<F32>>::Vector, ) -> <Scalar as SimdKernel<F32>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Scalar as SimdKernel<F32>>::Vector, ) -> <Scalar as SimdKernel<F32>>::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<F32>>::Vector, b: <Scalar as SimdKernel<F32>>::Vector, c: <Scalar as SimdKernel<F32>>::Vector, ) -> <Scalar as SimdKernel<F32>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<F32>>::Vector) -> F32

Horizontal sum of all lanes. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<F32>>::Vector, mask: <Scalar as SimdKernel<F32>>::Mask, ) -> <Scalar as SimdKernel<F32>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<F32>>::Vector, mask: <Scalar as SimdKernel<F32>>::Mask, fill: <Scalar as SimdKernel<F32>>::Vector, ) -> <Scalar as SimdKernel<F32>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const F32, indices: <Scalar as SimdKernel<F32>>::IndexVector, ) -> <Scalar as SimdKernel<F32>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const F32, indices: <Scalar as SimdKernel<F32>>::IndexVector, mask: <Scalar as SimdKernel<F32>>::Mask, src: <Scalar as SimdKernel<F32>>::Vector, ) -> <Scalar as SimdKernel<F32>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<F32>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<F32>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<F32>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: F32) -> <Scalar as SimdKernel<F32>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<F32>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<F32>>::Mask, ) -> <Scalar as SimdKernel<F32>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<F32>>::Vector, ) -> <Scalar as SimdKernel<F32>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut T, mask: Self::Mask, val: Self::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<F64> for Scalar

Source§

const LANE_COUNT: usize = 2

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [F64; 2]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 2]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 2]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const F64) -> <Scalar as SimdKernel<F64>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const F64) -> <Scalar as SimdKernel<F64>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut F64, val: <Scalar as SimdKernel<F64>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned( ptr: *mut F64, val: <Scalar as SimdKernel<F64>>::Vector, )

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<F64>>::Vector, b: <Scalar as SimdKernel<F64>>::Vector, ) -> <Scalar as SimdKernel<F64>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<F64>>::Vector, b: <Scalar as SimdKernel<F64>>::Vector, ) -> <Scalar as SimdKernel<F64>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<F64>>::Vector, b: <Scalar as SimdKernel<F64>>::Vector, ) -> <Scalar as SimdKernel<F64>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Scalar as SimdKernel<F64>>::Vector, ) -> <Scalar as SimdKernel<F64>>::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<F64>>::Vector, b: <Scalar as SimdKernel<F64>>::Vector, c: <Scalar as SimdKernel<F64>>::Vector, ) -> <Scalar as SimdKernel<F64>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<F64>>::Vector) -> F64

Horizontal sum of all lanes. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<F64>>::Vector, mask: <Scalar as SimdKernel<F64>>::Mask, ) -> <Scalar as SimdKernel<F64>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<F64>>::Vector, mask: <Scalar as SimdKernel<F64>>::Mask, fill: <Scalar as SimdKernel<F64>>::Vector, ) -> <Scalar as SimdKernel<F64>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const F64, indices: <Scalar as SimdKernel<F64>>::IndexVector, ) -> <Scalar as SimdKernel<F64>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const F64, indices: <Scalar as SimdKernel<F64>>::IndexVector, mask: <Scalar as SimdKernel<F64>>::Mask, src: <Scalar as SimdKernel<F64>>::Vector, ) -> <Scalar as SimdKernel<F64>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<F64>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<F64>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<F64>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: F64) -> <Scalar as SimdKernel<F64>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<F64>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<F64>>::Mask, ) -> <Scalar as SimdKernel<F64>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<F64>>::Vector, ) -> <Scalar as SimdKernel<F64>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut T, mask: Self::Mask, val: Self::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<I8> for Scalar

Source§

const LANE_COUNT: usize = 16

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [I8; 16]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 16]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 16]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const I8) -> <Scalar as SimdKernel<I8>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const I8) -> <Scalar as SimdKernel<I8>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut I8, val: <Scalar as SimdKernel<I8>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned(ptr: *mut I8, val: <Scalar as SimdKernel<I8>>::Vector)

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<I8>>::Vector, b: <Scalar as SimdKernel<I8>>::Vector, ) -> <Scalar as SimdKernel<I8>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<I8>>::Vector, b: <Scalar as SimdKernel<I8>>::Vector, ) -> <Scalar as SimdKernel<I8>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<I8>>::Vector, b: <Scalar as SimdKernel<I8>>::Vector, ) -> <Scalar as SimdKernel<I8>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Scalar as SimdKernel<I8>>::Vector, ) -> <Scalar as SimdKernel<I8>>::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<I8>>::Vector, b: <Scalar as SimdKernel<I8>>::Vector, c: <Scalar as SimdKernel<I8>>::Vector, ) -> <Scalar as SimdKernel<I8>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<I8>>::Vector) -> I8

Horizontal sum of all lanes. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<I8>>::Vector, mask: <Scalar as SimdKernel<I8>>::Mask, ) -> <Scalar as SimdKernel<I8>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<I8>>::Vector, mask: <Scalar as SimdKernel<I8>>::Mask, fill: <Scalar as SimdKernel<I8>>::Vector, ) -> <Scalar as SimdKernel<I8>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const I8, indices: <Scalar as SimdKernel<I8>>::IndexVector, ) -> <Scalar as SimdKernel<I8>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const I8, indices: <Scalar as SimdKernel<I8>>::IndexVector, mask: <Scalar as SimdKernel<I8>>::Mask, src: <Scalar as SimdKernel<I8>>::Vector, ) -> <Scalar as SimdKernel<I8>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<I8>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<I8>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<I8>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: I8) -> <Scalar as SimdKernel<I8>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<I8>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<I8>>::Mask, ) -> <Scalar as SimdKernel<I8>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<I8>>::Vector, ) -> <Scalar as SimdKernel<I8>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut T, mask: Self::Mask, val: Self::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<I16> for Scalar

Source§

const LANE_COUNT: usize = 8

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [I16; 8]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 8]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 8]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const I16) -> <Scalar as SimdKernel<I16>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const I16) -> <Scalar as SimdKernel<I16>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut I16, val: <Scalar as SimdKernel<I16>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned( ptr: *mut I16, val: <Scalar as SimdKernel<I16>>::Vector, )

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<I16>>::Vector, b: <Scalar as SimdKernel<I16>>::Vector, ) -> <Scalar as SimdKernel<I16>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<I16>>::Vector, b: <Scalar as SimdKernel<I16>>::Vector, ) -> <Scalar as SimdKernel<I16>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<I16>>::Vector, b: <Scalar as SimdKernel<I16>>::Vector, ) -> <Scalar as SimdKernel<I16>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Scalar as SimdKernel<I16>>::Vector, ) -> <Scalar as SimdKernel<I16>>::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<I16>>::Vector, b: <Scalar as SimdKernel<I16>>::Vector, c: <Scalar as SimdKernel<I16>>::Vector, ) -> <Scalar as SimdKernel<I16>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<I16>>::Vector) -> I16

Horizontal sum of all lanes. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<I16>>::Vector, mask: <Scalar as SimdKernel<I16>>::Mask, ) -> <Scalar as SimdKernel<I16>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<I16>>::Vector, mask: <Scalar as SimdKernel<I16>>::Mask, fill: <Scalar as SimdKernel<I16>>::Vector, ) -> <Scalar as SimdKernel<I16>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const I16, indices: <Scalar as SimdKernel<I16>>::IndexVector, ) -> <Scalar as SimdKernel<I16>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const I16, indices: <Scalar as SimdKernel<I16>>::IndexVector, mask: <Scalar as SimdKernel<I16>>::Mask, src: <Scalar as SimdKernel<I16>>::Vector, ) -> <Scalar as SimdKernel<I16>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<I16>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<I16>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<I16>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: I16) -> <Scalar as SimdKernel<I16>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<I16>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<I16>>::Mask, ) -> <Scalar as SimdKernel<I16>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<I16>>::Vector, ) -> <Scalar as SimdKernel<I16>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut T, mask: Self::Mask, val: Self::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<I32> for Scalar

Source§

const LANE_COUNT: usize = 4

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [I32; 4]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 4]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 4]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const I32) -> <Scalar as SimdKernel<I32>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const I32) -> <Scalar as SimdKernel<I32>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut I32, val: <Scalar as SimdKernel<I32>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned( ptr: *mut I32, val: <Scalar as SimdKernel<I32>>::Vector, )

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<I32>>::Vector, b: <Scalar as SimdKernel<I32>>::Vector, ) -> <Scalar as SimdKernel<I32>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<I32>>::Vector, b: <Scalar as SimdKernel<I32>>::Vector, ) -> <Scalar as SimdKernel<I32>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<I32>>::Vector, b: <Scalar as SimdKernel<I32>>::Vector, ) -> <Scalar as SimdKernel<I32>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Scalar as SimdKernel<I32>>::Vector, ) -> <Scalar as SimdKernel<I32>>::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<I32>>::Vector, b: <Scalar as SimdKernel<I32>>::Vector, c: <Scalar as SimdKernel<I32>>::Vector, ) -> <Scalar as SimdKernel<I32>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<I32>>::Vector) -> I32

Horizontal sum of all lanes. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<I32>>::Vector, mask: <Scalar as SimdKernel<I32>>::Mask, ) -> <Scalar as SimdKernel<I32>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<I32>>::Vector, mask: <Scalar as SimdKernel<I32>>::Mask, fill: <Scalar as SimdKernel<I32>>::Vector, ) -> <Scalar as SimdKernel<I32>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const I32, indices: <Scalar as SimdKernel<I32>>::IndexVector, ) -> <Scalar as SimdKernel<I32>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const I32, indices: <Scalar as SimdKernel<I32>>::IndexVector, mask: <Scalar as SimdKernel<I32>>::Mask, src: <Scalar as SimdKernel<I32>>::Vector, ) -> <Scalar as SimdKernel<I32>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<I32>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<I32>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<I32>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: I32) -> <Scalar as SimdKernel<I32>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<I32>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<I32>>::Mask, ) -> <Scalar as SimdKernel<I32>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<I32>>::Vector, ) -> <Scalar as SimdKernel<I32>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut T, mask: Self::Mask, val: Self::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<f32> for Scalar

Source§

const LANE_COUNT: usize = 4

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [f32; 4]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 4]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 4]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const f32) -> <Scalar as SimdKernel<f32>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const f32) -> <Scalar as SimdKernel<f32>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut f32, val: <Scalar as SimdKernel<f32>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned( ptr: *mut f32, val: <Scalar as SimdKernel<f32>>::Vector, )

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<f32>>::Vector, b: <Scalar as SimdKernel<f32>>::Vector, ) -> <Scalar as SimdKernel<f32>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<f32>>::Vector, b: <Scalar as SimdKernel<f32>>::Vector, ) -> <Scalar as SimdKernel<f32>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<f32>>::Vector, b: <Scalar as SimdKernel<f32>>::Vector, ) -> <Scalar as SimdKernel<f32>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<f32>>::Vector, b: <Scalar as SimdKernel<f32>>::Vector, c: <Scalar as SimdKernel<f32>>::Vector, ) -> <Scalar as SimdKernel<f32>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<f32>>::Vector) -> f32

Horizontal sum of all lanes. Read more
Source§

unsafe fn sqrt( a: <Scalar as SimdKernel<f32>>::Vector, ) -> <Scalar as SimdKernel<f32>>::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt( a: <Scalar as SimdKernel<f32>>::Vector, ) -> <Scalar as SimdKernel<f32>>::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn masked_load_unaligned( ptr: *const f32, mask: <Scalar as SimdKernel<f32>>::Mask, src: <Scalar as SimdKernel<f32>>::Vector, ) -> <Scalar as SimdKernel<f32>>::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut f32, mask: <Scalar as SimdKernel<f32>>::Mask, val: <Scalar as SimdKernel<f32>>::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: <Scalar as SimdKernel<f32>>::Vector, b: <Scalar as SimdKernel<f32>>::Vector, mask: <Scalar as SimdKernel<f32>>::Mask, src: <Scalar as SimdKernel<f32>>::Vector, ) -> <Scalar as SimdKernel<f32>>::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: <Scalar as SimdKernel<f32>>::Vector, b: <Scalar as SimdKernel<f32>>::Vector, mask: <Scalar as SimdKernel<f32>>::Mask, src: <Scalar as SimdKernel<f32>>::Vector, ) -> <Scalar as SimdKernel<f32>>::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: <Scalar as SimdKernel<f32>>::Vector, b: <Scalar as SimdKernel<f32>>::Vector, c: <Scalar as SimdKernel<f32>>::Vector, mask: <Scalar as SimdKernel<f32>>::Mask, ) -> <Scalar as SimdKernel<f32>>::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce( v: <Scalar as SimdKernel<f32>>::Vector, mask: <Scalar as SimdKernel<f32>>::Mask, ) -> f32

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<f32>>::Vector, mask: <Scalar as SimdKernel<f32>>::Mask, ) -> <Scalar as SimdKernel<f32>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<f32>>::Vector, mask: <Scalar as SimdKernel<f32>>::Mask, fill: <Scalar as SimdKernel<f32>>::Vector, ) -> <Scalar as SimdKernel<f32>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const f32, indices: <Scalar as SimdKernel<f32>>::IndexVector, ) -> <Scalar as SimdKernel<f32>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const f32, indices: <Scalar as SimdKernel<f32>>::IndexVector, mask: <Scalar as SimdKernel<f32>>::Mask, src: <Scalar as SimdKernel<f32>>::Vector, ) -> <Scalar as SimdKernel<f32>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<f32>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<f32>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<f32>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: f32) -> <Scalar as SimdKernel<f32>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<f32>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<f32>>::Mask, ) -> <Scalar as SimdKernel<f32>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<f32>>::Vector, ) -> <Scalar as SimdKernel<f32>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn neg(a: Self::Vector) -> Self::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<f64> for Scalar

Source§

const LANE_COUNT: usize = 2

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [f64; 2]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 2]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 2]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const f64) -> <Scalar as SimdKernel<f64>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const f64) -> <Scalar as SimdKernel<f64>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut f64, val: <Scalar as SimdKernel<f64>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned( ptr: *mut f64, val: <Scalar as SimdKernel<f64>>::Vector, )

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<f64>>::Vector, b: <Scalar as SimdKernel<f64>>::Vector, ) -> <Scalar as SimdKernel<f64>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<f64>>::Vector, b: <Scalar as SimdKernel<f64>>::Vector, ) -> <Scalar as SimdKernel<f64>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<f64>>::Vector, b: <Scalar as SimdKernel<f64>>::Vector, ) -> <Scalar as SimdKernel<f64>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<f64>>::Vector, b: <Scalar as SimdKernel<f64>>::Vector, c: <Scalar as SimdKernel<f64>>::Vector, ) -> <Scalar as SimdKernel<f64>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<f64>>::Vector) -> f64

Horizontal sum of all lanes. Read more
Source§

unsafe fn sqrt( a: <Scalar as SimdKernel<f64>>::Vector, ) -> <Scalar as SimdKernel<f64>>::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt( a: <Scalar as SimdKernel<f64>>::Vector, ) -> <Scalar as SimdKernel<f64>>::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn masked_load_unaligned( ptr: *const f64, mask: <Scalar as SimdKernel<f64>>::Mask, src: <Scalar as SimdKernel<f64>>::Vector, ) -> <Scalar as SimdKernel<f64>>::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut f64, mask: <Scalar as SimdKernel<f64>>::Mask, val: <Scalar as SimdKernel<f64>>::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: <Scalar as SimdKernel<f64>>::Vector, b: <Scalar as SimdKernel<f64>>::Vector, mask: <Scalar as SimdKernel<f64>>::Mask, src: <Scalar as SimdKernel<f64>>::Vector, ) -> <Scalar as SimdKernel<f64>>::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: <Scalar as SimdKernel<f64>>::Vector, b: <Scalar as SimdKernel<f64>>::Vector, mask: <Scalar as SimdKernel<f64>>::Mask, src: <Scalar as SimdKernel<f64>>::Vector, ) -> <Scalar as SimdKernel<f64>>::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: <Scalar as SimdKernel<f64>>::Vector, b: <Scalar as SimdKernel<f64>>::Vector, c: <Scalar as SimdKernel<f64>>::Vector, mask: <Scalar as SimdKernel<f64>>::Mask, ) -> <Scalar as SimdKernel<f64>>::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce( v: <Scalar as SimdKernel<f64>>::Vector, mask: <Scalar as SimdKernel<f64>>::Mask, ) -> f64

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<f64>>::Vector, mask: <Scalar as SimdKernel<f64>>::Mask, ) -> <Scalar as SimdKernel<f64>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<f64>>::Vector, mask: <Scalar as SimdKernel<f64>>::Mask, fill: <Scalar as SimdKernel<f64>>::Vector, ) -> <Scalar as SimdKernel<f64>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const f64, indices: <Scalar as SimdKernel<f64>>::IndexVector, ) -> <Scalar as SimdKernel<f64>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const f64, indices: <Scalar as SimdKernel<f64>>::IndexVector, mask: <Scalar as SimdKernel<f64>>::Mask, src: <Scalar as SimdKernel<f64>>::Vector, ) -> <Scalar as SimdKernel<f64>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<f64>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<f64>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<f64>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: f64) -> <Scalar as SimdKernel<f64>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<f64>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<f64>>::Mask, ) -> <Scalar as SimdKernel<f64>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<f64>>::Vector, ) -> <Scalar as SimdKernel<f64>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn neg(a: Self::Vector) -> Self::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<i8> for Scalar

Source§

const LANE_COUNT: usize = 16

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [i8; 16]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 16]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 16]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const i8) -> <Scalar as SimdKernel<i8>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const i8) -> <Scalar as SimdKernel<i8>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut i8, val: <Scalar as SimdKernel<i8>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned(ptr: *mut i8, val: <Scalar as SimdKernel<i8>>::Vector)

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<i8>>::Vector, b: <Scalar as SimdKernel<i8>>::Vector, ) -> <Scalar as SimdKernel<i8>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<i8>>::Vector, b: <Scalar as SimdKernel<i8>>::Vector, ) -> <Scalar as SimdKernel<i8>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<i8>>::Vector, b: <Scalar as SimdKernel<i8>>::Vector, ) -> <Scalar as SimdKernel<i8>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Scalar as SimdKernel<i8>>::Vector, ) -> <Scalar as SimdKernel<i8>>::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<i8>>::Vector, b: <Scalar as SimdKernel<i8>>::Vector, c: <Scalar as SimdKernel<i8>>::Vector, ) -> <Scalar as SimdKernel<i8>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<i8>>::Vector) -> i8

Horizontal sum of all lanes. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<i8>>::Vector, mask: <Scalar as SimdKernel<i8>>::Mask, ) -> <Scalar as SimdKernel<i8>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<i8>>::Vector, mask: <Scalar as SimdKernel<i8>>::Mask, fill: <Scalar as SimdKernel<i8>>::Vector, ) -> <Scalar as SimdKernel<i8>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const i8, indices: <Scalar as SimdKernel<i8>>::IndexVector, ) -> <Scalar as SimdKernel<i8>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const i8, indices: <Scalar as SimdKernel<i8>>::IndexVector, mask: <Scalar as SimdKernel<i8>>::Mask, src: <Scalar as SimdKernel<i8>>::Vector, ) -> <Scalar as SimdKernel<i8>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<i8>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<i8>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<i8>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: i8) -> <Scalar as SimdKernel<i8>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<i8>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<i8>>::Mask, ) -> <Scalar as SimdKernel<i8>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<i8>>::Vector, ) -> <Scalar as SimdKernel<i8>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut T, mask: Self::Mask, val: Self::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<i16> for Scalar

Source§

const LANE_COUNT: usize = 8

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [i16; 8]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 8]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 8]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const i16) -> <Scalar as SimdKernel<i16>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const i16) -> <Scalar as SimdKernel<i16>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut i16, val: <Scalar as SimdKernel<i16>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned( ptr: *mut i16, val: <Scalar as SimdKernel<i16>>::Vector, )

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<i16>>::Vector, b: <Scalar as SimdKernel<i16>>::Vector, ) -> <Scalar as SimdKernel<i16>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<i16>>::Vector, b: <Scalar as SimdKernel<i16>>::Vector, ) -> <Scalar as SimdKernel<i16>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<i16>>::Vector, b: <Scalar as SimdKernel<i16>>::Vector, ) -> <Scalar as SimdKernel<i16>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Scalar as SimdKernel<i16>>::Vector, ) -> <Scalar as SimdKernel<i16>>::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<i16>>::Vector, b: <Scalar as SimdKernel<i16>>::Vector, c: <Scalar as SimdKernel<i16>>::Vector, ) -> <Scalar as SimdKernel<i16>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<i16>>::Vector) -> i16

Horizontal sum of all lanes. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<i16>>::Vector, mask: <Scalar as SimdKernel<i16>>::Mask, ) -> <Scalar as SimdKernel<i16>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<i16>>::Vector, mask: <Scalar as SimdKernel<i16>>::Mask, fill: <Scalar as SimdKernel<i16>>::Vector, ) -> <Scalar as SimdKernel<i16>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const i16, indices: <Scalar as SimdKernel<i16>>::IndexVector, ) -> <Scalar as SimdKernel<i16>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const i16, indices: <Scalar as SimdKernel<i16>>::IndexVector, mask: <Scalar as SimdKernel<i16>>::Mask, src: <Scalar as SimdKernel<i16>>::Vector, ) -> <Scalar as SimdKernel<i16>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<i16>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<i16>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<i16>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: i16) -> <Scalar as SimdKernel<i16>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<i16>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<i16>>::Mask, ) -> <Scalar as SimdKernel<i16>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<i16>>::Vector, ) -> <Scalar as SimdKernel<i16>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut T, mask: Self::Mask, val: Self::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl SimdKernel<i32> for Scalar

Source§

const LANE_COUNT: usize = 4

Number of primitive elements of type T in one Vector.
Source§

const UNROLL_FACTOR: usize = 4

Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§

type Vector = [i32; 4]

The underlying raw register/vector type for this architecture and element type.
Source§

type Mask = [bool; 4]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 4]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const i32) -> <Scalar as SimdKernel<i32>>::Vector

Load a vector from an aligned pointer. Read more
Source§

unsafe fn load_unaligned(ptr: *const i32) -> <Scalar as SimdKernel<i32>>::Vector

Load a vector from an unaligned pointer. Read more
Source§

unsafe fn store_aligned(ptr: *mut i32, val: <Scalar as SimdKernel<i32>>::Vector)

Store a vector to an aligned pointer. Read more
Source§

unsafe fn store_unaligned( ptr: *mut i32, val: <Scalar as SimdKernel<i32>>::Vector, )

Store a vector to an unaligned pointer. Read more
Source§

unsafe fn add( a: <Scalar as SimdKernel<i32>>::Vector, b: <Scalar as SimdKernel<i32>>::Vector, ) -> <Scalar as SimdKernel<i32>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Scalar as SimdKernel<i32>>::Vector, b: <Scalar as SimdKernel<i32>>::Vector, ) -> <Scalar as SimdKernel<i32>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Scalar as SimdKernel<i32>>::Vector, b: <Scalar as SimdKernel<i32>>::Vector, ) -> <Scalar as SimdKernel<i32>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Scalar as SimdKernel<i32>>::Vector, ) -> <Scalar as SimdKernel<i32>>::Vector

Elementwise negate: -a. Read more
Source§

unsafe fn fmadd( a: <Scalar as SimdKernel<i32>>::Vector, b: <Scalar as SimdKernel<i32>>::Vector, c: <Scalar as SimdKernel<i32>>::Vector, ) -> <Scalar as SimdKernel<i32>>::Vector

Fused multiply-add: (a * b) + c. Read more
Source§

unsafe fn sum_reduce(v: <Scalar as SimdKernel<i32>>::Vector) -> i32

Horizontal sum of all lanes. Read more
Source§

unsafe fn compress( src: <Scalar as SimdKernel<i32>>::Vector, mask: <Scalar as SimdKernel<i32>>::Mask, ) -> <Scalar as SimdKernel<i32>>::Vector

Compress: pack selected lanes (where mask[i]=1) into the low lanes of the result. Read more
Source§

unsafe fn expand( src: <Scalar as SimdKernel<i32>>::Vector, mask: <Scalar as SimdKernel<i32>>::Mask, fill: <Scalar as SimdKernel<i32>>::Vector, ) -> <Scalar as SimdKernel<i32>>::Vector

Expand: scatter the low lanes of src into result positions where mask[i]=1. Read more
Source§

unsafe fn gather( base: *const i32, indices: <Scalar as SimdKernel<i32>>::IndexVector, ) -> <Scalar as SimdKernel<i32>>::Vector

Gather: load LANE_COUNT elements at base + indices[i] for each lane i. Read more
Source§

unsafe fn gather_masked( base: *const i32, indices: <Scalar as SimdKernel<i32>>::IndexVector, mask: <Scalar as SimdKernel<i32>>::Mask, src: <Scalar as SimdKernel<i32>>::Vector, ) -> <Scalar as SimdKernel<i32>>::Vector

Masked gather: gather active lanes; inactive lanes take value from src. Read more
Source§

unsafe fn mask_from_bools(bits: &[bool]) -> <Scalar as SimdKernel<i32>>::Mask

Construct a mask from a slice of booleans (length must equal LANE_COUNT). Read more
Source§

unsafe fn leading_k_mask(k: usize) -> <Scalar as SimdKernel<i32>>::Mask

Construct a mask with the first k lanes active and the rest inactive. Read more
Source§

unsafe fn zero() -> <Scalar as SimdKernel<i32>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: i32) -> <Scalar as SimdKernel<i32>>::Vector

Broadcast a scalar value to all lanes. Read more
Source§

unsafe fn mask_to_bitmask(mask: <Scalar as SimdKernel<i32>>::Mask) -> u64

Convert the native mask back to a raw u64 bitmask. Read more
Source§

unsafe fn mask_to_vector( mask: <Scalar as SimdKernel<i32>>::Mask, ) -> <Scalar as SimdKernel<i32>>::Vector

Convert the native mask back to a vector register where active lanes are set to T::ALL_ONES and inactive lanes to T::ZERO. Read more
Source§

unsafe fn vector_to_mask( v: <Scalar as SimdKernel<i32>>::Vector, ) -> <Scalar as SimdKernel<i32>>::Mask

Convert a comparison-result vector into the native mask, the inverse of SimdKernel::mask_to_vector. Read more
Source§

const LANE_BOUND_CHECK: () = _

Compile-time guard that LANE_COUNT fits the fixed MAX_SIMD_LANES scalar-fallback stack buffers. Referencing this const in the buffer-using default methods forces the assertion to be evaluated for each concrete backend at monomorphization, turning a would-be silent stack-buffer overflow into a compile error.
Source§

const SUPPORTS_NT_STORE: bool = false

Whether this backend provides a non-temporal (cache-bypassing) store via store_streaming. Backends leaving this false keep the regular store default; callers gate the streaming path on this const so it is a compile-time branch, dead-code-eliminated where unsupported.
Source§

unsafe fn store_streaming(ptr: *mut T, val: Self::Vector)

Store a vector with a non-temporal (streaming) hint that bypasses the cache, avoiding the read-for-ownership traffic a normal write-allocate pays for write-only data larger than the last-level cache (measured 1.71× on out-of-LLC AVX2 f32 elementwise writes; see streaming_bench). Read more
Source§

fn stream_write_barrier()

Fence ordering this backend’s non-temporal stores before subsequent reads. No-op by default (only meaningful where store_streaming is a weakly ordered non-temporal store).
Source§

unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked load: active lanes loaded from ptr, inactive lanes taken from src. Read more
Source§

unsafe fn masked_store_unaligned( ptr: *mut T, mask: Self::Mask, val: Self::Vector, )

Masked store: active lanes written to ptr, inactive lanes left unchanged. Read more
Source§

unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise add: active lanes compute a + b, inactive lanes yield src. Read more
Source§

unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector

Masked elementwise multiply: active lanes compute a * b, inactive lanes yield src. Read more
Source§

unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector

Masked fused multiply-add: active lanes compute (a * b) + c, inactive lanes retain c. Read more
Source§

unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T

Masked horizontal sum: only lanes where mask[i]=1 contribute. Read more
Source§

unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask

Convert a raw u64 bitmask to the architecture-native mask type. Read more
Source§

unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
where Op: ScanOp<T>, SMode: ScanMode,

Perform an intra-vector prefix scan (inclusive or exclusive) of the vector, using the specified ScanOp strategy and starting carry value. Returns the scanned vector and the final carry value. Read more
Source§

unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise division: a / b. Read more
Source§

unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise AND: a & b. Read more
Source§

unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise OR: a | b. Read more
Source§

unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise bitwise XOR: a ^ b. Read more
Source§

unsafe fn abs(a: Self::Vector) -> Self::Vector

Elementwise absolute value. Read more
Source§

unsafe fn min(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise minimum of a and b. Read more
Source§

unsafe fn max(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise maximum of a and b. Read more
Source§

unsafe fn sqrt(a: Self::Vector) -> Self::Vector

Elementwise square root. Read more
Source§

unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector

Elementwise reciprocal square root, 1/√x, to full T precision (~1 ulp). Read more
Source§

unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise equal: a == b. Read more
Source§

unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise not equal: a != b. Read more
Source§

unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than: a < b. Read more
Source§

unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise less than or equal: a <= b. Read more
Source§

unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than: a > b. Read more
Source§

unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector

Elementwise greater than or equal: a >= b. Read more
Source§

unsafe fn blend( mask: Self::Vector, true_val: Self::Vector, false_val: Self::Vector, ) -> Self::Vector

Elementwise blend: select lanes from true_val where the sign bit of mask is set, and from false_val otherwise. Read more
Source§

unsafe fn bitnot(a: Self::Vector) -> Self::Vector

Elementwise bitwise NOT: !a. Read more
Source§

unsafe fn min_reduce(v: Self::Vector) -> T

Horizontal minimum across all lanes. Read more
Source§

unsafe fn max_reduce(v: Self::Vector) -> T

Horizontal maximum across all lanes. Read more
Source§

unsafe fn popcount(a: Self::Vector) -> Self::Vector

Elementwise population count (number of set bits). Read more
Source§

unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T

Horizontal bitwise AND across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_or(v: Self::Vector) -> T

Horizontal bitwise OR across all lanes. Read more
Source§

unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T

Horizontal bitwise XOR across all lanes. Read more
Source§

unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector

Swap each adjacent lane pair: [a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read more
Source§

unsafe fn dup_even(v: Self::Vector) -> Self::Vector

Duplicate even lanes into odd lanes: [a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read more
Source§

unsafe fn dup_odd(v: Self::Vector) -> Self::Vector

Duplicate odd lanes into even lanes: [a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read more
Source§

unsafe fn fmaddsub( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b - c, odd lanes a*b + c. Read more
Source§

unsafe fn fmsubadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, ) -> Self::Vector

Alternating fused multiply: even lanes a*b + c, odd lanes a*b - c. Read more
Source§

impl StructuralPartialEq for Scalar

Source§

impl<Backend, Arch, const M: usize, const N: usize, const K: usize> TileMatrixMultiply<Bf16, Bf16, F32, Backend, Arch, M, N, K> for Scalar

Source§

unsafe fn tile_matmul( c: *mut F32, c_stride: usize, a: *const Bf16, a_stride: usize, b: *const Bf16, b_stride: usize, )

Performs tile matrix multiplication: C += A * B Read more
Source§

impl<Backend, Arch, const M: usize, const N: usize, const K: usize> TileMatrixMultiply<I8, I8, I32, Backend, Arch, M, N, K> for Scalar

Source§

unsafe fn tile_matmul( c: *mut I32, c_stride: usize, a: *const I8, a_stride: usize, b: *const I8, b_stride: usize, )

Performs tile matrix multiplication: C += A * B Read more
Source§

impl<Backend, Arch, const M: usize, const N: usize, const K: usize> TileMatrixMultiply<i8, i8, i32, Backend, Arch, M, N, K> for Scalar

Source§

unsafe fn tile_matmul( c: *mut i32, c_stride: usize, a: *const i8, a_stride: usize, b: *const i8, b_stride: usize, )

Performs tile matrix multiplication: C += A * B Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CastTo for T
where T: Copy,

Source§

fn cast_to<U>(self) -> U
where U: CastFrom<Self>,

Cast self to type U.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.