pub trait ScalarBackend<const N: usize, A: Alignment>where
Length<N>: SupportedLength,{
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§
Sourcefn vec_eq(vec: &Vector<N, Self, A>, other: &Vector<N, Self, A>) -> bool
fn vec_eq(vec: &Vector<N, Self, A>, other: &Vector<N, Self, A>) -> bool
Overridable implementation of the == operator for vectors.
Sourcefn vec_ne(vec: &Vector<N, Self, A>, other: &Vector<N, Self, A>) -> bool
fn vec_ne(vec: &Vector<N, Self, A>, other: &Vector<N, Self, A>) -> bool
Overridable implementation of the != operator for vectors.
Sourcefn vec_neg(vec: Vector<N, Self, A>) -> Vector<N, Self, A>
fn vec_neg(vec: Vector<N, Self, A>) -> Vector<N, Self, A>
Overridable implementation of the - operator for vectors.
Sourcefn vec_not(vec: Vector<N, Self, A>) -> Vector<N, Self, A>
fn vec_not(vec: Vector<N, Self, A>) -> Vector<N, Self, A>
Overridable implementation of the ! operator for vectors.
Sourcefn vec_add(
vec: Vector<N, Self, A>,
rhs: Vector<N, Self, A>,
) -> Vector<N, Self, A>
fn vec_add( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
Overridable implementation of the + operator for vectors.
Sourcefn vec_sub(
vec: Vector<N, Self, A>,
rhs: Vector<N, Self, A>,
) -> Vector<N, Self, A>
fn vec_sub( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
Overridable implementation of the - operator for vectors.
Sourcefn vec_mul(
vec: Vector<N, Self, A>,
rhs: Vector<N, Self, A>,
) -> Vector<N, Self, A>
fn vec_mul( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
Overridable implementation of the * operator for vectors.
Sourcefn vec_div(
vec: Vector<N, Self, A>,
rhs: Vector<N, Self, A>,
) -> Vector<N, Self, A>
fn vec_div( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
Overridable implementation of the / operator for vectors.
Sourcefn vec_rem(
vec: Vector<N, Self, A>,
rhs: Vector<N, Self, A>,
) -> Vector<N, Self, A>
fn vec_rem( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
Overridable implementation of the % operator for vectors.
Sourcefn vec_shl(
vec: Vector<N, Self, A>,
rhs: Vector<N, Self, A>,
) -> Vector<N, Self, A>
fn vec_shl( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
Overridable implementation of the << operator for vectors.
Sourcefn vec_shr(
vec: Vector<N, Self, A>,
rhs: Vector<N, Self, A>,
) -> Vector<N, Self, A>
fn vec_shr( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
Overridable implementation of the >> operator for vectors.
Sourcefn vec_bitand(
vec: Vector<N, Self, A>,
rhs: Vector<N, Self, A>,
) -> Vector<N, Self, A>
fn vec_bitand( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
Overridable implementation of the & operator for vectors.
Sourcefn vec_bitor(
vec: Vector<N, Self, A>,
rhs: Vector<N, Self, A>,
) -> Vector<N, Self, A>
fn vec_bitor( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
Overridable implementation of the | operator for vectors.
Sourcefn vec_bitxor(
vec: Vector<N, Self, A>,
rhs: Vector<N, Self, A>,
) -> Vector<N, Self, A>
fn vec_bitxor( vec: Vector<N, Self, A>, rhs: Vector<N, Self, A>, ) -> Vector<N, Self, A>
Overridable implementation of the ^ operator for vectors.
Sourcefn vec_eq_mask(
vec: Vector<N, Self, A>,
other: Vector<N, Self, A>,
) -> Mask<N, Self, A>
fn vec_eq_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A>
Overridable implementation of Vector::eq_mask.
Sourcefn vec_ne_mask(
vec: Vector<N, Self, A>,
other: Vector<N, Self, A>,
) -> Mask<N, Self, A>
fn vec_ne_mask( vec: Vector<N, Self, A>, other: Vector<N, Self, A>, ) -> Mask<N, Self, A>
Overridable implementation of Vector::ne_mask.
Sourcefn vec_lt_mask(
vec: Vector<N, Self, A>,
other: Vector<N, Self, A>,
) -> Mask<N, Self, A>where
Self: Scalar + PartialOrd,
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.
Sourcefn vec_gt_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,
Overridable implementation of Vector::gt_mask.
Sourcefn vec_le_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,
Overridable implementation of Vector::lt_mask.
Sourcefn vec_ge_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,
Overridable implementation of Vector::gt_mask.
Sourcefn mat_eq(mat: &Matrix<N, Self, A>, other: &Matrix<N, Self, A>) -> bool
fn mat_eq(mat: &Matrix<N, Self, A>, other: &Matrix<N, Self, A>) -> bool
Overridable implementation of the == operator for matrices.
Sourcefn mat_ne(mat: &Matrix<N, Self, A>, other: &Matrix<N, Self, A>) -> bool
fn mat_ne(mat: &Matrix<N, Self, A>, other: &Matrix<N, Self, A>) -> bool
Overridable implementation of the != operator for matrices.
Sourcefn mat_neg(mat: &Matrix<N, Self, A>) -> Matrix<N, Self, A>
fn mat_neg(mat: &Matrix<N, Self, A>) -> Matrix<N, Self, A>
Overridable implementation of the - operator for matrices.
Sourcefn mat_add(
mat: &Matrix<N, Self, A>,
rhs: &Matrix<N, Self, A>,
) -> Matrix<N, Self, A>
fn mat_add( mat: &Matrix<N, Self, A>, rhs: &Matrix<N, Self, A>, ) -> Matrix<N, Self, A>
Overridable implementation of the + operator for matrices.
Sourcefn mat_sub(
mat: &Matrix<N, Self, A>,
rhs: &Matrix<N, Self, A>,
) -> Matrix<N, Self, A>
fn mat_sub( mat: &Matrix<N, Self, A>, rhs: &Matrix<N, Self, A>, ) -> Matrix<N, Self, A>
Overridable implementation of the - operator for matrices.