pub struct Avx512;Expand description
x86/x86_64 AVX-512F instruction set architecture marker.
Trait Implementations§
impl Copy for Avx512
impl Eq for Avx512
Source§impl SimdArch for Avx512
impl SimdArch for Avx512
Source§const NAME: &'static str = "avx512"
const NAME: &'static str = "avx512"
Human-readable ISA name (
"avx2", "avx512", "neon", "scalar").Source§const REGISTER_WIDTH_BITS: u32 = 512
const REGISTER_WIDTH_BITS: u32 = 512
Width of vector registers in bits. Read more
Source§const ISA_FAMILY: IsaFamily = hermes_simd_core::arch::IsaFamily::X86
const ISA_FAMILY: IsaFamily = hermes_simd_core::arch::IsaFamily::X86
ISA family for this architecture.
Source§const FMA_THROUGHPUT_HINT: u32 = 8
const FMA_THROUGHPUT_HINT: u32 = 8
Source§fn is_runtime_supported() -> bool
fn is_runtime_supported() -> bool
Returns true when the current host may execute this architecture’s
native instructions from safe wrappers. Read more
Source§impl SimdKernel<Bf4> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<Bf4> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 64
const LANE_COUNT: usize = 64
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [Bf4; 64]
type Vector = [Bf4; 64]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const Bf4) -> <Avx512 as SimdKernel<Bf4>>::Vector
unsafe fn load_aligned(ptr: *const Bf4) -> <Avx512 as SimdKernel<Bf4>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const Bf4) -> <Avx512 as SimdKernel<Bf4>>::Vector
unsafe fn load_unaligned(ptr: *const Bf4) -> <Avx512 as SimdKernel<Bf4>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut Bf4, val: <Avx512 as SimdKernel<Bf4>>::Vector)
unsafe fn store_aligned(ptr: *mut Bf4, val: <Avx512 as SimdKernel<Bf4>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(
ptr: *mut Bf4,
val: <Avx512 as SimdKernel<Bf4>>::Vector,
)
unsafe fn store_unaligned( ptr: *mut Bf4, val: <Avx512 as SimdKernel<Bf4>>::Vector, )
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<Bf4>>::Vector,
b: <Avx512 as SimdKernel<Bf4>>::Vector,
) -> <Avx512 as SimdKernel<Bf4>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<Bf4>>::Vector, b: <Avx512 as SimdKernel<Bf4>>::Vector, ) -> <Avx512 as SimdKernel<Bf4>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<Bf4>>::Vector,
b: <Avx512 as SimdKernel<Bf4>>::Vector,
) -> <Avx512 as SimdKernel<Bf4>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<Bf4>>::Vector, b: <Avx512 as SimdKernel<Bf4>>::Vector, ) -> <Avx512 as SimdKernel<Bf4>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<Bf4>>::Vector,
b: <Avx512 as SimdKernel<Bf4>>::Vector,
) -> <Avx512 as SimdKernel<Bf4>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<Bf4>>::Vector, b: <Avx512 as SimdKernel<Bf4>>::Vector, ) -> <Avx512 as SimdKernel<Bf4>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn neg(
a: <Avx512 as SimdKernel<Bf4>>::Vector,
) -> <Avx512 as SimdKernel<Bf4>>::Vector
unsafe fn neg( a: <Avx512 as SimdKernel<Bf4>>::Vector, ) -> <Avx512 as SimdKernel<Bf4>>::Vector
Elementwise negate:
-a. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<Bf4>>::Vector,
b: <Avx512 as SimdKernel<Bf4>>::Vector,
c: <Avx512 as SimdKernel<Bf4>>::Vector,
) -> <Avx512 as SimdKernel<Bf4>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<Bf4>>::Vector, b: <Avx512 as SimdKernel<Bf4>>::Vector, c: <Avx512 as SimdKernel<Bf4>>::Vector, ) -> <Avx512 as SimdKernel<Bf4>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<Bf4>>::Vector) -> Bf4
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<Bf4>>::Vector) -> Bf4
Horizontal sum of all lanes. Read more
Source§unsafe fn compress(
src: <Avx512 as SimdKernel<Bf4>>::Vector,
mask: <Avx512 as SimdKernel<Bf4>>::Mask,
) -> <Avx512 as SimdKernel<Bf4>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<Bf4>>::Vector, mask: <Avx512 as SimdKernel<Bf4>>::Mask, ) -> <Avx512 as SimdKernel<Bf4>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<Bf4>>::Vector,
mask: <Avx512 as SimdKernel<Bf4>>::Mask,
fill: <Avx512 as SimdKernel<Bf4>>::Vector,
) -> <Avx512 as SimdKernel<Bf4>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<Bf4>>::Vector, mask: <Avx512 as SimdKernel<Bf4>>::Mask, fill: <Avx512 as SimdKernel<Bf4>>::Vector, ) -> <Avx512 as SimdKernel<Bf4>>::Vector
Source§unsafe fn gather(
base: *const Bf4,
indices: <Avx512 as SimdKernel<Bf4>>::IndexVector,
) -> <Avx512 as SimdKernel<Bf4>>::Vector
unsafe fn gather( base: *const Bf4, indices: <Avx512 as SimdKernel<Bf4>>::IndexVector, ) -> <Avx512 as SimdKernel<Bf4>>::Vector
Source§unsafe fn gather_masked(
base: *const Bf4,
indices: <Avx512 as SimdKernel<Bf4>>::IndexVector,
mask: <Avx512 as SimdKernel<Bf4>>::Mask,
src: <Avx512 as SimdKernel<Bf4>>::Vector,
) -> <Avx512 as SimdKernel<Bf4>>::Vector
unsafe fn gather_masked( base: *const Bf4, indices: <Avx512 as SimdKernel<Bf4>>::IndexVector, mask: <Avx512 as SimdKernel<Bf4>>::Mask, src: <Avx512 as SimdKernel<Bf4>>::Vector, ) -> <Avx512 as SimdKernel<Bf4>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<Bf4>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<Bf4>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<Bf4>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<Bf4>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: Bf4) -> <Avx512 as SimdKernel<Bf4>>::Vector
unsafe fn splat(val: Bf4) -> <Avx512 as SimdKernel<Bf4>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<Bf4>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<Bf4>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<Bf4>>::Mask,
) -> <Avx512 as SimdKernel<Bf4>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<Bf4>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<Bf4>>::Vector,
) -> <Avx512 as SimdKernel<Bf4>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<Bf4>>::Vector, ) -> <Avx512 as SimdKernel<Bf4>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut T,
mask: Self::Mask,
val: Self::Vector,
)
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 moreSource§unsafe fn masked_add(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_mul(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_fmadd(
a: Self::Vector,
b: Self::Vector,
c: Self::Vector,
mask: Self::Mask,
) -> Self::Vector
unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector
Source§unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§impl SimdKernel<Bf8> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<Bf8> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 64
const LANE_COUNT: usize = 64
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [Bf8; 64]
type Vector = [Bf8; 64]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const Bf8) -> <Avx512 as SimdKernel<Bf8>>::Vector
unsafe fn load_aligned(ptr: *const Bf8) -> <Avx512 as SimdKernel<Bf8>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const Bf8) -> <Avx512 as SimdKernel<Bf8>>::Vector
unsafe fn load_unaligned(ptr: *const Bf8) -> <Avx512 as SimdKernel<Bf8>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut Bf8, val: <Avx512 as SimdKernel<Bf8>>::Vector)
unsafe fn store_aligned(ptr: *mut Bf8, val: <Avx512 as SimdKernel<Bf8>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(
ptr: *mut Bf8,
val: <Avx512 as SimdKernel<Bf8>>::Vector,
)
unsafe fn store_unaligned( ptr: *mut Bf8, val: <Avx512 as SimdKernel<Bf8>>::Vector, )
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<Bf8>>::Vector,
b: <Avx512 as SimdKernel<Bf8>>::Vector,
) -> <Avx512 as SimdKernel<Bf8>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<Bf8>>::Vector, b: <Avx512 as SimdKernel<Bf8>>::Vector, ) -> <Avx512 as SimdKernel<Bf8>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<Bf8>>::Vector,
b: <Avx512 as SimdKernel<Bf8>>::Vector,
) -> <Avx512 as SimdKernel<Bf8>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<Bf8>>::Vector, b: <Avx512 as SimdKernel<Bf8>>::Vector, ) -> <Avx512 as SimdKernel<Bf8>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<Bf8>>::Vector,
b: <Avx512 as SimdKernel<Bf8>>::Vector,
) -> <Avx512 as SimdKernel<Bf8>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<Bf8>>::Vector, b: <Avx512 as SimdKernel<Bf8>>::Vector, ) -> <Avx512 as SimdKernel<Bf8>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn neg(
a: <Avx512 as SimdKernel<Bf8>>::Vector,
) -> <Avx512 as SimdKernel<Bf8>>::Vector
unsafe fn neg( a: <Avx512 as SimdKernel<Bf8>>::Vector, ) -> <Avx512 as SimdKernel<Bf8>>::Vector
Elementwise negate:
-a. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<Bf8>>::Vector,
b: <Avx512 as SimdKernel<Bf8>>::Vector,
c: <Avx512 as SimdKernel<Bf8>>::Vector,
) -> <Avx512 as SimdKernel<Bf8>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<Bf8>>::Vector, b: <Avx512 as SimdKernel<Bf8>>::Vector, c: <Avx512 as SimdKernel<Bf8>>::Vector, ) -> <Avx512 as SimdKernel<Bf8>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<Bf8>>::Vector) -> Bf8
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<Bf8>>::Vector) -> Bf8
Horizontal sum of all lanes. Read more
Source§unsafe fn compress(
src: <Avx512 as SimdKernel<Bf8>>::Vector,
mask: <Avx512 as SimdKernel<Bf8>>::Mask,
) -> <Avx512 as SimdKernel<Bf8>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<Bf8>>::Vector, mask: <Avx512 as SimdKernel<Bf8>>::Mask, ) -> <Avx512 as SimdKernel<Bf8>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<Bf8>>::Vector,
mask: <Avx512 as SimdKernel<Bf8>>::Mask,
fill: <Avx512 as SimdKernel<Bf8>>::Vector,
) -> <Avx512 as SimdKernel<Bf8>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<Bf8>>::Vector, mask: <Avx512 as SimdKernel<Bf8>>::Mask, fill: <Avx512 as SimdKernel<Bf8>>::Vector, ) -> <Avx512 as SimdKernel<Bf8>>::Vector
Source§unsafe fn gather(
base: *const Bf8,
indices: <Avx512 as SimdKernel<Bf8>>::IndexVector,
) -> <Avx512 as SimdKernel<Bf8>>::Vector
unsafe fn gather( base: *const Bf8, indices: <Avx512 as SimdKernel<Bf8>>::IndexVector, ) -> <Avx512 as SimdKernel<Bf8>>::Vector
Source§unsafe fn gather_masked(
base: *const Bf8,
indices: <Avx512 as SimdKernel<Bf8>>::IndexVector,
mask: <Avx512 as SimdKernel<Bf8>>::Mask,
src: <Avx512 as SimdKernel<Bf8>>::Vector,
) -> <Avx512 as SimdKernel<Bf8>>::Vector
unsafe fn gather_masked( base: *const Bf8, indices: <Avx512 as SimdKernel<Bf8>>::IndexVector, mask: <Avx512 as SimdKernel<Bf8>>::Mask, src: <Avx512 as SimdKernel<Bf8>>::Vector, ) -> <Avx512 as SimdKernel<Bf8>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<Bf8>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<Bf8>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<Bf8>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<Bf8>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: Bf8) -> <Avx512 as SimdKernel<Bf8>>::Vector
unsafe fn splat(val: Bf8) -> <Avx512 as SimdKernel<Bf8>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<Bf8>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<Bf8>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<Bf8>>::Mask,
) -> <Avx512 as SimdKernel<Bf8>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<Bf8>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<Bf8>>::Vector,
) -> <Avx512 as SimdKernel<Bf8>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<Bf8>>::Vector, ) -> <Avx512 as SimdKernel<Bf8>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut T,
mask: Self::Mask,
val: Self::Vector,
)
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 moreSource§unsafe fn masked_add(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_mul(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_fmadd(
a: Self::Vector,
b: Self::Vector,
c: Self::Vector,
mask: Self::Mask,
) -> Self::Vector
unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector
Source§unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§impl SimdKernel<Bf16> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<Bf16> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 32
const LANE_COUNT: usize = 32
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [Bf16; 32]
type Vector = [Bf16; 32]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const Bf16) -> <Avx512 as SimdKernel<Bf16>>::Vector
unsafe fn load_aligned(ptr: *const Bf16) -> <Avx512 as SimdKernel<Bf16>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(
ptr: *const Bf16,
) -> <Avx512 as SimdKernel<Bf16>>::Vector
unsafe fn load_unaligned( ptr: *const Bf16, ) -> <Avx512 as SimdKernel<Bf16>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(
ptr: *mut Bf16,
val: <Avx512 as SimdKernel<Bf16>>::Vector,
)
unsafe fn store_aligned( ptr: *mut Bf16, val: <Avx512 as SimdKernel<Bf16>>::Vector, )
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(
ptr: *mut Bf16,
val: <Avx512 as SimdKernel<Bf16>>::Vector,
)
unsafe fn store_unaligned( ptr: *mut Bf16, val: <Avx512 as SimdKernel<Bf16>>::Vector, )
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<Bf16>>::Vector,
b: <Avx512 as SimdKernel<Bf16>>::Vector,
) -> <Avx512 as SimdKernel<Bf16>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<Bf16>>::Vector, b: <Avx512 as SimdKernel<Bf16>>::Vector, ) -> <Avx512 as SimdKernel<Bf16>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<Bf16>>::Vector,
b: <Avx512 as SimdKernel<Bf16>>::Vector,
) -> <Avx512 as SimdKernel<Bf16>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<Bf16>>::Vector, b: <Avx512 as SimdKernel<Bf16>>::Vector, ) -> <Avx512 as SimdKernel<Bf16>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<Bf16>>::Vector,
b: <Avx512 as SimdKernel<Bf16>>::Vector,
) -> <Avx512 as SimdKernel<Bf16>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<Bf16>>::Vector, b: <Avx512 as SimdKernel<Bf16>>::Vector, ) -> <Avx512 as SimdKernel<Bf16>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn neg(
a: <Avx512 as SimdKernel<Bf16>>::Vector,
) -> <Avx512 as SimdKernel<Bf16>>::Vector
unsafe fn neg( a: <Avx512 as SimdKernel<Bf16>>::Vector, ) -> <Avx512 as SimdKernel<Bf16>>::Vector
Elementwise negate:
-a. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<Bf16>>::Vector,
b: <Avx512 as SimdKernel<Bf16>>::Vector,
c: <Avx512 as SimdKernel<Bf16>>::Vector,
) -> <Avx512 as SimdKernel<Bf16>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<Bf16>>::Vector, b: <Avx512 as SimdKernel<Bf16>>::Vector, c: <Avx512 as SimdKernel<Bf16>>::Vector, ) -> <Avx512 as SimdKernel<Bf16>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<Bf16>>::Vector) -> Bf16
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<Bf16>>::Vector) -> Bf16
Horizontal sum of all lanes. Read more
Source§unsafe fn compress(
src: <Avx512 as SimdKernel<Bf16>>::Vector,
mask: <Avx512 as SimdKernel<Bf16>>::Mask,
) -> <Avx512 as SimdKernel<Bf16>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<Bf16>>::Vector, mask: <Avx512 as SimdKernel<Bf16>>::Mask, ) -> <Avx512 as SimdKernel<Bf16>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<Bf16>>::Vector,
mask: <Avx512 as SimdKernel<Bf16>>::Mask,
fill: <Avx512 as SimdKernel<Bf16>>::Vector,
) -> <Avx512 as SimdKernel<Bf16>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<Bf16>>::Vector, mask: <Avx512 as SimdKernel<Bf16>>::Mask, fill: <Avx512 as SimdKernel<Bf16>>::Vector, ) -> <Avx512 as SimdKernel<Bf16>>::Vector
Source§unsafe fn gather(
base: *const Bf16,
indices: <Avx512 as SimdKernel<Bf16>>::IndexVector,
) -> <Avx512 as SimdKernel<Bf16>>::Vector
unsafe fn gather( base: *const Bf16, indices: <Avx512 as SimdKernel<Bf16>>::IndexVector, ) -> <Avx512 as SimdKernel<Bf16>>::Vector
Source§unsafe fn gather_masked(
base: *const Bf16,
indices: <Avx512 as SimdKernel<Bf16>>::IndexVector,
mask: <Avx512 as SimdKernel<Bf16>>::Mask,
src: <Avx512 as SimdKernel<Bf16>>::Vector,
) -> <Avx512 as SimdKernel<Bf16>>::Vector
unsafe fn gather_masked( base: *const Bf16, indices: <Avx512 as SimdKernel<Bf16>>::IndexVector, mask: <Avx512 as SimdKernel<Bf16>>::Mask, src: <Avx512 as SimdKernel<Bf16>>::Vector, ) -> <Avx512 as SimdKernel<Bf16>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<Bf16>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<Bf16>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<Bf16>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<Bf16>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: Bf16) -> <Avx512 as SimdKernel<Bf16>>::Vector
unsafe fn splat(val: Bf16) -> <Avx512 as SimdKernel<Bf16>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<Bf16>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<Bf16>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<Bf16>>::Mask,
) -> <Avx512 as SimdKernel<Bf16>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<Bf16>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<Bf16>>::Vector,
) -> <Avx512 as SimdKernel<Bf16>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<Bf16>>::Vector, ) -> <Avx512 as SimdKernel<Bf16>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut T,
mask: Self::Mask,
val: Self::Vector,
)
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 moreSource§unsafe fn masked_add(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_mul(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_fmadd(
a: Self::Vector,
b: Self::Vector,
c: Self::Vector,
mask: Self::Mask,
) -> Self::Vector
unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector
Source§unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§impl SimdKernel<F4> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<F4> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 64
const LANE_COUNT: usize = 64
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [F4; 64]
type Vector = [F4; 64]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const F4) -> <Avx512 as SimdKernel<F4>>::Vector
unsafe fn load_aligned(ptr: *const F4) -> <Avx512 as SimdKernel<F4>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const F4) -> <Avx512 as SimdKernel<F4>>::Vector
unsafe fn load_unaligned(ptr: *const F4) -> <Avx512 as SimdKernel<F4>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut F4, val: <Avx512 as SimdKernel<F4>>::Vector)
unsafe fn store_aligned(ptr: *mut F4, val: <Avx512 as SimdKernel<F4>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(ptr: *mut F4, val: <Avx512 as SimdKernel<F4>>::Vector)
unsafe fn store_unaligned(ptr: *mut F4, val: <Avx512 as SimdKernel<F4>>::Vector)
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<F4>>::Vector,
b: <Avx512 as SimdKernel<F4>>::Vector,
) -> <Avx512 as SimdKernel<F4>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<F4>>::Vector, b: <Avx512 as SimdKernel<F4>>::Vector, ) -> <Avx512 as SimdKernel<F4>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<F4>>::Vector,
b: <Avx512 as SimdKernel<F4>>::Vector,
) -> <Avx512 as SimdKernel<F4>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<F4>>::Vector, b: <Avx512 as SimdKernel<F4>>::Vector, ) -> <Avx512 as SimdKernel<F4>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<F4>>::Vector,
b: <Avx512 as SimdKernel<F4>>::Vector,
) -> <Avx512 as SimdKernel<F4>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<F4>>::Vector, b: <Avx512 as SimdKernel<F4>>::Vector, ) -> <Avx512 as SimdKernel<F4>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn neg(
a: <Avx512 as SimdKernel<F4>>::Vector,
) -> <Avx512 as SimdKernel<F4>>::Vector
unsafe fn neg( a: <Avx512 as SimdKernel<F4>>::Vector, ) -> <Avx512 as SimdKernel<F4>>::Vector
Elementwise negate:
-a. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<F4>>::Vector,
b: <Avx512 as SimdKernel<F4>>::Vector,
c: <Avx512 as SimdKernel<F4>>::Vector,
) -> <Avx512 as SimdKernel<F4>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<F4>>::Vector, b: <Avx512 as SimdKernel<F4>>::Vector, c: <Avx512 as SimdKernel<F4>>::Vector, ) -> <Avx512 as SimdKernel<F4>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<F4>>::Vector) -> F4
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<F4>>::Vector) -> F4
Horizontal sum of all lanes. Read more
Source§unsafe fn compress(
src: <Avx512 as SimdKernel<F4>>::Vector,
mask: <Avx512 as SimdKernel<F4>>::Mask,
) -> <Avx512 as SimdKernel<F4>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<F4>>::Vector, mask: <Avx512 as SimdKernel<F4>>::Mask, ) -> <Avx512 as SimdKernel<F4>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<F4>>::Vector,
mask: <Avx512 as SimdKernel<F4>>::Mask,
fill: <Avx512 as SimdKernel<F4>>::Vector,
) -> <Avx512 as SimdKernel<F4>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<F4>>::Vector, mask: <Avx512 as SimdKernel<F4>>::Mask, fill: <Avx512 as SimdKernel<F4>>::Vector, ) -> <Avx512 as SimdKernel<F4>>::Vector
Source§unsafe fn gather(
base: *const F4,
indices: <Avx512 as SimdKernel<F4>>::IndexVector,
) -> <Avx512 as SimdKernel<F4>>::Vector
unsafe fn gather( base: *const F4, indices: <Avx512 as SimdKernel<F4>>::IndexVector, ) -> <Avx512 as SimdKernel<F4>>::Vector
Source§unsafe fn gather_masked(
base: *const F4,
indices: <Avx512 as SimdKernel<F4>>::IndexVector,
mask: <Avx512 as SimdKernel<F4>>::Mask,
src: <Avx512 as SimdKernel<F4>>::Vector,
) -> <Avx512 as SimdKernel<F4>>::Vector
unsafe fn gather_masked( base: *const F4, indices: <Avx512 as SimdKernel<F4>>::IndexVector, mask: <Avx512 as SimdKernel<F4>>::Mask, src: <Avx512 as SimdKernel<F4>>::Vector, ) -> <Avx512 as SimdKernel<F4>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<F4>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<F4>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<F4>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<F4>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: F4) -> <Avx512 as SimdKernel<F4>>::Vector
unsafe fn splat(val: F4) -> <Avx512 as SimdKernel<F4>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<F4>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<F4>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<F4>>::Mask,
) -> <Avx512 as SimdKernel<F4>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<F4>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<F4>>::Vector,
) -> <Avx512 as SimdKernel<F4>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<F4>>::Vector, ) -> <Avx512 as SimdKernel<F4>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut T,
mask: Self::Mask,
val: Self::Vector,
)
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 moreSource§unsafe fn masked_add(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_mul(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_fmadd(
a: Self::Vector,
b: Self::Vector,
c: Self::Vector,
mask: Self::Mask,
) -> Self::Vector
unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector
Source§unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§impl SimdKernel<F8> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<F8> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 64
const LANE_COUNT: usize = 64
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [F8; 64]
type Vector = [F8; 64]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const F8) -> <Avx512 as SimdKernel<F8>>::Vector
unsafe fn load_aligned(ptr: *const F8) -> <Avx512 as SimdKernel<F8>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const F8) -> <Avx512 as SimdKernel<F8>>::Vector
unsafe fn load_unaligned(ptr: *const F8) -> <Avx512 as SimdKernel<F8>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut F8, val: <Avx512 as SimdKernel<F8>>::Vector)
unsafe fn store_aligned(ptr: *mut F8, val: <Avx512 as SimdKernel<F8>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(ptr: *mut F8, val: <Avx512 as SimdKernel<F8>>::Vector)
unsafe fn store_unaligned(ptr: *mut F8, val: <Avx512 as SimdKernel<F8>>::Vector)
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<F8>>::Vector,
b: <Avx512 as SimdKernel<F8>>::Vector,
) -> <Avx512 as SimdKernel<F8>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<F8>>::Vector, b: <Avx512 as SimdKernel<F8>>::Vector, ) -> <Avx512 as SimdKernel<F8>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<F8>>::Vector,
b: <Avx512 as SimdKernel<F8>>::Vector,
) -> <Avx512 as SimdKernel<F8>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<F8>>::Vector, b: <Avx512 as SimdKernel<F8>>::Vector, ) -> <Avx512 as SimdKernel<F8>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<F8>>::Vector,
b: <Avx512 as SimdKernel<F8>>::Vector,
) -> <Avx512 as SimdKernel<F8>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<F8>>::Vector, b: <Avx512 as SimdKernel<F8>>::Vector, ) -> <Avx512 as SimdKernel<F8>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn neg(
a: <Avx512 as SimdKernel<F8>>::Vector,
) -> <Avx512 as SimdKernel<F8>>::Vector
unsafe fn neg( a: <Avx512 as SimdKernel<F8>>::Vector, ) -> <Avx512 as SimdKernel<F8>>::Vector
Elementwise negate:
-a. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<F8>>::Vector,
b: <Avx512 as SimdKernel<F8>>::Vector,
c: <Avx512 as SimdKernel<F8>>::Vector,
) -> <Avx512 as SimdKernel<F8>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<F8>>::Vector, b: <Avx512 as SimdKernel<F8>>::Vector, c: <Avx512 as SimdKernel<F8>>::Vector, ) -> <Avx512 as SimdKernel<F8>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<F8>>::Vector) -> F8
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<F8>>::Vector) -> F8
Horizontal sum of all lanes. Read more
Source§unsafe fn compress(
src: <Avx512 as SimdKernel<F8>>::Vector,
mask: <Avx512 as SimdKernel<F8>>::Mask,
) -> <Avx512 as SimdKernel<F8>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<F8>>::Vector, mask: <Avx512 as SimdKernel<F8>>::Mask, ) -> <Avx512 as SimdKernel<F8>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<F8>>::Vector,
mask: <Avx512 as SimdKernel<F8>>::Mask,
fill: <Avx512 as SimdKernel<F8>>::Vector,
) -> <Avx512 as SimdKernel<F8>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<F8>>::Vector, mask: <Avx512 as SimdKernel<F8>>::Mask, fill: <Avx512 as SimdKernel<F8>>::Vector, ) -> <Avx512 as SimdKernel<F8>>::Vector
Source§unsafe fn gather(
base: *const F8,
indices: <Avx512 as SimdKernel<F8>>::IndexVector,
) -> <Avx512 as SimdKernel<F8>>::Vector
unsafe fn gather( base: *const F8, indices: <Avx512 as SimdKernel<F8>>::IndexVector, ) -> <Avx512 as SimdKernel<F8>>::Vector
Source§unsafe fn gather_masked(
base: *const F8,
indices: <Avx512 as SimdKernel<F8>>::IndexVector,
mask: <Avx512 as SimdKernel<F8>>::Mask,
src: <Avx512 as SimdKernel<F8>>::Vector,
) -> <Avx512 as SimdKernel<F8>>::Vector
unsafe fn gather_masked( base: *const F8, indices: <Avx512 as SimdKernel<F8>>::IndexVector, mask: <Avx512 as SimdKernel<F8>>::Mask, src: <Avx512 as SimdKernel<F8>>::Vector, ) -> <Avx512 as SimdKernel<F8>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<F8>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<F8>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<F8>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<F8>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: F8) -> <Avx512 as SimdKernel<F8>>::Vector
unsafe fn splat(val: F8) -> <Avx512 as SimdKernel<F8>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<F8>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<F8>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<F8>>::Mask,
) -> <Avx512 as SimdKernel<F8>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<F8>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<F8>>::Vector,
) -> <Avx512 as SimdKernel<F8>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<F8>>::Vector, ) -> <Avx512 as SimdKernel<F8>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut T,
mask: Self::Mask,
val: Self::Vector,
)
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 moreSource§unsafe fn masked_add(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_mul(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_fmadd(
a: Self::Vector,
b: Self::Vector,
c: Self::Vector,
mask: Self::Mask,
) -> Self::Vector
unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector
Source§unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§impl SimdKernel<F16> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<F16> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 32
const LANE_COUNT: usize = 32
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [F16; 32]
type Vector = [F16; 32]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const F16) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn load_aligned(ptr: *const F16) -> <Avx512 as SimdKernel<F16>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const F16) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn load_unaligned(ptr: *const F16) -> <Avx512 as SimdKernel<F16>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut F16, val: <Avx512 as SimdKernel<F16>>::Vector)
unsafe fn store_aligned(ptr: *mut F16, val: <Avx512 as SimdKernel<F16>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(
ptr: *mut F16,
val: <Avx512 as SimdKernel<F16>>::Vector,
)
unsafe fn store_unaligned( ptr: *mut F16, val: <Avx512 as SimdKernel<F16>>::Vector, )
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<F16>>::Vector,
b: <Avx512 as SimdKernel<F16>>::Vector,
) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<F16>>::Vector, b: <Avx512 as SimdKernel<F16>>::Vector, ) -> <Avx512 as SimdKernel<F16>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<F16>>::Vector,
b: <Avx512 as SimdKernel<F16>>::Vector,
) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<F16>>::Vector, b: <Avx512 as SimdKernel<F16>>::Vector, ) -> <Avx512 as SimdKernel<F16>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<F16>>::Vector,
b: <Avx512 as SimdKernel<F16>>::Vector,
) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<F16>>::Vector, b: <Avx512 as SimdKernel<F16>>::Vector, ) -> <Avx512 as SimdKernel<F16>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<F16>>::Vector,
b: <Avx512 as SimdKernel<F16>>::Vector,
c: <Avx512 as SimdKernel<F16>>::Vector,
) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<F16>>::Vector, b: <Avx512 as SimdKernel<F16>>::Vector, c: <Avx512 as SimdKernel<F16>>::Vector, ) -> <Avx512 as SimdKernel<F16>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<F16>>::Vector) -> F16
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<F16>>::Vector) -> F16
Horizontal sum of all lanes. Read more
Source§unsafe fn masked_load_unaligned(
ptr: *const F16,
mask: <Avx512 as SimdKernel<F16>>::Mask,
src: <Avx512 as SimdKernel<F16>>::Vector,
) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn masked_load_unaligned( ptr: *const F16, mask: <Avx512 as SimdKernel<F16>>::Mask, src: <Avx512 as SimdKernel<F16>>::Vector, ) -> <Avx512 as SimdKernel<F16>>::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut F16,
mask: <Avx512 as SimdKernel<F16>>::Mask,
val: <Avx512 as SimdKernel<F16>>::Vector,
)
unsafe fn masked_store_unaligned( ptr: *mut F16, mask: <Avx512 as SimdKernel<F16>>::Mask, val: <Avx512 as SimdKernel<F16>>::Vector, )
Masked store: active lanes written to
ptr, inactive lanes left unchanged. Read moreSource§unsafe fn masked_add(
a: <Avx512 as SimdKernel<F16>>::Vector,
b: <Avx512 as SimdKernel<F16>>::Vector,
mask: <Avx512 as SimdKernel<F16>>::Mask,
src: <Avx512 as SimdKernel<F16>>::Vector,
) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn masked_add( a: <Avx512 as SimdKernel<F16>>::Vector, b: <Avx512 as SimdKernel<F16>>::Vector, mask: <Avx512 as SimdKernel<F16>>::Mask, src: <Avx512 as SimdKernel<F16>>::Vector, ) -> <Avx512 as SimdKernel<F16>>::Vector
Source§unsafe fn masked_mul(
a: <Avx512 as SimdKernel<F16>>::Vector,
b: <Avx512 as SimdKernel<F16>>::Vector,
mask: <Avx512 as SimdKernel<F16>>::Mask,
src: <Avx512 as SimdKernel<F16>>::Vector,
) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn masked_mul( a: <Avx512 as SimdKernel<F16>>::Vector, b: <Avx512 as SimdKernel<F16>>::Vector, mask: <Avx512 as SimdKernel<F16>>::Mask, src: <Avx512 as SimdKernel<F16>>::Vector, ) -> <Avx512 as SimdKernel<F16>>::Vector
Source§unsafe fn masked_fmadd(
a: <Avx512 as SimdKernel<F16>>::Vector,
b: <Avx512 as SimdKernel<F16>>::Vector,
c: <Avx512 as SimdKernel<F16>>::Vector,
mask: <Avx512 as SimdKernel<F16>>::Mask,
) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn masked_fmadd( a: <Avx512 as SimdKernel<F16>>::Vector, b: <Avx512 as SimdKernel<F16>>::Vector, c: <Avx512 as SimdKernel<F16>>::Vector, mask: <Avx512 as SimdKernel<F16>>::Mask, ) -> <Avx512 as SimdKernel<F16>>::Vector
Source§unsafe fn masked_sum_reduce(
v: <Avx512 as SimdKernel<F16>>::Vector,
mask: <Avx512 as SimdKernel<F16>>::Mask,
) -> F16
unsafe fn masked_sum_reduce( v: <Avx512 as SimdKernel<F16>>::Vector, mask: <Avx512 as SimdKernel<F16>>::Mask, ) -> F16
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn compress(
src: <Avx512 as SimdKernel<F16>>::Vector,
mask: <Avx512 as SimdKernel<F16>>::Mask,
) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<F16>>::Vector, mask: <Avx512 as SimdKernel<F16>>::Mask, ) -> <Avx512 as SimdKernel<F16>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<F16>>::Vector,
mask: <Avx512 as SimdKernel<F16>>::Mask,
fill: <Avx512 as SimdKernel<F16>>::Vector,
) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<F16>>::Vector, mask: <Avx512 as SimdKernel<F16>>::Mask, fill: <Avx512 as SimdKernel<F16>>::Vector, ) -> <Avx512 as SimdKernel<F16>>::Vector
Source§unsafe fn gather(
base: *const F16,
indices: <Avx512 as SimdKernel<F16>>::IndexVector,
) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn gather( base: *const F16, indices: <Avx512 as SimdKernel<F16>>::IndexVector, ) -> <Avx512 as SimdKernel<F16>>::Vector
Source§unsafe fn gather_masked(
base: *const F16,
indices: <Avx512 as SimdKernel<F16>>::IndexVector,
mask: <Avx512 as SimdKernel<F16>>::Mask,
src: <Avx512 as SimdKernel<F16>>::Vector,
) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn gather_masked( base: *const F16, indices: <Avx512 as SimdKernel<F16>>::IndexVector, mask: <Avx512 as SimdKernel<F16>>::Mask, src: <Avx512 as SimdKernel<F16>>::Vector, ) -> <Avx512 as SimdKernel<F16>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<F16>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<F16>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<F16>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<F16>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: F16) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn splat(val: F16) -> <Avx512 as SimdKernel<F16>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<F16>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<F16>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<F16>>::Mask,
) -> <Avx512 as SimdKernel<F16>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<F16>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<F16>>::Vector,
) -> <Avx512 as SimdKernel<F16>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<F16>>::Vector, ) -> <Avx512 as SimdKernel<F16>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§impl SimdKernel<F32> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<F32> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 16
const LANE_COUNT: usize = 16
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [F32; 16]
type Vector = [F32; 16]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const F32) -> <Avx512 as SimdKernel<F32>>::Vector
unsafe fn load_aligned(ptr: *const F32) -> <Avx512 as SimdKernel<F32>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const F32) -> <Avx512 as SimdKernel<F32>>::Vector
unsafe fn load_unaligned(ptr: *const F32) -> <Avx512 as SimdKernel<F32>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut F32, val: <Avx512 as SimdKernel<F32>>::Vector)
unsafe fn store_aligned(ptr: *mut F32, val: <Avx512 as SimdKernel<F32>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(
ptr: *mut F32,
val: <Avx512 as SimdKernel<F32>>::Vector,
)
unsafe fn store_unaligned( ptr: *mut F32, val: <Avx512 as SimdKernel<F32>>::Vector, )
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<F32>>::Vector,
b: <Avx512 as SimdKernel<F32>>::Vector,
) -> <Avx512 as SimdKernel<F32>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<F32>>::Vector, b: <Avx512 as SimdKernel<F32>>::Vector, ) -> <Avx512 as SimdKernel<F32>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<F32>>::Vector,
b: <Avx512 as SimdKernel<F32>>::Vector,
) -> <Avx512 as SimdKernel<F32>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<F32>>::Vector, b: <Avx512 as SimdKernel<F32>>::Vector, ) -> <Avx512 as SimdKernel<F32>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<F32>>::Vector,
b: <Avx512 as SimdKernel<F32>>::Vector,
) -> <Avx512 as SimdKernel<F32>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<F32>>::Vector, b: <Avx512 as SimdKernel<F32>>::Vector, ) -> <Avx512 as SimdKernel<F32>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn neg(
a: <Avx512 as SimdKernel<F32>>::Vector,
) -> <Avx512 as SimdKernel<F32>>::Vector
unsafe fn neg( a: <Avx512 as SimdKernel<F32>>::Vector, ) -> <Avx512 as SimdKernel<F32>>::Vector
Elementwise negate:
-a. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<F32>>::Vector,
b: <Avx512 as SimdKernel<F32>>::Vector,
c: <Avx512 as SimdKernel<F32>>::Vector,
) -> <Avx512 as SimdKernel<F32>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<F32>>::Vector, b: <Avx512 as SimdKernel<F32>>::Vector, c: <Avx512 as SimdKernel<F32>>::Vector, ) -> <Avx512 as SimdKernel<F32>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<F32>>::Vector) -> F32
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<F32>>::Vector) -> F32
Horizontal sum of all lanes. Read more
Source§unsafe fn compress(
src: <Avx512 as SimdKernel<F32>>::Vector,
mask: <Avx512 as SimdKernel<F32>>::Mask,
) -> <Avx512 as SimdKernel<F32>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<F32>>::Vector, mask: <Avx512 as SimdKernel<F32>>::Mask, ) -> <Avx512 as SimdKernel<F32>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<F32>>::Vector,
mask: <Avx512 as SimdKernel<F32>>::Mask,
fill: <Avx512 as SimdKernel<F32>>::Vector,
) -> <Avx512 as SimdKernel<F32>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<F32>>::Vector, mask: <Avx512 as SimdKernel<F32>>::Mask, fill: <Avx512 as SimdKernel<F32>>::Vector, ) -> <Avx512 as SimdKernel<F32>>::Vector
Source§unsafe fn gather(
base: *const F32,
indices: <Avx512 as SimdKernel<F32>>::IndexVector,
) -> <Avx512 as SimdKernel<F32>>::Vector
unsafe fn gather( base: *const F32, indices: <Avx512 as SimdKernel<F32>>::IndexVector, ) -> <Avx512 as SimdKernel<F32>>::Vector
Source§unsafe fn gather_masked(
base: *const F32,
indices: <Avx512 as SimdKernel<F32>>::IndexVector,
mask: <Avx512 as SimdKernel<F32>>::Mask,
src: <Avx512 as SimdKernel<F32>>::Vector,
) -> <Avx512 as SimdKernel<F32>>::Vector
unsafe fn gather_masked( base: *const F32, indices: <Avx512 as SimdKernel<F32>>::IndexVector, mask: <Avx512 as SimdKernel<F32>>::Mask, src: <Avx512 as SimdKernel<F32>>::Vector, ) -> <Avx512 as SimdKernel<F32>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<F32>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<F32>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<F32>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<F32>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: F32) -> <Avx512 as SimdKernel<F32>>::Vector
unsafe fn splat(val: F32) -> <Avx512 as SimdKernel<F32>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<F32>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<F32>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<F32>>::Mask,
) -> <Avx512 as SimdKernel<F32>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<F32>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<F32>>::Vector,
) -> <Avx512 as SimdKernel<F32>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<F32>>::Vector, ) -> <Avx512 as SimdKernel<F32>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut T,
mask: Self::Mask,
val: Self::Vector,
)
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 moreSource§unsafe fn masked_add(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_mul(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_fmadd(
a: Self::Vector,
b: Self::Vector,
c: Self::Vector,
mask: Self::Mask,
) -> Self::Vector
unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector
Source§unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§impl SimdKernel<F64> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<F64> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 8
const LANE_COUNT: usize = 8
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [F64; 8]
type Vector = [F64; 8]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const F64) -> <Avx512 as SimdKernel<F64>>::Vector
unsafe fn load_aligned(ptr: *const F64) -> <Avx512 as SimdKernel<F64>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const F64) -> <Avx512 as SimdKernel<F64>>::Vector
unsafe fn load_unaligned(ptr: *const F64) -> <Avx512 as SimdKernel<F64>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut F64, val: <Avx512 as SimdKernel<F64>>::Vector)
unsafe fn store_aligned(ptr: *mut F64, val: <Avx512 as SimdKernel<F64>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(
ptr: *mut F64,
val: <Avx512 as SimdKernel<F64>>::Vector,
)
unsafe fn store_unaligned( ptr: *mut F64, val: <Avx512 as SimdKernel<F64>>::Vector, )
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<F64>>::Vector,
b: <Avx512 as SimdKernel<F64>>::Vector,
) -> <Avx512 as SimdKernel<F64>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<F64>>::Vector, b: <Avx512 as SimdKernel<F64>>::Vector, ) -> <Avx512 as SimdKernel<F64>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<F64>>::Vector,
b: <Avx512 as SimdKernel<F64>>::Vector,
) -> <Avx512 as SimdKernel<F64>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<F64>>::Vector, b: <Avx512 as SimdKernel<F64>>::Vector, ) -> <Avx512 as SimdKernel<F64>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<F64>>::Vector,
b: <Avx512 as SimdKernel<F64>>::Vector,
) -> <Avx512 as SimdKernel<F64>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<F64>>::Vector, b: <Avx512 as SimdKernel<F64>>::Vector, ) -> <Avx512 as SimdKernel<F64>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn neg(
a: <Avx512 as SimdKernel<F64>>::Vector,
) -> <Avx512 as SimdKernel<F64>>::Vector
unsafe fn neg( a: <Avx512 as SimdKernel<F64>>::Vector, ) -> <Avx512 as SimdKernel<F64>>::Vector
Elementwise negate:
-a. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<F64>>::Vector,
b: <Avx512 as SimdKernel<F64>>::Vector,
c: <Avx512 as SimdKernel<F64>>::Vector,
) -> <Avx512 as SimdKernel<F64>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<F64>>::Vector, b: <Avx512 as SimdKernel<F64>>::Vector, c: <Avx512 as SimdKernel<F64>>::Vector, ) -> <Avx512 as SimdKernel<F64>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<F64>>::Vector) -> F64
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<F64>>::Vector) -> F64
Horizontal sum of all lanes. Read more
Source§unsafe fn compress(
src: <Avx512 as SimdKernel<F64>>::Vector,
mask: <Avx512 as SimdKernel<F64>>::Mask,
) -> <Avx512 as SimdKernel<F64>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<F64>>::Vector, mask: <Avx512 as SimdKernel<F64>>::Mask, ) -> <Avx512 as SimdKernel<F64>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<F64>>::Vector,
mask: <Avx512 as SimdKernel<F64>>::Mask,
fill: <Avx512 as SimdKernel<F64>>::Vector,
) -> <Avx512 as SimdKernel<F64>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<F64>>::Vector, mask: <Avx512 as SimdKernel<F64>>::Mask, fill: <Avx512 as SimdKernel<F64>>::Vector, ) -> <Avx512 as SimdKernel<F64>>::Vector
Source§unsafe fn gather(
base: *const F64,
indices: <Avx512 as SimdKernel<F64>>::IndexVector,
) -> <Avx512 as SimdKernel<F64>>::Vector
unsafe fn gather( base: *const F64, indices: <Avx512 as SimdKernel<F64>>::IndexVector, ) -> <Avx512 as SimdKernel<F64>>::Vector
Source§unsafe fn gather_masked(
base: *const F64,
indices: <Avx512 as SimdKernel<F64>>::IndexVector,
mask: <Avx512 as SimdKernel<F64>>::Mask,
src: <Avx512 as SimdKernel<F64>>::Vector,
) -> <Avx512 as SimdKernel<F64>>::Vector
unsafe fn gather_masked( base: *const F64, indices: <Avx512 as SimdKernel<F64>>::IndexVector, mask: <Avx512 as SimdKernel<F64>>::Mask, src: <Avx512 as SimdKernel<F64>>::Vector, ) -> <Avx512 as SimdKernel<F64>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<F64>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<F64>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<F64>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<F64>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: F64) -> <Avx512 as SimdKernel<F64>>::Vector
unsafe fn splat(val: F64) -> <Avx512 as SimdKernel<F64>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<F64>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<F64>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<F64>>::Mask,
) -> <Avx512 as SimdKernel<F64>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<F64>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<F64>>::Vector,
) -> <Avx512 as SimdKernel<F64>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<F64>>::Vector, ) -> <Avx512 as SimdKernel<F64>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut T,
mask: Self::Mask,
val: Self::Vector,
)
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 moreSource§unsafe fn masked_add(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_mul(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_fmadd(
a: Self::Vector,
b: Self::Vector,
c: Self::Vector,
mask: Self::Mask,
) -> Self::Vector
unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector
Source§unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§impl SimdKernel<I8> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<I8> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 64
const LANE_COUNT: usize = 64
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [I8; 64]
type Vector = [I8; 64]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const I8) -> <Avx512 as SimdKernel<I8>>::Vector
unsafe fn load_aligned(ptr: *const I8) -> <Avx512 as SimdKernel<I8>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const I8) -> <Avx512 as SimdKernel<I8>>::Vector
unsafe fn load_unaligned(ptr: *const I8) -> <Avx512 as SimdKernel<I8>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut I8, val: <Avx512 as SimdKernel<I8>>::Vector)
unsafe fn store_aligned(ptr: *mut I8, val: <Avx512 as SimdKernel<I8>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(ptr: *mut I8, val: <Avx512 as SimdKernel<I8>>::Vector)
unsafe fn store_unaligned(ptr: *mut I8, val: <Avx512 as SimdKernel<I8>>::Vector)
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<I8>>::Vector,
b: <Avx512 as SimdKernel<I8>>::Vector,
) -> <Avx512 as SimdKernel<I8>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<I8>>::Vector, b: <Avx512 as SimdKernel<I8>>::Vector, ) -> <Avx512 as SimdKernel<I8>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<I8>>::Vector,
b: <Avx512 as SimdKernel<I8>>::Vector,
) -> <Avx512 as SimdKernel<I8>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<I8>>::Vector, b: <Avx512 as SimdKernel<I8>>::Vector, ) -> <Avx512 as SimdKernel<I8>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<I8>>::Vector,
b: <Avx512 as SimdKernel<I8>>::Vector,
) -> <Avx512 as SimdKernel<I8>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<I8>>::Vector, b: <Avx512 as SimdKernel<I8>>::Vector, ) -> <Avx512 as SimdKernel<I8>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn neg(
a: <Avx512 as SimdKernel<I8>>::Vector,
) -> <Avx512 as SimdKernel<I8>>::Vector
unsafe fn neg( a: <Avx512 as SimdKernel<I8>>::Vector, ) -> <Avx512 as SimdKernel<I8>>::Vector
Elementwise negate:
-a. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<I8>>::Vector,
b: <Avx512 as SimdKernel<I8>>::Vector,
c: <Avx512 as SimdKernel<I8>>::Vector,
) -> <Avx512 as SimdKernel<I8>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<I8>>::Vector, b: <Avx512 as SimdKernel<I8>>::Vector, c: <Avx512 as SimdKernel<I8>>::Vector, ) -> <Avx512 as SimdKernel<I8>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<I8>>::Vector) -> I8
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<I8>>::Vector) -> I8
Horizontal sum of all lanes. Read more
Source§unsafe fn compress(
src: <Avx512 as SimdKernel<I8>>::Vector,
mask: <Avx512 as SimdKernel<I8>>::Mask,
) -> <Avx512 as SimdKernel<I8>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<I8>>::Vector, mask: <Avx512 as SimdKernel<I8>>::Mask, ) -> <Avx512 as SimdKernel<I8>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<I8>>::Vector,
mask: <Avx512 as SimdKernel<I8>>::Mask,
fill: <Avx512 as SimdKernel<I8>>::Vector,
) -> <Avx512 as SimdKernel<I8>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<I8>>::Vector, mask: <Avx512 as SimdKernel<I8>>::Mask, fill: <Avx512 as SimdKernel<I8>>::Vector, ) -> <Avx512 as SimdKernel<I8>>::Vector
Source§unsafe fn gather(
base: *const I8,
indices: <Avx512 as SimdKernel<I8>>::IndexVector,
) -> <Avx512 as SimdKernel<I8>>::Vector
unsafe fn gather( base: *const I8, indices: <Avx512 as SimdKernel<I8>>::IndexVector, ) -> <Avx512 as SimdKernel<I8>>::Vector
Source§unsafe fn gather_masked(
base: *const I8,
indices: <Avx512 as SimdKernel<I8>>::IndexVector,
mask: <Avx512 as SimdKernel<I8>>::Mask,
src: <Avx512 as SimdKernel<I8>>::Vector,
) -> <Avx512 as SimdKernel<I8>>::Vector
unsafe fn gather_masked( base: *const I8, indices: <Avx512 as SimdKernel<I8>>::IndexVector, mask: <Avx512 as SimdKernel<I8>>::Mask, src: <Avx512 as SimdKernel<I8>>::Vector, ) -> <Avx512 as SimdKernel<I8>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<I8>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<I8>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<I8>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<I8>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: I8) -> <Avx512 as SimdKernel<I8>>::Vector
unsafe fn splat(val: I8) -> <Avx512 as SimdKernel<I8>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<I8>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<I8>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<I8>>::Mask,
) -> <Avx512 as SimdKernel<I8>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<I8>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<I8>>::Vector,
) -> <Avx512 as SimdKernel<I8>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<I8>>::Vector, ) -> <Avx512 as SimdKernel<I8>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut T,
mask: Self::Mask,
val: Self::Vector,
)
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 moreSource§unsafe fn masked_add(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_mul(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_fmadd(
a: Self::Vector,
b: Self::Vector,
c: Self::Vector,
mask: Self::Mask,
) -> Self::Vector
unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector
Source§unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§impl SimdKernel<I16> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<I16> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 32
const LANE_COUNT: usize = 32
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [I16; 32]
type Vector = [I16; 32]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const I16) -> <Avx512 as SimdKernel<I16>>::Vector
unsafe fn load_aligned(ptr: *const I16) -> <Avx512 as SimdKernel<I16>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const I16) -> <Avx512 as SimdKernel<I16>>::Vector
unsafe fn load_unaligned(ptr: *const I16) -> <Avx512 as SimdKernel<I16>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut I16, val: <Avx512 as SimdKernel<I16>>::Vector)
unsafe fn store_aligned(ptr: *mut I16, val: <Avx512 as SimdKernel<I16>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(
ptr: *mut I16,
val: <Avx512 as SimdKernel<I16>>::Vector,
)
unsafe fn store_unaligned( ptr: *mut I16, val: <Avx512 as SimdKernel<I16>>::Vector, )
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<I16>>::Vector,
b: <Avx512 as SimdKernel<I16>>::Vector,
) -> <Avx512 as SimdKernel<I16>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<I16>>::Vector, b: <Avx512 as SimdKernel<I16>>::Vector, ) -> <Avx512 as SimdKernel<I16>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<I16>>::Vector,
b: <Avx512 as SimdKernel<I16>>::Vector,
) -> <Avx512 as SimdKernel<I16>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<I16>>::Vector, b: <Avx512 as SimdKernel<I16>>::Vector, ) -> <Avx512 as SimdKernel<I16>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<I16>>::Vector,
b: <Avx512 as SimdKernel<I16>>::Vector,
) -> <Avx512 as SimdKernel<I16>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<I16>>::Vector, b: <Avx512 as SimdKernel<I16>>::Vector, ) -> <Avx512 as SimdKernel<I16>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn neg(
a: <Avx512 as SimdKernel<I16>>::Vector,
) -> <Avx512 as SimdKernel<I16>>::Vector
unsafe fn neg( a: <Avx512 as SimdKernel<I16>>::Vector, ) -> <Avx512 as SimdKernel<I16>>::Vector
Elementwise negate:
-a. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<I16>>::Vector,
b: <Avx512 as SimdKernel<I16>>::Vector,
c: <Avx512 as SimdKernel<I16>>::Vector,
) -> <Avx512 as SimdKernel<I16>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<I16>>::Vector, b: <Avx512 as SimdKernel<I16>>::Vector, c: <Avx512 as SimdKernel<I16>>::Vector, ) -> <Avx512 as SimdKernel<I16>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<I16>>::Vector) -> I16
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<I16>>::Vector) -> I16
Horizontal sum of all lanes. Read more
Source§unsafe fn compress(
src: <Avx512 as SimdKernel<I16>>::Vector,
mask: <Avx512 as SimdKernel<I16>>::Mask,
) -> <Avx512 as SimdKernel<I16>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<I16>>::Vector, mask: <Avx512 as SimdKernel<I16>>::Mask, ) -> <Avx512 as SimdKernel<I16>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<I16>>::Vector,
mask: <Avx512 as SimdKernel<I16>>::Mask,
fill: <Avx512 as SimdKernel<I16>>::Vector,
) -> <Avx512 as SimdKernel<I16>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<I16>>::Vector, mask: <Avx512 as SimdKernel<I16>>::Mask, fill: <Avx512 as SimdKernel<I16>>::Vector, ) -> <Avx512 as SimdKernel<I16>>::Vector
Source§unsafe fn gather(
base: *const I16,
indices: <Avx512 as SimdKernel<I16>>::IndexVector,
) -> <Avx512 as SimdKernel<I16>>::Vector
unsafe fn gather( base: *const I16, indices: <Avx512 as SimdKernel<I16>>::IndexVector, ) -> <Avx512 as SimdKernel<I16>>::Vector
Source§unsafe fn gather_masked(
base: *const I16,
indices: <Avx512 as SimdKernel<I16>>::IndexVector,
mask: <Avx512 as SimdKernel<I16>>::Mask,
src: <Avx512 as SimdKernel<I16>>::Vector,
) -> <Avx512 as SimdKernel<I16>>::Vector
unsafe fn gather_masked( base: *const I16, indices: <Avx512 as SimdKernel<I16>>::IndexVector, mask: <Avx512 as SimdKernel<I16>>::Mask, src: <Avx512 as SimdKernel<I16>>::Vector, ) -> <Avx512 as SimdKernel<I16>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<I16>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<I16>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<I16>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<I16>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: I16) -> <Avx512 as SimdKernel<I16>>::Vector
unsafe fn splat(val: I16) -> <Avx512 as SimdKernel<I16>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<I16>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<I16>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<I16>>::Mask,
) -> <Avx512 as SimdKernel<I16>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<I16>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<I16>>::Vector,
) -> <Avx512 as SimdKernel<I16>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<I16>>::Vector, ) -> <Avx512 as SimdKernel<I16>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut T,
mask: Self::Mask,
val: Self::Vector,
)
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 moreSource§unsafe fn masked_add(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_mul(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_fmadd(
a: Self::Vector,
b: Self::Vector,
c: Self::Vector,
mask: Self::Mask,
) -> Self::Vector
unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector
Source§unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§impl SimdKernel<I32> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<I32> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 16
const LANE_COUNT: usize = 16
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [I32; 16]
type Vector = [I32; 16]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const I32) -> <Avx512 as SimdKernel<I32>>::Vector
unsafe fn load_aligned(ptr: *const I32) -> <Avx512 as SimdKernel<I32>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const I32) -> <Avx512 as SimdKernel<I32>>::Vector
unsafe fn load_unaligned(ptr: *const I32) -> <Avx512 as SimdKernel<I32>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut I32, val: <Avx512 as SimdKernel<I32>>::Vector)
unsafe fn store_aligned(ptr: *mut I32, val: <Avx512 as SimdKernel<I32>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(
ptr: *mut I32,
val: <Avx512 as SimdKernel<I32>>::Vector,
)
unsafe fn store_unaligned( ptr: *mut I32, val: <Avx512 as SimdKernel<I32>>::Vector, )
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<I32>>::Vector,
b: <Avx512 as SimdKernel<I32>>::Vector,
) -> <Avx512 as SimdKernel<I32>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<I32>>::Vector, b: <Avx512 as SimdKernel<I32>>::Vector, ) -> <Avx512 as SimdKernel<I32>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<I32>>::Vector,
b: <Avx512 as SimdKernel<I32>>::Vector,
) -> <Avx512 as SimdKernel<I32>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<I32>>::Vector, b: <Avx512 as SimdKernel<I32>>::Vector, ) -> <Avx512 as SimdKernel<I32>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<I32>>::Vector,
b: <Avx512 as SimdKernel<I32>>::Vector,
) -> <Avx512 as SimdKernel<I32>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<I32>>::Vector, b: <Avx512 as SimdKernel<I32>>::Vector, ) -> <Avx512 as SimdKernel<I32>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn neg(
a: <Avx512 as SimdKernel<I32>>::Vector,
) -> <Avx512 as SimdKernel<I32>>::Vector
unsafe fn neg( a: <Avx512 as SimdKernel<I32>>::Vector, ) -> <Avx512 as SimdKernel<I32>>::Vector
Elementwise negate:
-a. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<I32>>::Vector,
b: <Avx512 as SimdKernel<I32>>::Vector,
c: <Avx512 as SimdKernel<I32>>::Vector,
) -> <Avx512 as SimdKernel<I32>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<I32>>::Vector, b: <Avx512 as SimdKernel<I32>>::Vector, c: <Avx512 as SimdKernel<I32>>::Vector, ) -> <Avx512 as SimdKernel<I32>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<I32>>::Vector) -> I32
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<I32>>::Vector) -> I32
Horizontal sum of all lanes. Read more
Source§unsafe fn compress(
src: <Avx512 as SimdKernel<I32>>::Vector,
mask: <Avx512 as SimdKernel<I32>>::Mask,
) -> <Avx512 as SimdKernel<I32>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<I32>>::Vector, mask: <Avx512 as SimdKernel<I32>>::Mask, ) -> <Avx512 as SimdKernel<I32>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<I32>>::Vector,
mask: <Avx512 as SimdKernel<I32>>::Mask,
fill: <Avx512 as SimdKernel<I32>>::Vector,
) -> <Avx512 as SimdKernel<I32>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<I32>>::Vector, mask: <Avx512 as SimdKernel<I32>>::Mask, fill: <Avx512 as SimdKernel<I32>>::Vector, ) -> <Avx512 as SimdKernel<I32>>::Vector
Source§unsafe fn gather(
base: *const I32,
indices: <Avx512 as SimdKernel<I32>>::IndexVector,
) -> <Avx512 as SimdKernel<I32>>::Vector
unsafe fn gather( base: *const I32, indices: <Avx512 as SimdKernel<I32>>::IndexVector, ) -> <Avx512 as SimdKernel<I32>>::Vector
Source§unsafe fn gather_masked(
base: *const I32,
indices: <Avx512 as SimdKernel<I32>>::IndexVector,
mask: <Avx512 as SimdKernel<I32>>::Mask,
src: <Avx512 as SimdKernel<I32>>::Vector,
) -> <Avx512 as SimdKernel<I32>>::Vector
unsafe fn gather_masked( base: *const I32, indices: <Avx512 as SimdKernel<I32>>::IndexVector, mask: <Avx512 as SimdKernel<I32>>::Mask, src: <Avx512 as SimdKernel<I32>>::Vector, ) -> <Avx512 as SimdKernel<I32>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<I32>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<I32>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<I32>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<I32>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: I32) -> <Avx512 as SimdKernel<I32>>::Vector
unsafe fn splat(val: I32) -> <Avx512 as SimdKernel<I32>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<I32>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<I32>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<I32>>::Mask,
) -> <Avx512 as SimdKernel<I32>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<I32>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<I32>>::Vector,
) -> <Avx512 as SimdKernel<I32>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<I32>>::Vector, ) -> <Avx512 as SimdKernel<I32>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut T,
mask: Self::Mask,
val: Self::Vector,
)
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 moreSource§unsafe fn masked_add(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_mul(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_fmadd(
a: Self::Vector,
b: Self::Vector,
c: Self::Vector,
mask: Self::Mask,
) -> Self::Vector
unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector
Source§unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§impl SimdKernel<f32> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<f32> for Avx512
Available on x86 or x86-64 only.
Source§type IndexVector = __m512i
type IndexVector = __m512i
16 × i32 index vector for gather (__m512i).
Source§unsafe fn masked_fmadd(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
c: <Avx512 as SimdKernel<f32>>::Vector,
mask: <Avx512 as SimdKernel<f32>>::Mask,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn masked_fmadd( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, c: <Avx512 as SimdKernel<f32>>::Vector, mask: <Avx512 as SimdKernel<f32>>::Mask, ) -> <Avx512 as SimdKernel<f32>>::Vector
mask3_fmadd: inactive lanes retain c (the addend / 3rd operand).
Source§const LANE_COUNT: usize = 16
const LANE_COUNT: usize = 16
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§const SUPPORTS_NT_STORE: bool = true
const SUPPORTS_NT_STORE: bool = true
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§type Vector = Avx512F32Vec
type Vector = Avx512F32Vec
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const f32) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn load_aligned(ptr: *const f32) -> <Avx512 as SimdKernel<f32>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const f32) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn load_unaligned(ptr: *const f32) -> <Avx512 as SimdKernel<f32>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut f32, val: <Avx512 as SimdKernel<f32>>::Vector)
unsafe fn store_aligned(ptr: *mut f32, val: <Avx512 as SimdKernel<f32>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(
ptr: *mut f32,
val: <Avx512 as SimdKernel<f32>>::Vector,
)
unsafe fn store_unaligned( ptr: *mut f32, val: <Avx512 as SimdKernel<f32>>::Vector, )
Store a vector to an unaligned pointer. Read more
Source§unsafe fn store_streaming(
ptr: *mut f32,
val: <Avx512 as SimdKernel<f32>>::Vector,
)
unsafe fn store_streaming( ptr: *mut f32, val: <Avx512 as SimdKernel<f32>>::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 moreSource§fn stream_write_barrier()
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 add(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
c: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, c: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn swap_adjacent(
v: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn swap_adjacent( v: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(
v: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn dup_even( v: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(
v: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn dup_odd( v: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§unsafe fn fmaddsub(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
c: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn fmaddsub( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, c: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Source§unsafe fn fmsubadd(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
c: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn fmsubadd( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, c: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Source§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<f32>>::Vector) -> f32
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<f32>>::Vector) -> f32
Horizontal sum of all lanes. Read more
Source§unsafe fn masked_load_unaligned(
ptr: *const f32,
mask: <Avx512 as SimdKernel<f32>>::Mask,
src: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn masked_load_unaligned( ptr: *const f32, mask: <Avx512 as SimdKernel<f32>>::Mask, src: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut f32,
mask: <Avx512 as SimdKernel<f32>>::Mask,
val: <Avx512 as SimdKernel<f32>>::Vector,
)
unsafe fn masked_store_unaligned( ptr: *mut f32, mask: <Avx512 as SimdKernel<f32>>::Mask, val: <Avx512 as SimdKernel<f32>>::Vector, )
Masked store: active lanes written to
ptr, inactive lanes left unchanged. Read moreSource§unsafe fn masked_add(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
mask: <Avx512 as SimdKernel<f32>>::Mask,
src: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn masked_add( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, mask: <Avx512 as SimdKernel<f32>>::Mask, src: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Source§unsafe fn masked_mul(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
mask: <Avx512 as SimdKernel<f32>>::Mask,
src: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn masked_mul( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, mask: <Avx512 as SimdKernel<f32>>::Mask, src: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Source§unsafe fn masked_sum_reduce(
v: <Avx512 as SimdKernel<f32>>::Vector,
mask: <Avx512 as SimdKernel<f32>>::Mask,
) -> f32
unsafe fn masked_sum_reduce( v: <Avx512 as SimdKernel<f32>>::Vector, mask: <Avx512 as SimdKernel<f32>>::Mask, ) -> f32
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn compress(
src: <Avx512 as SimdKernel<f32>>::Vector,
mask: <Avx512 as SimdKernel<f32>>::Mask,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<f32>>::Vector, mask: <Avx512 as SimdKernel<f32>>::Mask, ) -> <Avx512 as SimdKernel<f32>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<f32>>::Vector,
mask: <Avx512 as SimdKernel<f32>>::Mask,
fill: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<f32>>::Vector, mask: <Avx512 as SimdKernel<f32>>::Mask, fill: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Source§unsafe fn gather(
base: *const f32,
indices: <Avx512 as SimdKernel<f32>>::IndexVector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn gather( base: *const f32, indices: <Avx512 as SimdKernel<f32>>::IndexVector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Source§unsafe fn gather_masked(
base: *const f32,
indices: <Avx512 as SimdKernel<f32>>::IndexVector,
mask: <Avx512 as SimdKernel<f32>>::Mask,
src: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn gather_masked( base: *const f32, indices: <Avx512 as SimdKernel<f32>>::IndexVector, mask: <Avx512 as SimdKernel<f32>>::Mask, src: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<f32>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<f32>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<f32>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<f32>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: f32) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn splat(val: f32) -> <Avx512 as SimdKernel<f32>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn div(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn div( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn bitand( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn bitor( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn bitxor( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn abs(
a: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn abs( a: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise absolute value. Read more
Source§unsafe fn min(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn min( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Source§unsafe fn max(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn max( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Source§unsafe fn sqrt(
a: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn sqrt( a: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise square root. Read more
Source§unsafe fn recip_sqrt(
a: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn recip_sqrt( a: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Source§unsafe fn popcount(
a: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn popcount( a: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise population count (number of set bits). Read more
Source§unsafe fn cmp_eq(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn cmp_eq( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn cmp_ne( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn cmp_lt( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn cmp_le( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn cmp_gt( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(
a: <Avx512 as SimdKernel<f32>>::Vector,
b: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn cmp_ge( a: <Avx512 as SimdKernel<f32>>::Vector, b: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: <Avx512 as SimdKernel<f32>>::Vector,
true_val: <Avx512 as SimdKernel<f32>>::Vector,
false_val: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn blend( mask: <Avx512 as SimdKernel<f32>>::Vector, true_val: <Avx512 as SimdKernel<f32>>::Vector, false_val: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Vector
Elementwise blend: select lanes from
true_val where the sign bit of mask is set,
and from false_val otherwise. Read moreSource§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<f32>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<f32>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<f32>>::Mask,
) -> <Avx512 as SimdKernel<f32>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<f32>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<f32>>::Vector,
) -> <Avx512 as SimdKernel<f32>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<f32>>::Vector, ) -> <Avx512 as SimdKernel<f32>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T
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
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
unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T
Horizontal bitwise XOR across all lanes. Read more
Source§impl SimdKernel<f64> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<f64> for Avx512
Available on x86 or x86-64 only.
Source§type IndexVector = __m256i
type IndexVector = __m256i
8 × i32 index vector for gather (__m256i).
Source§unsafe fn masked_fmadd(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
c: <Avx512 as SimdKernel<f64>>::Vector,
mask: <Avx512 as SimdKernel<f64>>::Mask,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn masked_fmadd( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, c: <Avx512 as SimdKernel<f64>>::Vector, mask: <Avx512 as SimdKernel<f64>>::Mask, ) -> <Avx512 as SimdKernel<f64>>::Vector
mask3_fmadd: inactive lanes retain c (the addend / 3rd operand).
Source§const LANE_COUNT: usize = 8
const LANE_COUNT: usize = 8
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§const SUPPORTS_NT_STORE: bool = true
const SUPPORTS_NT_STORE: bool = true
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§type Vector = Avx512F64Vec
type Vector = Avx512F64Vec
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const f64) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn load_aligned(ptr: *const f64) -> <Avx512 as SimdKernel<f64>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const f64) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn load_unaligned(ptr: *const f64) -> <Avx512 as SimdKernel<f64>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut f64, val: <Avx512 as SimdKernel<f64>>::Vector)
unsafe fn store_aligned(ptr: *mut f64, val: <Avx512 as SimdKernel<f64>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(
ptr: *mut f64,
val: <Avx512 as SimdKernel<f64>>::Vector,
)
unsafe fn store_unaligned( ptr: *mut f64, val: <Avx512 as SimdKernel<f64>>::Vector, )
Store a vector to an unaligned pointer. Read more
Source§unsafe fn store_streaming(
ptr: *mut f64,
val: <Avx512 as SimdKernel<f64>>::Vector,
)
unsafe fn store_streaming( ptr: *mut f64, val: <Avx512 as SimdKernel<f64>>::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 moreSource§fn stream_write_barrier()
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 add(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
c: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, c: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn swap_adjacent(
v: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn swap_adjacent( v: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(
v: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn dup_even( v: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(
v: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn dup_odd( v: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§unsafe fn fmaddsub(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
c: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn fmaddsub( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, c: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Source§unsafe fn fmsubadd(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
c: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn fmsubadd( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, c: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Source§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<f64>>::Vector) -> f64
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<f64>>::Vector) -> f64
Horizontal sum of all lanes. Read more
Source§unsafe fn masked_load_unaligned(
ptr: *const f64,
mask: <Avx512 as SimdKernel<f64>>::Mask,
src: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn masked_load_unaligned( ptr: *const f64, mask: <Avx512 as SimdKernel<f64>>::Mask, src: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut f64,
mask: <Avx512 as SimdKernel<f64>>::Mask,
val: <Avx512 as SimdKernel<f64>>::Vector,
)
unsafe fn masked_store_unaligned( ptr: *mut f64, mask: <Avx512 as SimdKernel<f64>>::Mask, val: <Avx512 as SimdKernel<f64>>::Vector, )
Masked store: active lanes written to
ptr, inactive lanes left unchanged. Read moreSource§unsafe fn masked_add(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
mask: <Avx512 as SimdKernel<f64>>::Mask,
src: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn masked_add( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, mask: <Avx512 as SimdKernel<f64>>::Mask, src: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Source§unsafe fn masked_mul(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
mask: <Avx512 as SimdKernel<f64>>::Mask,
src: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn masked_mul( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, mask: <Avx512 as SimdKernel<f64>>::Mask, src: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Source§unsafe fn masked_sum_reduce(
v: <Avx512 as SimdKernel<f64>>::Vector,
mask: <Avx512 as SimdKernel<f64>>::Mask,
) -> f64
unsafe fn masked_sum_reduce( v: <Avx512 as SimdKernel<f64>>::Vector, mask: <Avx512 as SimdKernel<f64>>::Mask, ) -> f64
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn compress(
src: <Avx512 as SimdKernel<f64>>::Vector,
mask: <Avx512 as SimdKernel<f64>>::Mask,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<f64>>::Vector, mask: <Avx512 as SimdKernel<f64>>::Mask, ) -> <Avx512 as SimdKernel<f64>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<f64>>::Vector,
mask: <Avx512 as SimdKernel<f64>>::Mask,
fill: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<f64>>::Vector, mask: <Avx512 as SimdKernel<f64>>::Mask, fill: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Source§unsafe fn gather(
base: *const f64,
indices: <Avx512 as SimdKernel<f64>>::IndexVector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn gather( base: *const f64, indices: <Avx512 as SimdKernel<f64>>::IndexVector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Source§unsafe fn gather_masked(
base: *const f64,
indices: <Avx512 as SimdKernel<f64>>::IndexVector,
mask: <Avx512 as SimdKernel<f64>>::Mask,
src: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn gather_masked( base: *const f64, indices: <Avx512 as SimdKernel<f64>>::IndexVector, mask: <Avx512 as SimdKernel<f64>>::Mask, src: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<f64>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<f64>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<f64>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<f64>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: f64) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn splat(val: f64) -> <Avx512 as SimdKernel<f64>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn div(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn div( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn bitand( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn bitor( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn bitxor( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn abs(
a: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn abs( a: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise absolute value. Read more
Source§unsafe fn min(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn min( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Source§unsafe fn max(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn max( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Source§unsafe fn sqrt(
a: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn sqrt( a: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise square root. Read more
Source§unsafe fn recip_sqrt(
a: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn recip_sqrt( a: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Source§unsafe fn popcount(
a: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn popcount( a: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise population count (number of set bits). Read more
Source§unsafe fn cmp_eq(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn cmp_eq( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn cmp_ne( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn cmp_lt( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn cmp_le( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn cmp_gt( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(
a: <Avx512 as SimdKernel<f64>>::Vector,
b: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn cmp_ge( a: <Avx512 as SimdKernel<f64>>::Vector, b: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: <Avx512 as SimdKernel<f64>>::Vector,
true_val: <Avx512 as SimdKernel<f64>>::Vector,
false_val: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn blend( mask: <Avx512 as SimdKernel<f64>>::Vector, true_val: <Avx512 as SimdKernel<f64>>::Vector, false_val: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Vector
Elementwise blend: select lanes from
true_val where the sign bit of mask is set,
and from false_val otherwise. Read moreSource§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<f64>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<f64>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<f64>>::Mask,
) -> <Avx512 as SimdKernel<f64>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<f64>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<f64>>::Vector,
) -> <Avx512 as SimdKernel<f64>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<f64>>::Vector, ) -> <Avx512 as SimdKernel<f64>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn horizontal_bitwise_and(v: Self::Vector) -> T
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
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
unsafe fn horizontal_bitwise_xor(v: Self::Vector) -> T
Horizontal bitwise XOR across all lanes. Read more
Source§impl SimdKernel<i8> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<i8> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 64
const LANE_COUNT: usize = 64
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [i8; 64]
type Vector = [i8; 64]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const i8) -> <Avx512 as SimdKernel<i8>>::Vector
unsafe fn load_aligned(ptr: *const i8) -> <Avx512 as SimdKernel<i8>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const i8) -> <Avx512 as SimdKernel<i8>>::Vector
unsafe fn load_unaligned(ptr: *const i8) -> <Avx512 as SimdKernel<i8>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut i8, val: <Avx512 as SimdKernel<i8>>::Vector)
unsafe fn store_aligned(ptr: *mut i8, val: <Avx512 as SimdKernel<i8>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(ptr: *mut i8, val: <Avx512 as SimdKernel<i8>>::Vector)
unsafe fn store_unaligned(ptr: *mut i8, val: <Avx512 as SimdKernel<i8>>::Vector)
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<i8>>::Vector,
b: <Avx512 as SimdKernel<i8>>::Vector,
) -> <Avx512 as SimdKernel<i8>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<i8>>::Vector, b: <Avx512 as SimdKernel<i8>>::Vector, ) -> <Avx512 as SimdKernel<i8>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<i8>>::Vector,
b: <Avx512 as SimdKernel<i8>>::Vector,
) -> <Avx512 as SimdKernel<i8>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<i8>>::Vector, b: <Avx512 as SimdKernel<i8>>::Vector, ) -> <Avx512 as SimdKernel<i8>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<i8>>::Vector,
b: <Avx512 as SimdKernel<i8>>::Vector,
) -> <Avx512 as SimdKernel<i8>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<i8>>::Vector, b: <Avx512 as SimdKernel<i8>>::Vector, ) -> <Avx512 as SimdKernel<i8>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn neg(
a: <Avx512 as SimdKernel<i8>>::Vector,
) -> <Avx512 as SimdKernel<i8>>::Vector
unsafe fn neg( a: <Avx512 as SimdKernel<i8>>::Vector, ) -> <Avx512 as SimdKernel<i8>>::Vector
Elementwise negate:
-a. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<i8>>::Vector,
b: <Avx512 as SimdKernel<i8>>::Vector,
c: <Avx512 as SimdKernel<i8>>::Vector,
) -> <Avx512 as SimdKernel<i8>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<i8>>::Vector, b: <Avx512 as SimdKernel<i8>>::Vector, c: <Avx512 as SimdKernel<i8>>::Vector, ) -> <Avx512 as SimdKernel<i8>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<i8>>::Vector) -> i8
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<i8>>::Vector) -> i8
Horizontal sum of all lanes. Read more
Source§unsafe fn compress(
src: <Avx512 as SimdKernel<i8>>::Vector,
mask: <Avx512 as SimdKernel<i8>>::Mask,
) -> <Avx512 as SimdKernel<i8>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<i8>>::Vector, mask: <Avx512 as SimdKernel<i8>>::Mask, ) -> <Avx512 as SimdKernel<i8>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<i8>>::Vector,
mask: <Avx512 as SimdKernel<i8>>::Mask,
fill: <Avx512 as SimdKernel<i8>>::Vector,
) -> <Avx512 as SimdKernel<i8>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<i8>>::Vector, mask: <Avx512 as SimdKernel<i8>>::Mask, fill: <Avx512 as SimdKernel<i8>>::Vector, ) -> <Avx512 as SimdKernel<i8>>::Vector
Source§unsafe fn gather(
base: *const i8,
indices: <Avx512 as SimdKernel<i8>>::IndexVector,
) -> <Avx512 as SimdKernel<i8>>::Vector
unsafe fn gather( base: *const i8, indices: <Avx512 as SimdKernel<i8>>::IndexVector, ) -> <Avx512 as SimdKernel<i8>>::Vector
Source§unsafe fn gather_masked(
base: *const i8,
indices: <Avx512 as SimdKernel<i8>>::IndexVector,
mask: <Avx512 as SimdKernel<i8>>::Mask,
src: <Avx512 as SimdKernel<i8>>::Vector,
) -> <Avx512 as SimdKernel<i8>>::Vector
unsafe fn gather_masked( base: *const i8, indices: <Avx512 as SimdKernel<i8>>::IndexVector, mask: <Avx512 as SimdKernel<i8>>::Mask, src: <Avx512 as SimdKernel<i8>>::Vector, ) -> <Avx512 as SimdKernel<i8>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<i8>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<i8>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<i8>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<i8>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: i8) -> <Avx512 as SimdKernel<i8>>::Vector
unsafe fn splat(val: i8) -> <Avx512 as SimdKernel<i8>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<i8>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<i8>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<i8>>::Mask,
) -> <Avx512 as SimdKernel<i8>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<i8>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<i8>>::Vector,
) -> <Avx512 as SimdKernel<i8>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<i8>>::Vector, ) -> <Avx512 as SimdKernel<i8>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut T,
mask: Self::Mask,
val: Self::Vector,
)
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 moreSource§unsafe fn masked_add(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_mul(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_fmadd(
a: Self::Vector,
b: Self::Vector,
c: Self::Vector,
mask: Self::Mask,
) -> Self::Vector
unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector
Source§unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§impl SimdKernel<i16> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<i16> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 32
const LANE_COUNT: usize = 32
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [i16; 32]
type Vector = [i16; 32]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const i16) -> <Avx512 as SimdKernel<i16>>::Vector
unsafe fn load_aligned(ptr: *const i16) -> <Avx512 as SimdKernel<i16>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const i16) -> <Avx512 as SimdKernel<i16>>::Vector
unsafe fn load_unaligned(ptr: *const i16) -> <Avx512 as SimdKernel<i16>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut i16, val: <Avx512 as SimdKernel<i16>>::Vector)
unsafe fn store_aligned(ptr: *mut i16, val: <Avx512 as SimdKernel<i16>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(
ptr: *mut i16,
val: <Avx512 as SimdKernel<i16>>::Vector,
)
unsafe fn store_unaligned( ptr: *mut i16, val: <Avx512 as SimdKernel<i16>>::Vector, )
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<i16>>::Vector,
b: <Avx512 as SimdKernel<i16>>::Vector,
) -> <Avx512 as SimdKernel<i16>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<i16>>::Vector, b: <Avx512 as SimdKernel<i16>>::Vector, ) -> <Avx512 as SimdKernel<i16>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<i16>>::Vector,
b: <Avx512 as SimdKernel<i16>>::Vector,
) -> <Avx512 as SimdKernel<i16>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<i16>>::Vector, b: <Avx512 as SimdKernel<i16>>::Vector, ) -> <Avx512 as SimdKernel<i16>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<i16>>::Vector,
b: <Avx512 as SimdKernel<i16>>::Vector,
) -> <Avx512 as SimdKernel<i16>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<i16>>::Vector, b: <Avx512 as SimdKernel<i16>>::Vector, ) -> <Avx512 as SimdKernel<i16>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn neg(
a: <Avx512 as SimdKernel<i16>>::Vector,
) -> <Avx512 as SimdKernel<i16>>::Vector
unsafe fn neg( a: <Avx512 as SimdKernel<i16>>::Vector, ) -> <Avx512 as SimdKernel<i16>>::Vector
Elementwise negate:
-a. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<i16>>::Vector,
b: <Avx512 as SimdKernel<i16>>::Vector,
c: <Avx512 as SimdKernel<i16>>::Vector,
) -> <Avx512 as SimdKernel<i16>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<i16>>::Vector, b: <Avx512 as SimdKernel<i16>>::Vector, c: <Avx512 as SimdKernel<i16>>::Vector, ) -> <Avx512 as SimdKernel<i16>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<i16>>::Vector) -> i16
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<i16>>::Vector) -> i16
Horizontal sum of all lanes. Read more
Source§unsafe fn compress(
src: <Avx512 as SimdKernel<i16>>::Vector,
mask: <Avx512 as SimdKernel<i16>>::Mask,
) -> <Avx512 as SimdKernel<i16>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<i16>>::Vector, mask: <Avx512 as SimdKernel<i16>>::Mask, ) -> <Avx512 as SimdKernel<i16>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<i16>>::Vector,
mask: <Avx512 as SimdKernel<i16>>::Mask,
fill: <Avx512 as SimdKernel<i16>>::Vector,
) -> <Avx512 as SimdKernel<i16>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<i16>>::Vector, mask: <Avx512 as SimdKernel<i16>>::Mask, fill: <Avx512 as SimdKernel<i16>>::Vector, ) -> <Avx512 as SimdKernel<i16>>::Vector
Source§unsafe fn gather(
base: *const i16,
indices: <Avx512 as SimdKernel<i16>>::IndexVector,
) -> <Avx512 as SimdKernel<i16>>::Vector
unsafe fn gather( base: *const i16, indices: <Avx512 as SimdKernel<i16>>::IndexVector, ) -> <Avx512 as SimdKernel<i16>>::Vector
Source§unsafe fn gather_masked(
base: *const i16,
indices: <Avx512 as SimdKernel<i16>>::IndexVector,
mask: <Avx512 as SimdKernel<i16>>::Mask,
src: <Avx512 as SimdKernel<i16>>::Vector,
) -> <Avx512 as SimdKernel<i16>>::Vector
unsafe fn gather_masked( base: *const i16, indices: <Avx512 as SimdKernel<i16>>::IndexVector, mask: <Avx512 as SimdKernel<i16>>::Mask, src: <Avx512 as SimdKernel<i16>>::Vector, ) -> <Avx512 as SimdKernel<i16>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<i16>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<i16>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<i16>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<i16>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: i16) -> <Avx512 as SimdKernel<i16>>::Vector
unsafe fn splat(val: i16) -> <Avx512 as SimdKernel<i16>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<i16>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<i16>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<i16>>::Mask,
) -> <Avx512 as SimdKernel<i16>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<i16>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<i16>>::Vector,
) -> <Avx512 as SimdKernel<i16>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<i16>>::Vector, ) -> <Avx512 as SimdKernel<i16>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut T,
mask: Self::Mask,
val: Self::Vector,
)
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 moreSource§unsafe fn masked_add(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_mul(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_fmadd(
a: Self::Vector,
b: Self::Vector,
c: Self::Vector,
mask: Self::Mask,
) -> Self::Vector
unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector
Source§unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreSource§impl SimdKernel<i32> for Avx512
Available on x86 or x86-64 only.
impl SimdKernel<i32> for Avx512
Available on x86 or x86-64 only.
Source§const LANE_COUNT: usize = 16
const LANE_COUNT: usize = 16
Number of primitive elements of type
T in one Vector.Source§const UNROLL_FACTOR: usize = 4
const UNROLL_FACTOR: usize = 4
Loop unrolling register accumulation factor to break loop-carried dependency chains.
Source§type Vector = [i32; 16]
type Vector = [i32; 16]
The underlying raw register/vector type for this architecture and element type.
Source§unsafe fn load_aligned(ptr: *const i32) -> <Avx512 as SimdKernel<i32>>::Vector
unsafe fn load_aligned(ptr: *const i32) -> <Avx512 as SimdKernel<i32>>::Vector
Load a vector from an aligned pointer. Read more
Source§unsafe fn load_unaligned(ptr: *const i32) -> <Avx512 as SimdKernel<i32>>::Vector
unsafe fn load_unaligned(ptr: *const i32) -> <Avx512 as SimdKernel<i32>>::Vector
Load a vector from an unaligned pointer. Read more
Source§unsafe fn store_aligned(ptr: *mut i32, val: <Avx512 as SimdKernel<i32>>::Vector)
unsafe fn store_aligned(ptr: *mut i32, val: <Avx512 as SimdKernel<i32>>::Vector)
Store a vector to an aligned pointer. Read more
Source§unsafe fn store_unaligned(
ptr: *mut i32,
val: <Avx512 as SimdKernel<i32>>::Vector,
)
unsafe fn store_unaligned( ptr: *mut i32, val: <Avx512 as SimdKernel<i32>>::Vector, )
Store a vector to an unaligned pointer. Read more
Source§unsafe fn add(
a: <Avx512 as SimdKernel<i32>>::Vector,
b: <Avx512 as SimdKernel<i32>>::Vector,
) -> <Avx512 as SimdKernel<i32>>::Vector
unsafe fn add( a: <Avx512 as SimdKernel<i32>>::Vector, b: <Avx512 as SimdKernel<i32>>::Vector, ) -> <Avx512 as SimdKernel<i32>>::Vector
Elementwise addition:
a + b. Read moreSource§unsafe fn mul(
a: <Avx512 as SimdKernel<i32>>::Vector,
b: <Avx512 as SimdKernel<i32>>::Vector,
) -> <Avx512 as SimdKernel<i32>>::Vector
unsafe fn mul( a: <Avx512 as SimdKernel<i32>>::Vector, b: <Avx512 as SimdKernel<i32>>::Vector, ) -> <Avx512 as SimdKernel<i32>>::Vector
Elementwise multiplication:
a * b. Read moreSource§unsafe fn sub(
a: <Avx512 as SimdKernel<i32>>::Vector,
b: <Avx512 as SimdKernel<i32>>::Vector,
) -> <Avx512 as SimdKernel<i32>>::Vector
unsafe fn sub( a: <Avx512 as SimdKernel<i32>>::Vector, b: <Avx512 as SimdKernel<i32>>::Vector, ) -> <Avx512 as SimdKernel<i32>>::Vector
Elementwise subtraction:
a - b. Read moreSource§unsafe fn neg(
a: <Avx512 as SimdKernel<i32>>::Vector,
) -> <Avx512 as SimdKernel<i32>>::Vector
unsafe fn neg( a: <Avx512 as SimdKernel<i32>>::Vector, ) -> <Avx512 as SimdKernel<i32>>::Vector
Elementwise negate:
-a. Read moreSource§unsafe fn fmadd(
a: <Avx512 as SimdKernel<i32>>::Vector,
b: <Avx512 as SimdKernel<i32>>::Vector,
c: <Avx512 as SimdKernel<i32>>::Vector,
) -> <Avx512 as SimdKernel<i32>>::Vector
unsafe fn fmadd( a: <Avx512 as SimdKernel<i32>>::Vector, b: <Avx512 as SimdKernel<i32>>::Vector, c: <Avx512 as SimdKernel<i32>>::Vector, ) -> <Avx512 as SimdKernel<i32>>::Vector
Fused multiply-add:
(a * b) + c. Read moreSource§unsafe fn sum_reduce(v: <Avx512 as SimdKernel<i32>>::Vector) -> i32
unsafe fn sum_reduce(v: <Avx512 as SimdKernel<i32>>::Vector) -> i32
Horizontal sum of all lanes. Read more
Source§unsafe fn compress(
src: <Avx512 as SimdKernel<i32>>::Vector,
mask: <Avx512 as SimdKernel<i32>>::Mask,
) -> <Avx512 as SimdKernel<i32>>::Vector
unsafe fn compress( src: <Avx512 as SimdKernel<i32>>::Vector, mask: <Avx512 as SimdKernel<i32>>::Mask, ) -> <Avx512 as SimdKernel<i32>>::Vector
Compress: pack selected lanes (where
mask[i]=1) into the low lanes of the result. Read moreSource§unsafe fn expand(
src: <Avx512 as SimdKernel<i32>>::Vector,
mask: <Avx512 as SimdKernel<i32>>::Mask,
fill: <Avx512 as SimdKernel<i32>>::Vector,
) -> <Avx512 as SimdKernel<i32>>::Vector
unsafe fn expand( src: <Avx512 as SimdKernel<i32>>::Vector, mask: <Avx512 as SimdKernel<i32>>::Mask, fill: <Avx512 as SimdKernel<i32>>::Vector, ) -> <Avx512 as SimdKernel<i32>>::Vector
Source§unsafe fn gather(
base: *const i32,
indices: <Avx512 as SimdKernel<i32>>::IndexVector,
) -> <Avx512 as SimdKernel<i32>>::Vector
unsafe fn gather( base: *const i32, indices: <Avx512 as SimdKernel<i32>>::IndexVector, ) -> <Avx512 as SimdKernel<i32>>::Vector
Source§unsafe fn gather_masked(
base: *const i32,
indices: <Avx512 as SimdKernel<i32>>::IndexVector,
mask: <Avx512 as SimdKernel<i32>>::Mask,
src: <Avx512 as SimdKernel<i32>>::Vector,
) -> <Avx512 as SimdKernel<i32>>::Vector
unsafe fn gather_masked( base: *const i32, indices: <Avx512 as SimdKernel<i32>>::IndexVector, mask: <Avx512 as SimdKernel<i32>>::Mask, src: <Avx512 as SimdKernel<i32>>::Vector, ) -> <Avx512 as SimdKernel<i32>>::Vector
Masked gather: gather active lanes; inactive lanes take value from
src. Read moreSource§unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<i32>>::Mask
unsafe fn mask_from_bools(bits: &[bool]) -> <Avx512 as SimdKernel<i32>>::Mask
Construct a mask from a slice of booleans (length must equal
LANE_COUNT). Read moreSource§unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<i32>>::Mask
unsafe fn leading_k_mask(k: usize) -> <Avx512 as SimdKernel<i32>>::Mask
Construct a mask with the first
k lanes active and the rest inactive. Read moreSource§unsafe fn splat(val: i32) -> <Avx512 as SimdKernel<i32>>::Vector
unsafe fn splat(val: i32) -> <Avx512 as SimdKernel<i32>>::Vector
Broadcast a scalar value to all lanes. Read more
Source§unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<i32>>::Mask) -> u64
unsafe fn mask_to_bitmask(mask: <Avx512 as SimdKernel<i32>>::Mask) -> u64
Convert the native mask back to a raw
u64 bitmask. Read moreSource§unsafe fn mask_to_vector(
mask: <Avx512 as SimdKernel<i32>>::Mask,
) -> <Avx512 as SimdKernel<i32>>::Vector
unsafe fn mask_to_vector( mask: <Avx512 as SimdKernel<i32>>::Mask, ) -> <Avx512 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 moreSource§unsafe fn vector_to_mask(
v: <Avx512 as SimdKernel<i32>>::Vector,
) -> <Avx512 as SimdKernel<i32>>::Mask
unsafe fn vector_to_mask( v: <Avx512 as SimdKernel<i32>>::Vector, ) -> <Avx512 as SimdKernel<i32>>::Mask
Convert a comparison-result vector into the native mask, the inverse of
SimdKernel::mask_to_vector. Read moreSource§const LANE_BOUND_CHECK: () = _
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
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)
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 moreSource§fn stream_write_barrier()
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
unsafe fn masked_load_unaligned( ptr: *const T, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_store_unaligned(
ptr: *mut T,
mask: Self::Mask,
val: Self::Vector,
)
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 moreSource§unsafe fn masked_add(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_add( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_mul(
a: Self::Vector,
b: Self::Vector,
mask: Self::Mask,
src: Self::Vector,
) -> Self::Vector
unsafe fn masked_mul( a: Self::Vector, b: Self::Vector, mask: Self::Mask, src: Self::Vector, ) -> Self::Vector
Source§unsafe fn masked_fmadd(
a: Self::Vector,
b: Self::Vector,
c: Self::Vector,
mask: Self::Mask,
) -> Self::Vector
unsafe fn masked_fmadd( a: Self::Vector, b: Self::Vector, c: Self::Vector, mask: Self::Mask, ) -> Self::Vector
Source§unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
unsafe fn masked_sum_reduce(v: Self::Vector, mask: Self::Mask) -> T
Masked horizontal sum: only lanes where
mask[i]=1 contribute. Read moreSource§unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
unsafe fn mask_from_bitmask(bm: u64) -> Self::Mask
Convert a raw
u64 bitmask to the architecture-native mask type. Read moreSource§unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
unsafe fn scan_vector<Op, SMode>(v: Self::Vector, carry: T) -> (Self::Vector, T)
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 moreSource§unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn div(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise division:
a / b. Read moreSource§unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitand(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise AND:
a & b. Read moreSource§unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise OR:
a | b. Read moreSource§unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn bitxor(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise bitwise XOR:
a ^ b. Read moreSource§unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
unsafe fn recip_sqrt(a: Self::Vector) -> Self::Vector
Source§unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_eq(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise equal:
a == b. Read moreSource§unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ne(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise not equal:
a != b. Read moreSource§unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_lt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than:
a < b. Read moreSource§unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_le(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise less than or equal:
a <= b. Read moreSource§unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_gt(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than:
a > b. Read moreSource§unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
unsafe fn cmp_ge(a: Self::Vector, b: Self::Vector) -> Self::Vector
Elementwise greater than or equal:
a >= b. Read moreSource§unsafe fn blend(
mask: Self::Vector,
true_val: Self::Vector,
false_val: Self::Vector,
) -> Self::Vector
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 moreSource§unsafe fn min_reduce(v: Self::Vector) -> T
unsafe fn min_reduce(v: Self::Vector) -> T
Horizontal minimum across all lanes. Read more
Source§unsafe fn max_reduce(v: Self::Vector) -> T
unsafe fn max_reduce(v: Self::Vector) -> T
Horizontal maximum across all lanes. Read more
Source§unsafe fn popcount(a: Self::Vector) -> Self::Vector
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
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
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
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
unsafe fn swap_adjacent(v: Self::Vector) -> Self::Vector
Swap each adjacent lane pair:
[a0, a1, a2, a3, ...] -> [a1, a0, a3, a2, ...]. Read moreSource§unsafe fn dup_even(v: Self::Vector) -> Self::Vector
unsafe fn dup_even(v: Self::Vector) -> Self::Vector
Duplicate even lanes into odd lanes:
[a0, a1, a2, a3, ...] -> [a0, a0, a2, a2, ...]. Read moreSource§unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
unsafe fn dup_odd(v: Self::Vector) -> Self::Vector
Duplicate odd lanes into even lanes:
[a0, a1, a2, a3, ...] -> [a1, a1, a3, a3, ...]. Read moreimpl StructuralPartialEq for Avx512
Auto Trait Implementations§
impl Freeze for Avx512
impl RefUnwindSafe for Avx512
impl Send for Avx512
impl Sync for Avx512
impl Unpin for Avx512
impl UnsafeUnpin for Avx512
impl UnwindSafe for Avx512
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more