Skip to main content

I16

Struct I16 

Source
#[repr(transparent)]
pub struct I16(pub i16);
Expand description

Transparent wrapper for i16.

Tuple Fields§

§0: i16

Trait Implementations§

Source§

impl Add for I16

Source§

type Output = I16

The resulting type after applying the + operator.
Source§

fn add(self, rhs: I16) -> I16

Performs the + operation. Read more
Source§

impl AddAssign for I16

Source§

fn add_assign(&mut self, rhs: I16)

Performs the += operation. Read more
Source§

impl CastFrom<Bf4> for I16

Source§

fn cast_from(val: Bf4) -> I16

Cast from type T to Self.
Source§

impl CastFrom<Bf8> for I16

Source§

fn cast_from(val: Bf8) -> I16

Cast from type T to Self.
Source§

impl CastFrom<Bf16> for I16

Source§

fn cast_from(val: Bf16) -> I16

Cast from type T to Self.
Source§

impl CastFrom<F4> for I16

Source§

fn cast_from(val: F4) -> I16

Cast from type T to Self.
Source§

impl CastFrom<F8> for I16

Source§

fn cast_from(val: F8) -> I16

Cast from type T to Self.
Source§

impl CastFrom<F16> for I16

Source§

fn cast_from(val: F16) -> I16

Cast from type T to Self.
Source§

impl CastFrom<F32> for I16

Source§

fn cast_from(val: F32) -> I16

Cast from type T to Self.
Source§

impl CastFrom<F64> for I16

Source§

fn cast_from(val: F64) -> I16

Cast from type T to Self.
Source§

impl CastFrom<I8> for I16

Source§

fn cast_from(val: I8) -> I16

Cast from type T to Self.
Source§

impl CastFrom<I16> for f32

Source§

fn cast_from(val: I16) -> f32

Cast from type T to Self.
Source§

impl CastFrom<I16> for f64

Source§

fn cast_from(val: I16) -> f64

Cast from type T to Self.
Source§

impl CastFrom<I16> for i8

Source§

fn cast_from(val: I16) -> i8

Cast from type T to Self.
Source§

impl CastFrom<I16> for i16

Source§

fn cast_from(val: I16) -> i16

Cast from type T to Self.
Source§

impl CastFrom<I16> for i32

Source§

fn cast_from(val: I16) -> i32

Cast from type T to Self.
Source§

impl CastFrom<I16> for F16

Source§

fn cast_from(val: I16) -> F16

Cast from type T to Self.
Source§

impl CastFrom<I16> for F32

Source§

fn cast_from(val: I16) -> F32

Cast from type T to Self.
Source§

impl CastFrom<I16> for F64

Source§

fn cast_from(val: I16) -> F64

Cast from type T to Self.
Source§

impl CastFrom<I16> for Bf16

Source§

fn cast_from(val: I16) -> Bf16

Cast from type T to Self.
Source§

impl CastFrom<I16> for Bf8

Source§

fn cast_from(val: I16) -> Bf8

Cast from type T to Self.
Source§

impl CastFrom<I16> for Bf4

Source§

fn cast_from(val: I16) -> Bf4

Cast from type T to Self.
Source§

impl CastFrom<I16> for F8

Source§

fn cast_from(val: I16) -> F8

Cast from type T to Self.
Source§

impl CastFrom<I16> for F4

Source§

fn cast_from(val: I16) -> F4

Cast from type T to Self.
Source§

impl CastFrom<I16> for I16

Source§

fn cast_from(val: I16) -> I16

Cast from type T to Self.
Source§

impl CastFrom<I16> for I8

Source§

fn cast_from(val: I16) -> I8

Cast from type T to Self.
Source§

impl CastFrom<I16> for I32

Source§

fn cast_from(val: I16) -> I32

Cast from type T to Self.
Source§

impl CastFrom<I32> for I16

Source§

fn cast_from(val: I32) -> I16

Cast from type T to Self.
Source§

impl CastFrom<f32> for I16

Source§

fn cast_from(val: f32) -> I16

Cast from type T to Self.
Source§

impl CastFrom<f64> for I16

Source§

fn cast_from(val: f64) -> I16

Cast from type T to Self.
Source§

impl CastFrom<i8> for I16

Source§

fn cast_from(val: i8) -> I16

Cast from type T to Self.
Source§

impl CastFrom<i16> for I16

Source§

fn cast_from(val: i16) -> I16

Cast from type T to Self.
Source§

impl CastFrom<i32> for I16

Source§

fn cast_from(val: i32) -> I16

Cast from type T to Self.
Source§

impl Clone for I16

Source§

fn clone(&self) -> I16

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

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

Performs copy-assignment from source. Read more
Source§

impl Copy for I16

Source§

impl Debug for I16

Source§

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

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

impl Default for I16

Source§

fn default() -> I16

Returns the “default value” for a type. Read more
Source§

impl Div for I16

Source§

type Output = I16

The resulting type after applying the / operator.
Source§

fn div(self, rhs: I16) -> I16

Performs the / operation. Read more
Source§

impl Eq for I16

Source§

impl Hash for I16

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Mul for I16

Source§

type Output = I16

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: I16) -> I16

Performs the * operation. Read more
Source§

impl MulAssign for I16

Source§

fn mul_assign(&mut self, rhs: I16)

Performs the *= operation. Read more
Source§

impl Neg for I16

Source§

type Output = I16

The resulting type after applying the - operator.
Source§

fn neg(self) -> I16

Performs the unary - operation. Read more
Source§

impl NumericElement for I16

Source§

fn saturating_add(self, rhs: I16) -> I16

Native saturating_add replacement for the float-default self + rhs (which silently wraps on integer overflow in release / panics in debug). Caps at MAX_VALUE/MIN_VALUE.

Source§

fn saturating_mul(self, rhs: I16) -> I16

Native saturating_mul; see Self::saturating_add.

Source§

fn checked_add(self, rhs: I16) -> Option<I16>

Native checked_add returning None on integer overflow instead of the float-default Some(self + rhs), which silently wraps.

Source§

fn checked_mul(self, rhs: I16) -> Option<I16>

Native checked_mul; see Self::checked_add.

Source§

const ZERO: I16

Additive identity.
Source§

const ONE: I16

Multiplicative identity.
Source§

const NAN: I16

IEEE 754 not-a-number sentinel.
Source§

const INFINITY: I16

IEEE 754 positive infinity.
Source§

const MIN_VALUE: I16

The minimum representable finite value (negative infinity or i32::MIN). Read more
Source§

const MAX_VALUE: I16

The maximum representable finite value (positive infinity or i32::MAX). Read more
Source§

const BYTE_WIDTH: usize = 2

Number of bytes per element.
Source§

const ALL_ONES: I16

Bitwise representation with all bits set to 1.
Source§

const SIGN_MASK: I16

IEEE 754 sign-bit mask: only the most-significant bit is set. Read more
Source§

fn abs(self) -> I16

Absolute value.
Source§

fn scalar_fmadd(self, b: I16, c: I16) -> I16

Scalar fused multiply-add: (self * b) + c.
Source§

fn sqrt(self) -> I16

Square root. Floats follow IEEE 754 (NaN for negative inputs); integers return the exact floor integer square root (isqrt), with negative signed inputs defined to return 0 (integers have no NaN to signal the domain error). No f64 round-trip, so the integer result is exact for all operands.
Source§

fn is_finite(self) -> bool

Returns true if finite.
Source§

fn is_nan(self) -> bool

Returns true if NaN.
Source§

fn to_f64(self) -> f64

Cast to f64.
Source§

fn bitand(self, rhs: I16) -> I16

Bitwise AND.
Source§

fn bitor(self, rhs: I16) -> I16

Bitwise OR.
Source§

fn bitxor(self, rhs: I16) -> I16

Bitwise XOR.
Source§

fn count_ones(self) -> u32

Count set bits (population count).
Source§

fn min_scalar(self, other: Self) -> Self
where Self: PartialOrd,

Elementwise minimum: returns self if self <= other, else other. Read more
Source§

fn max_scalar(self, other: Self) -> Self
where Self: PartialOrd,

Elementwise maximum: returns self if self >= other, else other. Read more
Source§

impl Ord for I16

Source§

fn cmp(&self, other: &I16) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for I16

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl PartialOrd for I16

Source§

fn partial_cmp(&self, other: &I16) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Pod for I16

Source§

impl Pod for I16

Source§

impl SimdKernel<I16> for Scalar

Source§

const LANE_COUNT: usize = 8

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

const UNROLL_FACTOR: usize = 4

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

type Vector = [I16; 8]

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

type Mask = [bool; 8]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 8]

Integer index vector for gather operations. Read more
Source§

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

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

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

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

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

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

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

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

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

Elementwise addition: a + b. Read more
Source§

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

Elementwise multiplication: a * b. Read more
Source§

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

Elementwise subtraction: a - b. Read more
Source§

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

Elementwise negate: -a. Read more
Source§

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

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

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

Horizontal sum of all lanes. Read more
Source§

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

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

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

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

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

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

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

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

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

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

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

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

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

Set all lanes to zero. Read more
Source§

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

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

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

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

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

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

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

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

const LANE_BOUND_CHECK: () = _

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

const SUPPORTS_NT_STORE: bool = false

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

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

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

fn stream_write_barrier()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Elementwise division: a / b. Read more
Source§

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

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

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

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

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

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

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

Elementwise absolute value. Read more
Source§

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

Elementwise minimum of a and b. Read more
Source§

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

Elementwise maximum of a and b. Read more
Source§

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

Elementwise square root. Read more
Source§

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Elementwise bitwise NOT: !a. Read more
Source§

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

Horizontal minimum across all lanes. Read more
Source§

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

Horizontal maximum across all lanes. Read more
Source§

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

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

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

Horizontal bitwise AND across all lanes. Read more
Source§

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

Horizontal bitwise OR across all lanes. Read more
Source§

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

Horizontal bitwise XOR across all lanes. Read more
Source§

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

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

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

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

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

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

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

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

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

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

impl SimdKernel<I16> for Avx2

Available on x86 or x86-64 only.
Source§

const LANE_COUNT: usize = 16

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

const UNROLL_FACTOR: usize = 4

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

type Vector = [I16; 16]

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

type Mask = [bool; 16]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 16]

Integer index vector for gather operations. Read more
Source§

unsafe fn load_aligned(ptr: *const I16) -> <Avx2 as SimdKernel<I16>>::Vector

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

unsafe fn load_unaligned(ptr: *const I16) -> <Avx2 as SimdKernel<I16>>::Vector

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

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

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

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

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

unsafe fn add( a: <Avx2 as SimdKernel<I16>>::Vector, b: <Avx2 as SimdKernel<I16>>::Vector, ) -> <Avx2 as SimdKernel<I16>>::Vector

Elementwise addition: a + b. Read more
Source§

unsafe fn mul( a: <Avx2 as SimdKernel<I16>>::Vector, b: <Avx2 as SimdKernel<I16>>::Vector, ) -> <Avx2 as SimdKernel<I16>>::Vector

Elementwise multiplication: a * b. Read more
Source§

unsafe fn sub( a: <Avx2 as SimdKernel<I16>>::Vector, b: <Avx2 as SimdKernel<I16>>::Vector, ) -> <Avx2 as SimdKernel<I16>>::Vector

Elementwise subtraction: a - b. Read more
Source§

unsafe fn neg( a: <Avx2 as SimdKernel<I16>>::Vector, ) -> <Avx2 as SimdKernel<I16>>::Vector

Elementwise negate: -a. Read more
Source§

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

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

unsafe fn sum_reduce(v: <Avx2 as SimdKernel<I16>>::Vector) -> I16

Horizontal sum of all lanes. Read more
Source§

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

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

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

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

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

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

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

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

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

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

unsafe fn leading_k_mask(k: usize) -> <Avx2 as SimdKernel<I16>>::Mask

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

unsafe fn zero() -> <Avx2 as SimdKernel<I16>>::Vector

Set all lanes to zero. Read more
Source§

unsafe fn splat(val: I16) -> <Avx2 as SimdKernel<I16>>::Vector

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

unsafe fn mask_to_bitmask(mask: <Avx2 as SimdKernel<I16>>::Mask) -> u64

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

unsafe fn mask_to_vector( mask: <Avx2 as SimdKernel<I16>>::Mask, ) -> <Avx2 as SimdKernel<I16>>::Vector

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

unsafe fn vector_to_mask( v: <Avx2 as SimdKernel<I16>>::Vector, ) -> <Avx2 as SimdKernel<I16>>::Mask

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

const LANE_BOUND_CHECK: () = _

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

const SUPPORTS_NT_STORE: bool = false

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

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

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

fn stream_write_barrier()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Elementwise division: a / b. Read more
Source§

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

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

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

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

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

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

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

Elementwise absolute value. Read more
Source§

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

Elementwise minimum of a and b. Read more
Source§

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

Elementwise maximum of a and b. Read more
Source§

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

Elementwise square root. Read more
Source§

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Elementwise bitwise NOT: !a. Read more
Source§

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

Horizontal minimum across all lanes. Read more
Source§

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

Horizontal maximum across all lanes. Read more
Source§

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

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

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

Horizontal bitwise AND across all lanes. Read more
Source§

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

Horizontal bitwise OR across all lanes. Read more
Source§

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

Horizontal bitwise XOR across all lanes. Read more
Source§

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

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

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

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

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

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

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

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

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

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

impl SimdKernel<I16> for Avx512

Available on x86 or x86-64 only.
Source§

const LANE_COUNT: usize = 32

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

const UNROLL_FACTOR: usize = 4

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

type Vector = [I16; 32]

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

type Mask = [bool; 32]

Hardware-native mask type. Read more
Source§

type IndexVector = [i32; 32]

Integer index vector for gather operations. Read more
Source§

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

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

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, )

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

Elementwise addition: a + b. Read more
Source§

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 more
Source§

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 more
Source§

unsafe fn neg( a: <Avx512 as SimdKernel<I16>>::Vector, ) -> <Avx512 as SimdKernel<I16>>::Vector

Elementwise negate: -a. Read more
Source§

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 more
Source§

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

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

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

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

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

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

unsafe fn gather_masked( base: *const I16, indices: <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 more
Source§

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 more
Source§

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 more
Source§

unsafe fn zero() -> <Avx512 as SimdKernel<I16>>::Vector

Set all lanes to zero. Read more
Source§

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

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

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 more
Source§

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 more
Source§

const LANE_BOUND_CHECK: () = _

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

const SUPPORTS_NT_STORE: bool = false

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

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

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

fn stream_write_barrier()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Elementwise division: a / b. Read more
Source§

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

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

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

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

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

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

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

Elementwise absolute value. Read more
Source§

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

Elementwise minimum of a and b. Read more
Source§

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

Elementwise maximum of a and b. Read more
Source§

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

Elementwise square root. Read more
Source§

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Elementwise bitwise NOT: !a. Read more
Source§

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

Horizontal minimum across all lanes. Read more
Source§

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

Horizontal maximum across all lanes. Read more
Source§

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

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

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

Horizontal bitwise AND across all lanes. Read more
Source§

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

Horizontal bitwise OR across all lanes. Read more
Source§

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

Horizontal bitwise XOR across all lanes. Read more
Source§

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

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

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

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

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

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

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

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

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

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

impl StructuralPartialEq for I16

Source§

impl Sub for I16

Source§

type Output = I16

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: I16) -> I16

Performs the - operation. Read more
Source§

impl SubAssign for I16

Source§

fn sub_assign(&mut self, rhs: I16)

Performs the -= operation. Read more
Source§

impl Zeroable for I16

Source§

fn zeroed() -> Self

Returns a value of Self with every byte set to zero.
Source§

impl Zeroable for I16

Source§

fn zeroed() -> Self

Auto Trait Implementations§

§

impl Freeze for I16

§

impl RefUnwindSafe for I16

§

impl Send for I16

§

impl Sync for I16

§

impl Unpin for I16

§

impl UnsafeUnpin for I16

§

impl UnwindSafe for I16

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnyBitPattern for T
where T: Pod,

Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CastTo for T
where T: Copy,

Source§

fn cast_to<U>(self) -> U
where U: CastFrom<Self>,

Cast self to type U.
Source§

impl<T> CheckedBitPattern for T
where T: AnyBitPattern,

Source§

type Bits = T

Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern.
Source§

fn is_valid_bit_pattern(_bits: &T) -> bool

If this function returns true, then it must be valid to reinterpret bits as &Self.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> NoUninit for T
where T: Pod,

Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> SimdOps for T
where T: NumericElement + Sealed, Scalar: SimdKernel<T>, Avx2: SimdKernel<T>, Avx512: SimdKernel<T>,

Source§

fn sum(data: &[T]) -> T

Reduces the slice to its sum.
Source§

fn abs_sum(data: &[T]) -> T

Reduces the slice to Σ |x| (L1-norm accumulator); T::ZERO for empty.
Source§

fn abs_max(data: &[T]) -> T

Reduces the slice to max |x| (∞-norm accumulator); T::ZERO for empty.
Source§

fn min(data: &[T]) -> T

Reduces the slice to its minimum element. Read more
Source§

fn max(data: &[T]) -> T

Reduces the slice to its maximum element. Read more
Source§

fn scale(data: &mut [T], scalar: T)

Multiplies every element by scalar in-place.
Source§

fn argmin(data: &[T]) -> Option<(usize, T)>

Returns Some((index, value)) of the minimum element, or None for empty.
Source§

fn argmax(data: &[T]) -> Option<(usize, T)>

Returns Some((index, value)) of the maximum element, or None for empty.
Source§

fn dot(a: &[T], b: &[T]) -> Result<T, SimdError>

Computes the dot product of two slices.
Source§

fn axpy(alpha: T, x: &[T], out: &mut [T]) -> Result<(), SimdError>

Fused row update out[i] += alpha * x[i] (AXPY) with no temporaries.
Source§

fn axpy_mul(alpha: T, a: &[T], b: &[T], out: &mut [T]) -> Result<(), SimdError>

Fused ternary update out[i] += alpha * a[i] * b[i] with no temporary.
Source§

fn axpy_rows( alphas: &[T], x: &[T], out: &mut [T], row_stride: usize, rows: usize, cols: usize, ) -> Result<(), SimdError>

Fused multi-row update out[row, i] += alphas[row] * x[i].
Source§

fn axpy_rows_batch( alphas: &[T], x_panel: &[T], out: &mut [T], row_stride: usize, rows: usize, depth: usize, cols: usize, ) -> Result<(), SimdError>

Fused batched multi-row update: out[row, i] += sum_k alphas[k, row] * x_panel[k, i].
Source§

fn elementwise_mul(a: &[T], b: &[T], out: &mut [T]) -> Result<(), SimdError>

Computes the elementwise product and writes to out.
Source§

fn elementwise_add(a: &[T], b: &[T], out: &mut [T]) -> Result<(), SimdError>

Computes the elementwise sum a[i] + b[i] and writes to out.
Source§

fn elementwise_sub(a: &[T], b: &[T], out: &mut [T]) -> Result<(), SimdError>

Computes the elementwise difference a[i] - b[i] and writes to out.
Source§

fn elementwise_div(a: &[T], b: &[T], out: &mut [T]) -> Result<(), SimdError>

Computes the elementwise quotient a[i] / b[i] and writes to out.
Source§

fn masked_sum(data: &[T], mask: &[bool]) -> T

Computes the sum of elements matching a boolean mask.
Source§

fn masked_dot(a: &[T], b: &[T], mask: &[bool]) -> Result<T, SimdError>

Computes the dot product of elements matching a boolean mask.
Source§

fn masked_add( a: &[T], b: &[T], mask: &[bool], out: &mut [T], ) -> Result<(), SimdError>

Computes the elementwise sum of elements matching a boolean mask.
Source§

fn spmv_csr( data: ValidatedData<CsrMatrix<T, &[T], &[i32]>>, x: &[T], y: &mut [T], )

Computes sparse SpMV using CSR.
Source§

fn spmv_bcoo<const BM: usize, const BN: usize>( data: ValidatedData<BlockedCooMatrix<T, BM, BN, &[T], &[i32]>>, x: &[T], y: &mut [T], )

Computes sparse SpMV using const-generic Blocked-COO tiles.
Source§

fn spmv_dense_masked( data: DenseWithMaskMatrix<T, &[T], &[bool]>, x: &[T], y: &mut [T], )

Computes sparse SpMV using Dense-with-Mask.
Source§

fn spmv_sellp<const C: usize>( data: ValidatedData<SellPMatrix<T, C, &[T], &[i32]>>, x: &[T], y: &mut [T], )

Computes sparse SpMV using const-generic Sliced ELLPACK (SELL-p).
Source§

fn tiled_gemm( a: &[T], b: &[T], c: &mut [T], m: usize, n: usize, k: usize, ) -> Result<(), SimdError>

Computes register-blocked tiled GEMM: c += A * B.
Source§

fn gemv( a: &[T], x: &[T], y: &mut [T], nrows: usize, ncols: usize, ) -> Result<(), SimdError>

Computes register-blocked GEMV: y += A * x (A row-major nrows × ncols).
Source§

fn gemv_transpose( a: &[T], x: &[T], y: &mut [T], nrows: usize, ncols: usize, ) -> Result<(), SimdError>

Computes register-blocked transposed GEMV: y += Aᵀ * x (A row-major nrows × ncols, x length nrows, y length ncols).
Source§

fn gemv_strided( a: &[T], x: &[T], y: &mut [T], nrows: usize, ncols: usize, lda: usize, ) -> Result<(), SimdError>

Computes register-blocked sub-matrix GEMV: y += A * x with row stride lda ≥ ncols (lda = ncols is the packed Self::gemv).
Source§

fn gemv_transpose_strided( a: &[T], x: &[T], y: &mut [T], nrows: usize, ncols: usize, lda: usize, ) -> Result<(), SimdError>

Computes register-blocked transposed sub-matrix GEMV: y += Aᵀ * x with row stride lda ≥ ncols (lda = ncols is the packed Self::gemv_transpose).
Source§

fn interleaved_complex_mul_assign<const CONJ_B: bool>( a: &mut [T], b: &[T], ) -> Result<(), SimdError>
where T: Neg<Output = T>,

Multiplies interleaved complex lanes in-place: a[k] *= b[k] (a[k] *= conj(b[k]) when CONJ_B).
Source§

fn interleaved_complex_dot<const CONJ_B: bool>( a: &[T], b: &[T], ) -> Result<(T, T), SimdError>
where T: Neg<Output = T>,

Computes the interleaved complex dot product (re, im) of sum(a[k] * b[k]) (sum(a[k] * conj(b[k])) when CONJ_B).
Source§

fn reduce_popcount(data: &[T]) -> usize

Computes the horizontal sum of population counts of all elements.
Source§

fn reduce_popcount_and(a: &[T], b: &[T]) -> Result<usize, SimdError>

Computes the horizontal sum of population counts of a[i] & b[i].
Source§

fn reduce_popcount_or(a: &[T], b: &[T]) -> Result<usize, SimdError>

Computes the horizontal sum of population counts of a[i] | b[i].
Source§

fn reduce_popcount_xor(a: &[T], b: &[T]) -> Result<usize, SimdError>

Computes the horizontal sum of population counts of a[i] ^ b[i] (Hamming distance).
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.