Trait hagane_simd::vector::Vector
[−]
[src]
pub trait Vector: Sized + Copy + Add<Output = Self> + Sub<Output = Self> + Mul<Output = Self> + Div<Output = Self> + Dot<Self, DotProduct = Self::Scalar> + From<isize> { type Scalar: Scalar + Into<Self>; type Boolean: Select<Self> + Vector; type CharVector; type ShortVector; type IntVector; type LongVector; type UCharVector; type UShortVector; type UIntVector; type ULongVector; type FloatVector; type DoubleVector; fn map_unary(self, f: &Fn(Self::Scalar) -> Self::Scalar) -> Self; fn map_binary(
self,
other: Self,
f: &Fn(Self::Scalar, Self::Scalar) -> Self::Scalar
) -> Self; fn reduce(
self,
f: &Fn(Self::Scalar, Self::Scalar) -> Self::Scalar
) -> Self::Scalar; fn abs(self) -> Self; fn to_char_sat(self) -> Self::CharVector; fn to_short_sat(self) -> Self::ShortVector; fn to_int_sat(self) -> Self::IntVector; fn to_long_sat(self) -> Self::LongVector; fn to_uchar_sat(self) -> Self::UCharVector; fn to_ushort_sat(self) -> Self::UShortVector; fn to_uint_sat(self) -> Self::UIntVector; fn to_ulong_sat(self) -> Self::ULongVector; fn bitcast<T: Vector>(x: T) -> Self { ... } fn broadcast(x: Self::Scalar) -> Self { ... } fn extract(self, i: u32) -> Self::Scalar { ... } fn replace(self, i: u32, value: Self::Scalar) -> Self { ... } fn add_mul(self, a: Self, b: Self) -> Self { ... } fn eq(self, other: Self) -> Self::Boolean { ... } fn ne(self, other: Self) -> Self::Boolean { ... } fn lt(self, other: Self) -> Self::Boolean { ... } fn le(self, other: Self) -> Self::Boolean { ... } fn gt(self, other: Self) -> Self::Boolean { ... } fn ge(self, other: Self) -> Self::Boolean { ... } fn max(self, other: Self) -> Self { ... } fn min(self, other: Self) -> Self { ... } fn clamp(self, min: Self, max: Self) -> Self { ... } fn reduce_add(self) -> Self::Scalar { ... } fn reduce_max(self) -> Self::Scalar { ... } fn reduce_min(self) -> Self::Scalar { ... } fn to_char(self) -> Self::CharVector { ... } fn to_short(self) -> Self::ShortVector { ... } fn to_int(self) -> Self::IntVector { ... } fn to_long(self) -> Self::LongVector { ... } fn to_uchar(self) -> Self::UCharVector { ... } fn to_ushort(self) -> Self::UShortVector { ... } fn to_uint(self) -> Self::UIntVector { ... } fn to_ulong(self) -> Self::ULongVector { ... } fn to_float(self) -> Self::FloatVector { ... } fn to_double(self) -> Self::DoubleVector { ... } fn to_boolean(self) -> Self::Boolean { ... } }
Associated Types
type Scalar: Scalar + Into<Self>
type Boolean: Select<Self> + Vector
type CharVector
type ShortVector
type IntVector
type LongVector
type UCharVector
type UShortVector
type UIntVector
type ULongVector
type FloatVector
type DoubleVector
Required Methods
fn map_unary(self, f: &Fn(Self::Scalar) -> Self::Scalar) -> Self
fn map_binary(
self,
other: Self,
f: &Fn(Self::Scalar, Self::Scalar) -> Self::Scalar
) -> Self
self,
other: Self,
f: &Fn(Self::Scalar, Self::Scalar) -> Self::Scalar
) -> Self
fn reduce(
self,
f: &Fn(Self::Scalar, Self::Scalar) -> Self::Scalar
) -> Self::Scalar
self,
f: &Fn(Self::Scalar, Self::Scalar) -> Self::Scalar
) -> Self::Scalar
fn abs(self) -> Self
fn to_char_sat(self) -> Self::CharVector
fn to_short_sat(self) -> Self::ShortVector
fn to_int_sat(self) -> Self::IntVector
fn to_long_sat(self) -> Self::LongVector
fn to_uchar_sat(self) -> Self::UCharVector
fn to_ushort_sat(self) -> Self::UShortVector
fn to_uint_sat(self) -> Self::UIntVector
fn to_ulong_sat(self) -> Self::ULongVector
Provided Methods
fn bitcast<T: Vector>(x: T) -> Self
fn broadcast(x: Self::Scalar) -> Self
fn extract(self, i: u32) -> Self::Scalar
fn replace(self, i: u32, value: Self::Scalar) -> Self
fn add_mul(self, a: Self, b: Self) -> Self
fn eq(self, other: Self) -> Self::Boolean
fn ne(self, other: Self) -> Self::Boolean
fn lt(self, other: Self) -> Self::Boolean
fn le(self, other: Self) -> Self::Boolean
fn gt(self, other: Self) -> Self::Boolean
fn ge(self, other: Self) -> Self::Boolean
fn max(self, other: Self) -> Self
fn min(self, other: Self) -> Self
fn clamp(self, min: Self, max: Self) -> Self
fn reduce_add(self) -> Self::Scalar
fn reduce_max(self) -> Self::Scalar
fn reduce_min(self) -> Self::Scalar
fn to_char(self) -> Self::CharVector
fn to_short(self) -> Self::ShortVector
fn to_int(self) -> Self::IntVector
fn to_long(self) -> Self::LongVector
fn to_uchar(self) -> Self::UCharVector
fn to_ushort(self) -> Self::UShortVector
fn to_uint(self) -> Self::UIntVector
fn to_ulong(self) -> Self::ULongVector
fn to_float(self) -> Self::FloatVector
fn to_double(self) -> Self::DoubleVector
fn to_boolean(self) -> Self::Boolean
Implementors
impl Vector for char2
impl Vector for char3
impl Vector for char4
impl Vector for char8
impl Vector for char16
impl Vector for uchar2
impl Vector for uchar3
impl Vector for uchar4
impl Vector for uchar8
impl Vector for uchar16
impl Vector for short2
impl Vector for short3
impl Vector for short4
impl Vector for short8
impl Vector for short16
impl Vector for ushort2
impl Vector for ushort3
impl Vector for ushort4
impl Vector for ushort8
impl Vector for ushort16
impl Vector for int2
impl Vector for int3
impl Vector for int4
impl Vector for int8
impl Vector for int16
impl Vector for uint2
impl Vector for uint3
impl Vector for uint4
impl Vector for uint8
impl Vector for uint16
impl Vector for float2
impl Vector for float3
impl Vector for float4
impl Vector for float8
impl Vector for float16
impl Vector for long2
impl Vector for long3
impl Vector for long4
impl Vector for long8
impl Vector for long16
impl Vector for ulong2
impl Vector for ulong3
impl Vector for ulong4
impl Vector for ulong8
impl Vector for ulong16
impl Vector for double2
impl Vector for double3
impl Vector for double4
impl Vector for double8
impl Vector for double16