Skip to main content

ScalarBackend

Trait ScalarBackend 

Source
pub trait ScalarBackend<const N: usize, A: Alignment>{
Show 27 methods // Provided methods fn vec_eq(vec: &Vector<N, Self, A>, other: &Vector<N, Self, A>) -> bool where Self: Scalar + PartialEq { ... } fn vec_ne(vec: &Vector<N, Self, A>, other: &Vector<N, Self, A>) -> bool where Self: Scalar + PartialEq { ... } fn vec_neg(vec: Vector<N, Self, A>) -> Vector<N, Self, A> where Self: Scalar + Neg<Output = Self> { ... } fn vec_not(vec: Vector<N, Self, A>) -> Vector<N, Self, A> where Self: Scalar + Not<Output = Self> { ... } fn vec_add( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A> where Self: Scalar + Add<Output = Self> { ... } fn vec_sub( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A> where Self: Scalar + Sub<Output = Self> { ... } fn vec_mul( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A> where Self: Scalar + Mul<Output = Self> { ... } fn vec_div( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A> where Self: Scalar + Div<Output = Self> { ... } fn vec_rem( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A> where Self: Scalar + Rem<Output = Self> { ... } fn vec_shl( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A> where Self: Scalar + Shl<Output = Self> { ... } fn vec_shr( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A> where Self: Scalar + Shr<Output = Self> { ... } fn vec_bitand( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A> where Self: Scalar + BitAnd<Output = Self> { ... } fn vec_bitor( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A> where Self: Scalar + BitOr<Output = Self> { ... } fn vec_bitxor( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A> where Self: Scalar + BitXor<Output = Self> { ... } fn vec_eq_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A> where Self: Scalar + PartialEq { ... } fn vec_ne_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A> where Self: Scalar + PartialEq { ... } fn vec_lt_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A> where Self: Scalar + PartialOrd { ... } fn vec_gt_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A> where Self: Scalar + PartialOrd { ... } fn vec_le_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A> where Self: Scalar + PartialOrd { ... } fn vec_ge_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A> where Self: Scalar + PartialOrd { ... } fn mat_eq(mat: &Matrix<N, Self, A>, other: &Matrix<N, Self, A>) -> bool where Self: Scalar + PartialEq { ... } fn mat_ne(mat: &Matrix<N, Self, A>, other: &Matrix<N, Self, A>) -> bool where Self: Scalar + PartialEq { ... } fn mat_neg(mat: &Matrix<N, Self, A>) -> Matrix<N, Self, A> where Self: Scalar + Neg<Output = Self> { ... } fn mat_add( mat: &Matrix<N, Self, A>, rhs: &Matrix<N, Self, A>, ) -> Matrix<N, Self, A> where Self: Scalar + Add<Output = Self> { ... } fn mat_sub( mat: &Matrix<N, Self, A>, rhs: &Matrix<N, Self, A>, ) -> Matrix<N, Self, A> where Self: Scalar + Sub<Output = Self> { ... } fn affine_eq(affine: &Affine<N, Self, A>, rhs: &Affine<N, Self, A>) -> bool where Self: Scalar + PartialEq { ... } fn affine_ne(affine: &Affine<N, Self, A>, rhs: &Affine<N, Self, A>) -> bool where Self: Scalar + PartialEq { ... }
}
Expand description

Controls the implementation of math functions.

ScalarBackend<N, A> controls the function implementations of math types with length N, scalar type Self, and alignment A.

All ScalarBackend functions have a default implementation that can be overriden to make SIMD optimizations.

You should only override implementations to make optimizations, and generally you should be consistent with the behaviour of default implementations.

For more information, see the documentation for Scalar.

Provided Methods§

Source

fn vec_eq(vec: &Vector<N, Self, A>, other: &Vector<N, Self, A>) -> bool
where Self: Scalar + PartialEq,

Overridable implementation of the == operator for vectors.

Source

fn vec_ne(vec: &Vector<N, Self, A>, other: &Vector<N, Self, A>) -> bool
where Self: Scalar + PartialEq,

Overridable implementation of the != operator for vectors.

Source

fn vec_neg(vec: Vector<N, Self, A>) -> Vector<N, Self, A>
where Self: Scalar + Neg<Output = Self>,

Overridable implementation of the - operator for vectors.

Source

fn vec_not(vec: Vector<N, Self, A>) -> Vector<N, Self, A>
where Self: Scalar + Not<Output = Self>,

Overridable implementation of the ! operator for vectors.

Source

fn vec_add( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
where Self: Scalar + Add<Output = Self>,

Overridable implementation of the + operator for vectors.

Source

fn vec_sub( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
where Self: Scalar + Sub<Output = Self>,

Overridable implementation of the - operator for vectors.

Source

fn vec_mul( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
where Self: Scalar + Mul<Output = Self>,

Overridable implementation of the * operator for vectors.

Source

fn vec_div( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
where Self: Scalar + Div<Output = Self>,

Overridable implementation of the / operator for vectors.

Source

fn vec_rem( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
where Self: Scalar + Rem<Output = Self>,

Overridable implementation of the % operator for vectors.

Source

fn vec_shl( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
where Self: Scalar + Shl<Output = Self>,

Overridable implementation of the << operator for vectors.

Source

fn vec_shr( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
where Self: Scalar + Shr<Output = Self>,

Overridable implementation of the >> operator for vectors.

Source

fn vec_bitand( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
where Self: Scalar + BitAnd<Output = Self>,

Overridable implementation of the & operator for vectors.

Source

fn vec_bitor( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
where Self: Scalar + BitOr<Output = Self>,

Overridable implementation of the | operator for vectors.

Source

fn vec_bitxor( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
where Self: Scalar + BitXor<Output = Self>,

Overridable implementation of the ^ operator for vectors.

Source

fn vec_eq_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A>
where Self: Scalar + PartialEq,

Overridable implementation of Vector::eq_mask.

Source

fn vec_ne_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A>
where Self: Scalar + PartialEq,

Overridable implementation of Vector::ne_mask.

Source

fn vec_lt_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A>
where Self: Scalar + PartialOrd,

Overridable implementation of Vector::lt_mask.

Source

fn vec_gt_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A>
where Self: Scalar + PartialOrd,

Overridable implementation of Vector::gt_mask.

Source

fn vec_le_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A>
where Self: Scalar + PartialOrd,

Overridable implementation of Vector::lt_mask.

Source

fn vec_ge_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A>
where Self: Scalar + PartialOrd,

Overridable implementation of Vector::gt_mask.

Source

fn mat_eq(mat: &Matrix<N, Self, A>, other: &Matrix<N, Self, A>) -> bool
where Self: Scalar + PartialEq,

Overridable implementation of the == operator for matrices.

Source

fn mat_ne(mat: &Matrix<N, Self, A>, other: &Matrix<N, Self, A>) -> bool
where Self: Scalar + PartialEq,

Overridable implementation of the != operator for matrices.

Source

fn mat_neg(mat: &Matrix<N, Self, A>) -> Matrix<N, Self, A>
where Self: Scalar + Neg<Output = Self>,

Overridable implementation of the - operator for matrices.

Source

fn mat_add( mat: &Matrix<N, Self, A>, rhs: &Matrix<N, Self, A>, ) -> Matrix<N, Self, A>
where Self: Scalar + Add<Output = Self>,

Overridable implementation of the + operator for matrices.

Source

fn mat_sub( mat: &Matrix<N, Self, A>, rhs: &Matrix<N, Self, A>, ) -> Matrix<N, Self, A>
where Self: Scalar + Sub<Output = Self>,

Overridable implementation of the - operator for matrices.

Source

fn affine_eq(affine: &Affine<N, Self, A>, rhs: &Affine<N, Self, A>) -> bool
where Self: Scalar + PartialEq,

Overridable implementation of the == operator for affine transforms.

Source

fn affine_ne(affine: &Affine<N, Self, A>, rhs: &Affine<N, Self, A>) -> bool
where Self: Scalar + PartialEq,

Overridable implementation of the != operator for affine transforms.

Implementations on Foreign Types§

Source§

impl ScalarBackend<2, Aligned> for f32

Source§

impl ScalarBackend<2, Unaligned> for f32

Source§

impl ScalarBackend<3, Aligned> for f32

Source§

fn vec_eq(vec: &Vec3<f32>, other: &Vec3<f32>) -> bool

Source§

fn vec_ne(vec: &Vec3<f32>, other: &Vec3<f32>) -> bool

Source§

fn vec_neg(vec: Vec3<f32>) -> Vec3<f32>

Source§

fn vec_add(vec: Vec3<f32>, rhs: Vec3<f32>) -> Vec3<f32>

Source§

fn vec_sub(vec: Vec3<f32>, rhs: Vec3<f32>) -> Vec3<f32>

Source§

fn vec_mul(vec: Vec3<f32>, rhs: Vec3<f32>) -> Vec3<f32>

Source§

fn vec_div(vec: Vec3<f32>, rhs: Vec3<f32>) -> Vec3<f32>

Source§

fn vec_rem(vec: Vec3<f32>, rhs: Vec3<f32>) -> Vec3<f32>

Source§

fn vec_eq_mask(vec: Vec3<f32>, other: Vec3<f32>) -> Mask3<f32>

Source§

fn vec_ne_mask(vec: Vec3<f32>, other: Vec3<f32>) -> Mask3<f32>

Source§

fn vec_lt_mask(vec: Vec3<f32>, other: Vec3<f32>) -> Mask3<f32>

Source§

fn vec_gt_mask(vec: Vec3<f32>, other: Vec3<f32>) -> Mask3<f32>

Source§

fn vec_le_mask(vec: Vec3<f32>, other: Vec3<f32>) -> Mask3<f32>

Source§

fn vec_ge_mask(vec: Vec3<f32>, other: Vec3<f32>) -> Mask3<f32>

Source§

impl ScalarBackend<3, Unaligned> for f32

Source§

impl ScalarBackend<4, Aligned> for f32

Source§

fn vec_eq(vec: &Vec4<f32>, other: &Vec4<f32>) -> bool

Source§

fn vec_ne(vec: &Vec4<f32>, other: &Vec4<f32>) -> bool

Source§

fn vec_neg(vec: Vec4<f32>) -> Vec4<f32>

Source§

fn vec_add(vec: Vec4<f32>, rhs: Vec4<f32>) -> Vec4<f32>

Source§

fn vec_sub(vec: Vec4<f32>, rhs: Vec4<f32>) -> Vec4<f32>

Source§

fn vec_mul(vec: Vec4<f32>, rhs: Vec4<f32>) -> Vec4<f32>

Source§

fn vec_div(vec: Vec4<f32>, rhs: Vec4<f32>) -> Vec4<f32>

Source§

fn vec_rem(vec: Vec4<f32>, rhs: Vec4<f32>) -> Vec4<f32>

Source§

fn vec_eq_mask(vec: Vec4<f32>, other: Vec4<f32>) -> Mask4<f32>

Source§

fn vec_ne_mask(vec: Vec4<f32>, other: Vec4<f32>) -> Mask4<f32>

Source§

fn vec_lt_mask(vec: Vec4<f32>, other: Vec4<f32>) -> Mask4<f32>

Source§

fn vec_gt_mask(vec: Vec4<f32>, other: Vec4<f32>) -> Mask4<f32>

Source§

fn vec_le_mask(vec: Vec4<f32>, other: Vec4<f32>) -> Mask4<f32>

Source§

fn vec_ge_mask(vec: Vec4<f32>, other: Vec4<f32>) -> Mask4<f32>

Source§

impl ScalarBackend<4, Unaligned> for f32

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for bool

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for f64

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for i8

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for i16

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for i32

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for i64

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for i128

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for isize

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for u8

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for u16

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for u32

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for u64

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for u128

Source§

impl<const N: usize, A: Alignment> ScalarBackend<N, A> for usize

Implementors§