pub struct Vector<P: Scalar, N: Size> { /* private fields */ }Expand description
A contiguous list of elements that supports auto-vectorized operations.
Implementations§
Source§impl<P: Scalar, N: Size> Vector<P, N>
impl<P: Scalar, N: Size> Vector<P, N>
pub fn __expand_new( scope: &Scope, val: NativeExpand<P>, ) -> NativeExpand<Vector<P, N>>
Source§impl<P: Scalar, N: Size> Vector<P, N>
impl<P: Scalar, N: Size> Vector<P, N>
Sourcepub fn vector_size(&self) -> VectorSize
pub fn vector_size(&self) -> VectorSize
Get the length of the current vector.
Source§impl<P: Scalar, N: Size> Vector<P, N>
impl<P: Scalar, N: Size> Vector<P, N>
pub fn extract(self, index: usize) -> P
pub fn insert(&mut self, index: usize, value: P)
pub fn __expand_extract( scope: &Scope, this: <Self as CubeType>::ExpandType, index: <usize as CubeType>::ExpandType, ) -> <P as CubeType>::ExpandType
pub fn __expand_insert( scope: &Scope, this: &mut <Self as CubeType>::ExpandType, index: <usize as CubeType>::ExpandType, value: <P as CubeType>::ExpandType, )
Source§impl<P: Numeric, N: Size> Vector<P, N>
impl<P: Numeric, N: Size> Vector<P, N>
pub fn min_value() -> Self
pub fn max_value() -> Self
Sourcepub fn from_int(val: i64) -> Self
pub fn from_int(val: i64) -> Self
Create a new constant numeric.
Note: since this must work for both integer and float
only the less expressive of both can be created (int)
If a number with decimals is needed, use Float::new.
This method panics when unexpanded. For creating an element with a val, use the new method of the sub type.
pub fn __expand_min_value(scope: &Scope) -> <Self as CubeType>::ExpandType
pub fn __expand_max_value(scope: &Scope) -> <Self as CubeType>::ExpandType
Sourcepub fn __expand_from_int(
scope: &Scope,
val: <i64 as CubeType>::ExpandType,
) -> <Self as CubeType>::ExpandType
pub fn __expand_from_int( scope: &Scope, val: <i64 as CubeType>::ExpandType, ) -> <Self as CubeType>::ExpandType
Create a new constant numeric.
Note: since this must work for both integer and float
only the less expressive of both can be created (int)
If a number with decimals is needed, use Float::new.
This method panics when unexpanded. For creating an element with a val, use the new method of the sub type.
Source§impl<P: Scalar, N: Size> Vector<P, N>
impl<P: Scalar, N: Size> Vector<P, N>
Sourcepub fn fill(self, value: P) -> Self
pub fn fill(self, value: P) -> Self
Fill the vector with the given value.
If you want to fill the vector with different values, consider using the index API instead.
let mut vector = Vector::<u32>::empty(2);
vector[0] = 1;
vector[1] = 2;Sourcepub fn __expand_fill(
scope: &Scope,
this: <Self as CubeType>::ExpandType,
value: <P as CubeType>::ExpandType,
) -> <Self as CubeType>::ExpandType
pub fn __expand_fill( scope: &Scope, this: <Self as CubeType>::ExpandType, value: <P as CubeType>::ExpandType, ) -> <Self as CubeType>::ExpandType
Fill the vector with the given value.
If you want to fill the vector with different values, consider using the index API instead.
let mut vector = Vector::<u32>::empty(2);
vector[0] = 1;
vector[1] = 2;Source§impl<P: Scalar, N: Size> Vector<P, N>
impl<P: Scalar, N: Size> Vector<P, N>
pub fn empty() -> Self
pub fn __expand_empty(scope: &Scope) -> <Self as CubeType>::ExpandType
Source§impl<P: Scalar + Zeroable, N: Size> Vector<P, N>
impl<P: Scalar + Zeroable, N: Size> Vector<P, N>
pub fn zeroed() -> Self
pub fn __expand_zeroed(scope: &Scope) -> <Self as CubeType>::ExpandType
Source§impl<P: Scalar, N: Size> Vector<P, N>
impl<P: Scalar, N: Size> Vector<P, N>
Sourcepub fn size(&self) -> VectorSize
pub fn size(&self) -> VectorSize
Get the number of individual elements a vector contains.
The size is available at comptime and may be used in combination with the comptime macro.
// The if statement is going to be executed at comptime.
if comptime!(vector.size() == 1) {
}Sourcepub fn __expand_size(
scope: &Scope,
element: NativeExpand<Vector<P, N>>,
) -> VectorSize
pub fn __expand_size( scope: &Scope, element: NativeExpand<Vector<P, N>>, ) -> VectorSize
Expand function of size.
Source§impl<P: Scalar, N: Size> Vector<P, N>
impl<P: Scalar, N: Size> Vector<P, N>
Sourcepub fn equal(&self, other: &Self) -> Vector<bool, N>
pub fn equal(&self, other: &Self) -> Vector<bool, N>
Return a new vector with the element-wise comparison of the first vector being equal to the second vector.
Sourcepub fn __expand_equal(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
other: &<Self as CubeType>::ExpandType,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_equal( scope: &Scope, this: &<Self as CubeType>::ExpandType, other: &<Self as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise comparison of the first vector being equal to the second vector.
Source§impl<P: Scalar, N: Size> Vector<P, N>
impl<P: Scalar, N: Size> Vector<P, N>
Sourcepub fn not_equal(&self, other: &Self) -> Vector<bool, N>
pub fn not_equal(&self, other: &Self) -> Vector<bool, N>
Return a new vector with the element-wise comparison of the first vector being not equal to the second vector.
Sourcepub fn __expand_not_equal(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
other: &<Self as CubeType>::ExpandType,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_not_equal( scope: &Scope, this: &<Self as CubeType>::ExpandType, other: &<Self as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise comparison of the first vector being not equal to the second vector.
Source§impl<P: Scalar, N: Size> Vector<P, N>
impl<P: Scalar, N: Size> Vector<P, N>
Sourcepub fn less_than(&self, other: &Self) -> Vector<bool, N>
pub fn less_than(&self, other: &Self) -> Vector<bool, N>
Return a new vector with the element-wise comparison of the first vector being less than the second vector.
Sourcepub fn __expand_less_than(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
other: &<Self as CubeType>::ExpandType,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_less_than( scope: &Scope, this: &<Self as CubeType>::ExpandType, other: &<Self as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise comparison of the first vector being less than the second vector.
Source§impl<P: Scalar, N: Size> Vector<P, N>
impl<P: Scalar, N: Size> Vector<P, N>
Sourcepub fn greater_than(&self, other: &Self) -> Vector<bool, N>
pub fn greater_than(&self, other: &Self) -> Vector<bool, N>
Return a new vector with the element-wise comparison of the first vector being greater than the second vector.
Sourcepub fn __expand_greater_than(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
other: &<Self as CubeType>::ExpandType,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_greater_than( scope: &Scope, this: &<Self as CubeType>::ExpandType, other: &<Self as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise comparison of the first vector being greater than the second vector.
Source§impl<P: Scalar, N: Size> Vector<P, N>
impl<P: Scalar, N: Size> Vector<P, N>
Sourcepub fn less_equal(&self, other: &Self) -> Vector<bool, N>
pub fn less_equal(&self, other: &Self) -> Vector<bool, N>
Return a new vector with the element-wise comparison of the first vector being less than or equal to the second vector.
Sourcepub fn __expand_less_equal(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
other: &<Self as CubeType>::ExpandType,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_less_equal( scope: &Scope, this: &<Self as CubeType>::ExpandType, other: &<Self as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise comparison of the first vector being less than or equal to the second vector.
Source§impl<P: Scalar, N: Size> Vector<P, N>
impl<P: Scalar, N: Size> Vector<P, N>
Sourcepub fn greater_equal(&self, other: &Self) -> Vector<bool, N>
pub fn greater_equal(&self, other: &Self) -> Vector<bool, N>
Return a new vector with the element-wise comparison of the first vector being greater than or equal to the second vector.
Sourcepub fn __expand_greater_equal(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
other: &<Self as CubeType>::ExpandType,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_greater_equal( scope: &Scope, this: &<Self as CubeType>::ExpandType, other: &<Self as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise comparison of the first vector being greater than or equal to the second vector.
Source§impl<N: Size> Vector<bool, N>
impl<N: Size> Vector<bool, N>
Sourcepub fn vec_and(self, other: Self) -> Vector<bool, N>
pub fn vec_and(self, other: Self) -> Vector<bool, N>
Return a new vector with the element-wise and of the vectors
Sourcepub fn __expand_vec_and(
scope: &Scope,
this: <Self as CubeType>::ExpandType,
other: <Self as CubeType>::ExpandType,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_vec_and( scope: &Scope, this: <Self as CubeType>::ExpandType, other: <Self as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise and of the vectors
Source§impl<N: Size> Vector<bool, N>
impl<N: Size> Vector<bool, N>
Sourcepub fn or(self, other: Self) -> Vector<bool, N>
pub fn or(self, other: Self) -> Vector<bool, N>
Return a new vector with the element-wise and of the vectors
Sourcepub fn __expand_or(
scope: &Scope,
this: <Self as CubeType>::ExpandType,
other: <Self as CubeType>::ExpandType,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_or( scope: &Scope, this: <Self as CubeType>::ExpandType, other: <Self as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise and of the vectors
Source§impl<P: CountOnes + Scalar, N: Size> Vector<P, N>
impl<P: CountOnes + Scalar, N: Size> Vector<P, N>
pub fn count_ones(self) -> Vector<u32, N>
pub fn __expand_count_ones( scope: &Scope, this: <Self as CubeType>::ExpandType, ) -> <Vector<u32, N> as CubeType>::ExpandType
Trait Implementations§
Source§impl<P: Scalar + Abs, N: Size> Abs for Vector<P, N>
impl<P: Scalar + Abs, N: Size> Abs for Vector<P, N>
fn abs(self) -> Self
fn __expand_abs(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N: Size> AddAssign for Vector<P, N>
impl<P, N: Size> AddAssign for Vector<P, N>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+= operation. Read moreSource§impl<P: Scalar + ArcCos, N: Size> ArcCos for Vector<P, N>
impl<P: Scalar + ArcCos, N: Size> ArcCos for Vector<P, N>
fn acos(self) -> Self
fn __expand_acos(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + ArcCosh, N: Size> ArcCosh for Vector<P, N>
impl<P: Scalar + ArcCosh, N: Size> ArcCosh for Vector<P, N>
fn acosh(self) -> Self
fn __expand_acosh(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + ArcSin, N: Size> ArcSin for Vector<P, N>
impl<P: Scalar + ArcSin, N: Size> ArcSin for Vector<P, N>
fn asin(self) -> Self
fn __expand_asin(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + ArcSinh, N: Size> ArcSinh for Vector<P, N>
impl<P: Scalar + ArcSinh, N: Size> ArcSinh for Vector<P, N>
fn asinh(self) -> Self
fn __expand_asinh(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + ArcTan, N: Size> ArcTan for Vector<P, N>
impl<P: Scalar + ArcTan, N: Size> ArcTan for Vector<P, N>
fn atan(self) -> Self
fn __expand_atan(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + ArcTan2, N: Size> ArcTan2 for Vector<P, N>
impl<P: Scalar + ArcTan2, N: Size> ArcTan2 for Vector<P, N>
fn atan2(self, _rhs: Self) -> Self
fn __expand_atan2( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P: Scalar + ArcTanh, N: Size> ArcTanh for Vector<P, N>
impl<P: Scalar + ArcTanh, N: Size> ArcTanh for Vector<P, N>
fn atanh(self) -> Self
fn __expand_atanh(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N: Size> BitAndAssign for Vector<P, N>where
P: Scalar + BitAndAssign,
impl<P, N: Size> BitAndAssign for Vector<P, N>where
P: Scalar + BitAndAssign,
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&= operation. Read moreSource§impl<P, N: Size> BitOrAssign for Vector<P, N>where
P: Scalar + BitOrAssign,
impl<P, N: Size> BitOrAssign for Vector<P, N>where
P: Scalar + BitOrAssign,
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl<P, N: Size> BitXorAssign for Vector<P, N>where
P: Scalar + BitXorAssign,
impl<P, N: Size> BitXorAssign for Vector<P, N>where
P: Scalar + BitXorAssign,
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^= operation. Read moreSource§impl<P: Scalar + Ceil, N: Size> Ceil for Vector<P, N>
impl<P: Scalar + Ceil, N: Size> Ceil for Vector<P, N>
fn ceil(self) -> Self
fn __expand_ceil(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
impl<P: Scalar, N: Size> Copy for Vector<P, N>
Source§impl<P: Scalar + Cos, N: Size> Cos for Vector<P, N>
impl<P: Scalar + Cos, N: Size> Cos for Vector<P, N>
fn cos(self) -> Self
fn __expand_cos(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + Cosh, N: Size> Cosh for Vector<P, N>
impl<P: Scalar + Cosh, N: Size> Cosh for Vector<P, N>
fn cosh(self) -> Self
fn __expand_cosh(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar, N: Size> CubeDebug for Vector<P, N>
impl<P: Scalar, N: Size> CubeDebug for Vector<P, N>
Source§fn set_debug_name(&self, scope: &Scope, name: &'static str)
fn set_debug_name(&self, scope: &Scope, name: &'static str)
Source§impl<P: Scalar + CubeNot, N: Size> CubeNot for Vector<P, N>
impl<P: Scalar + CubeNot, N: Size> CubeNot for Vector<P, N>
fn __expand_not_method(self, scope: &Scope) -> NativeExpand<Self>
fn __expand_not(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar, N: Size> CubePrimitive for Vector<P, N>
impl<P: Scalar, N: Size> CubePrimitive for Vector<P, N>
type Scalar = P
type Size = N
type WithScalar<S: Scalar> = Vector<S, N>
fn __expand_as_type(scope: &Scope) -> Type
Source§fn as_type_native() -> Option<Type>
fn as_type_native() -> Option<Type>
fn from_const_value(value: ConstantValue) -> Self
Source§fn as_type_native_unchecked() -> Type
fn as_type_native_unchecked() -> Type
Source§fn size_bits_unchecked() -> usize
fn size_bits_unchecked() -> usize
fn from_expand_elem(elem: Value) -> Self::ExpandType
fn into_lit_unchecked(self) -> Self
fn supported_uses<R: Runtime>(client: &ComputeClient<R>) -> EnumSet<TypeUsage>
fn type_size() -> usize
fn type_size_bits() -> usize
fn packing_factor() -> usize
fn vector_size() -> usize
fn __expand_type_size(scope: &Scope) -> usize
fn __expand_type_size_bits(scope: &Scope) -> usize
fn __expand_packing_factor(scope: &Scope) -> usize
fn __expand_vector_size(scope: &Scope) -> usize
Source§impl<P: Scalar, N: Size> CubeType for Vector<P, N>
impl<P: Scalar, N: Size> CubeType for Vector<P, N>
type ExpandType = NativeExpand<Vector<P, N>>
Source§impl<P: Scalar + Degrees, N: Size> Degrees for Vector<P, N>
impl<P: Scalar + Degrees, N: Size> Degrees for Vector<P, N>
fn to_degrees(self) -> Self
fn __expand_to_degrees( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N: Size> DivAssign for Vector<P, N>
impl<P, N: Size> DivAssign for Vector<P, N>
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
/= operation. Read moreSource§impl<T: Dot + Scalar, N: Size> Dot for Vector<T, N>
impl<T: Dot + Scalar, N: Size> Dot for Vector<T, N>
fn dot(self, _rhs: Self) -> Self::Scalar
fn __expand_dot( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self::Scalar>
impl<P: Scalar, N: Size> Eq for Vector<P, N>
Source§impl<P: Scalar + Erf, N: Size> Erf for Vector<P, N>
impl<P: Scalar + Erf, N: Size> Erf for Vector<P, N>
fn erf(self) -> Self
fn __expand_erf(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + Exp, N: Size> Exp for Vector<P, N>
impl<P: Scalar + Exp, N: Size> Exp for Vector<P, N>
fn exp(self) -> Self
fn __expand_exp(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + Expm1, N: Size> Expm1 for Vector<P, N>
impl<P: Scalar + Expm1, N: Size> Expm1 for Vector<P, N>
fn exp_m1(self) -> Self
fn __expand_exp_m1(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: FindFirstSet + Scalar, N: Size> FindFirstSet for Vector<P, N>
impl<P: FindFirstSet + Scalar, N: Size> FindFirstSet for Vector<P, N>
fn find_first_set(self) -> Self::WithScalar<u32>
fn __expand_find_first_set( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::WithScalar<u32>>
Source§impl<T: FloatOps + Scalar, N: Size> FloatOps for Vector<T, N>
impl<T: FloatOps + Scalar, N: Size> FloatOps for Vector<T, N>
fn min(self, other: Self) -> Self
fn max(self, other: Self) -> Self
fn clamp(self, min: Self, max: Self) -> Self
fn __expand_min( scope: &Scope, this: <Self as CubeType>::ExpandType, other: <Self as CubeType>::ExpandType, ) -> <Self as CubeType>::ExpandType
fn __expand_max( scope: &Scope, this: <Self as CubeType>::ExpandType, other: <Self as CubeType>::ExpandType, ) -> <Self as CubeType>::ExpandType
fn __expand_clamp( scope: &Scope, this: <Self as CubeType>::ExpandType, min: <Self as CubeType>::ExpandType, max: <Self as CubeType>::ExpandType, ) -> <Self as CubeType>::ExpandType
Source§impl<P: Scalar + Floor, N: Size> Floor for Vector<P, N>
impl<P: Scalar + Floor, N: Size> Floor for Vector<P, N>
fn floor(self) -> Self
fn __expand_floor(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<T: Scalar + Into<ConstantValue>, N: Size> From<Vector<T, N>> for ConstantValue
impl<T: Scalar + Into<ConstantValue>, N: Size> From<Vector<T, N>> for ConstantValue
Source§impl<T: Hypot + Scalar, N: Size> Hypot for Vector<T, N>
impl<T: Hypot + Scalar, N: Size> Hypot for Vector<T, N>
fn hypot(self, _rhs: Self) -> Self
fn __expand_hypot( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P: Scalar + Into<NativeExpand<P>>, N: Size> Into<NativeExpand<Vector<P, N>>> for Vector<P, N>
impl<P: Scalar + Into<NativeExpand<P>>, N: Size> Into<NativeExpand<Vector<P, N>>> for Vector<P, N>
Source§fn into(self) -> NativeExpand<Self>
fn into(self) -> NativeExpand<Self>
Source§impl<T: Scalar + IntoExpand, N: Size> IntoExpand for Vector<T, N>
impl<T: Scalar + IntoExpand, N: Size> IntoExpand for Vector<T, N>
type Expand = NativeExpand<Vector<T, N>>
fn into_expand(self, scope: &Scope) -> Self::Expand
Source§impl<T: Scalar + IntoRuntime, N: Size> IntoRuntime for Vector<T, N>
impl<T: Scalar + IntoRuntime, N: Size> IntoRuntime for Vector<T, N>
fn __expand_runtime_method(self, scope: &Scope) -> Self::ExpandType
fn runtime(self) -> Self
Source§impl<P: Scalar + InverseSqrt, N: Size> InverseSqrt for Vector<P, N>
impl<P: Scalar + InverseSqrt, N: Size> InverseSqrt for Vector<P, N>
fn inverse_sqrt(self) -> Self
fn __expand_inverse_sqrt( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P: Scalar + IsInf, N: Size> IsInf for Vector<P, N>
impl<P: Scalar + IsInf, N: Size> IsInf for Vector<P, N>
fn is_inf(self) -> Self::WithScalar<bool>
fn __expand_is_inf( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::WithScalar<bool>>
Source§impl<P: Scalar + IsNan, N: Size> IsNan for Vector<P, N>
impl<P: Scalar + IsNan, N: Size> IsNan for Vector<P, N>
fn is_nan(self) -> Self::WithScalar<bool>
fn __expand_is_nan( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::WithScalar<bool>>
Source§impl<P: LeadingZeros + Scalar, N: Size> LeadingZeros for Vector<P, N>
impl<P: LeadingZeros + Scalar, N: Size> LeadingZeros for Vector<P, N>
fn leading_zeros(self) -> Self::WithScalar<u32>
fn __expand_leading_zeros( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::WithScalar<u32>>
Source§impl<P: Scalar + Log, N: Size> Log for Vector<P, N>
impl<P: Scalar + Log, N: Size> Log for Vector<P, N>
fn ln(self) -> Self
fn __expand_ln(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + Log1p, N: Size> Log1p for Vector<P, N>
impl<P: Scalar + Log1p, N: Size> Log1p for Vector<P, N>
fn log1p(self) -> Self
fn __expand_log1p(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + Magnitude, N: Size> Magnitude for Vector<P, N>
impl<P: Scalar + Magnitude, N: Size> Magnitude for Vector<P, N>
fn magnitude(self) -> Self::Scalar
fn __expand_magnitude( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::Scalar>
Source§impl<P: Scalar + ModFloor, N: Size> ModFloor for Vector<P, N>
impl<P: Scalar + ModFloor, N: Size> ModFloor for Vector<P, N>
fn mod_floor(self, _rhs: Self) -> Self
fn __expand_mod_floor( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N: Size> MulAssign for Vector<P, N>
impl<P, N: Size> MulAssign for Vector<P, N>
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
*= operation. Read moreSource§impl<T: MulHi + Scalar, N: Size> MulHi for Vector<T, N>
impl<T: MulHi + Scalar, N: Size> MulHi for Vector<T, N>
fn mul_hi(self, _rhs: Self) -> Self
fn __expand_mul_hi( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P: Scalar + Normalize, N: Size> Normalize for Vector<P, N>
impl<P: Scalar + Normalize, N: Size> Normalize for Vector<P, N>
fn normalize(self) -> Self
fn __expand_normalize( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P: Scalar + Ord, N: Size> Ord for Vector<P, N>
impl<P: Scalar + Ord, N: Size> Ord for Vector<P, N>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<P, N: Size> PartialOrd for Vector<P, N>where
P: Scalar + PartialOrd,
impl<P, N: Size> PartialOrd for Vector<P, N>where
P: Scalar + PartialOrd,
Source§impl<P: Scalar + Powf, N: Size> Powf for Vector<P, N>
impl<P: Scalar + Powf, N: Size> Powf for Vector<P, N>
fn powf(self, _rhs: Self) -> Self
fn __expand_powf( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P: Scalar + Powi<I>, I: Scalar, N: Size> Powi<Vector<I, N>> for Vector<P, N>
impl<P: Scalar + Powi<I>, I: Scalar, N: Size> Powi<Vector<I, N>> for Vector<P, N>
fn powi(self, _rhs: Rhs) -> Self
fn __expand_powi( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Rhs>, ) -> NativeExpand<Self>
Source§impl<P: Scalar + Radians, N: Size> Radians for Vector<P, N>
impl<P: Scalar + Radians, N: Size> Radians for Vector<P, N>
fn to_radians(self) -> Self
fn __expand_to_radians( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P: Scalar + Recip, N: Size> Recip for Vector<P, N>
impl<P: Scalar + Recip, N: Size> Recip for Vector<P, N>
fn recip(self) -> Self
fn __expand_recip(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + ReverseBits, N: Size> ReverseBits for Vector<P, N>
impl<P: Scalar + ReverseBits, N: Size> ReverseBits for Vector<P, N>
fn reverse_bits(self) -> Self
fn __expand_reverse_bits( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<T: Rhypot + Scalar, N: Size> Rhypot for Vector<T, N>
impl<T: Rhypot + Scalar, N: Size> Rhypot for Vector<T, N>
fn rhypot(self, _rhs: Self) -> Self
fn __expand_rhypot( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P: Scalar + Round, N: Size> Round for Vector<P, N>
impl<P: Scalar + Round, N: Size> Round for Vector<P, N>
fn round(self) -> Self
fn __expand_round(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + SaturatingAdd, N: Size> SaturatingAdd for Vector<P, N>
impl<P: Scalar + SaturatingAdd, N: Size> SaturatingAdd for Vector<P, N>
fn saturating_add(self, _rhs: Self) -> Self
fn __expand_saturating_add( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P: Scalar + SaturatingSub, N: Size> SaturatingSub for Vector<P, N>
impl<P: Scalar + SaturatingSub, N: Size> SaturatingSub for Vector<P, N>
fn saturating_sub(self, _rhs: Self) -> Self
fn __expand_saturating_sub( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N: Size> ShlAssign for Vector<P, N>
impl<P, N: Size> ShlAssign for Vector<P, N>
Source§fn shl_assign(&mut self, rhs: Self)
fn shl_assign(&mut self, rhs: Self)
<<= operation. Read moreSource§impl<P, N: Size> ShrAssign for Vector<P, N>
impl<P, N: Size> ShrAssign for Vector<P, N>
Source§fn shr_assign(&mut self, rhs: Self)
fn shr_assign(&mut self, rhs: Self)
>>= operation. Read moreSource§impl<P: Scalar + Sin, N: Size> Sin for Vector<P, N>
impl<P: Scalar + Sin, N: Size> Sin for Vector<P, N>
fn sin(self) -> Self
fn __expand_sin(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + Sinh, N: Size> Sinh for Vector<P, N>
impl<P: Scalar + Sinh, N: Size> Sinh for Vector<P, N>
fn sinh(self) -> Self
fn __expand_sinh(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + Sqrt, N: Size> Sqrt for Vector<P, N>
impl<P: Scalar + Sqrt, N: Size> Sqrt for Vector<P, N>
fn sqrt(self) -> Self
fn __expand_sqrt(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N: Size> SubAssign for Vector<P, N>
impl<P, N: Size> SubAssign for Vector<P, N>
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read moreSource§impl<P: Scalar + Tan, N: Size> Tan for Vector<P, N>
impl<P: Scalar + Tan, N: Size> Tan for Vector<P, N>
fn tan(self) -> Self
fn __expand_tan(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + Tanh, N: Size> Tanh for Vector<P, N>
impl<P: Scalar + Tanh, N: Size> Tanh for Vector<P, N>
fn tanh(self) -> Self
fn __expand_tanh(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + NumCast, N: Size> ToPrimitive for Vector<P, N>
impl<P: Scalar + NumCast, N: Size> ToPrimitive for Vector<P, N>
Source§fn to_i64(&self) -> Option<i64>
fn to_i64(&self) -> Option<i64>
self to an i64. If the value cannot be
represented by an i64, then None is returned.Source§fn to_u64(&self) -> Option<u64>
fn to_u64(&self) -> Option<u64>
self to a u64. If the value cannot be
represented by a u64, then None is returned.Source§fn to_isize(&self) -> Option<isize>
fn to_isize(&self) -> Option<isize>
self to an isize. If the value cannot be
represented by an isize, then None is returned.Source§fn to_i8(&self) -> Option<i8>
fn to_i8(&self) -> Option<i8>
self to an i8. If the value cannot be
represented by an i8, then None is returned.Source§fn to_i16(&self) -> Option<i16>
fn to_i16(&self) -> Option<i16>
self to an i16. If the value cannot be
represented by an i16, then None is returned.Source§fn to_i32(&self) -> Option<i32>
fn to_i32(&self) -> Option<i32>
self to an i32. If the value cannot be
represented by an i32, then None is returned.Source§fn to_i128(&self) -> Option<i128>
fn to_i128(&self) -> Option<i128>
self to an i128. If the value cannot be
represented by an i128 (i64 under the default implementation), then
None is returned. Read moreSource§fn to_usize(&self) -> Option<usize>
fn to_usize(&self) -> Option<usize>
self to a usize. If the value cannot be
represented by a usize, then None is returned.Source§fn to_u8(&self) -> Option<u8>
fn to_u8(&self) -> Option<u8>
self to a u8. If the value cannot be
represented by a u8, then None is returned.Source§fn to_u16(&self) -> Option<u16>
fn to_u16(&self) -> Option<u16>
self to a u16. If the value cannot be
represented by a u16, then None is returned.Source§fn to_u32(&self) -> Option<u32>
fn to_u32(&self) -> Option<u32>
self to a u32. If the value cannot be
represented by a u32, then None is returned.Source§fn to_u128(&self) -> Option<u128>
fn to_u128(&self) -> Option<u128>
self to a u128. If the value cannot be
represented by a u128 (u64 under the default implementation), then
None is returned. Read moreSource§impl<P: TrailingZeros + Scalar, N: Size> TrailingZeros for Vector<P, N>
impl<P: TrailingZeros + Scalar, N: Size> TrailingZeros for Vector<P, N>
fn trailing_zeros(self) -> Self::WithScalar<u32>
fn __expand_trailing_zeros( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::WithScalar<u32>>
Source§impl<P: Scalar + Trunc, N: Size> Trunc for Vector<P, N>
impl<P: Scalar + Trunc, N: Size> Trunc for Vector<P, N>
fn trunc(self) -> Self
fn __expand_trunc(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P: Scalar + VectorSum, N: Size> VectorSum for Vector<P, N>
impl<P: Scalar + VectorSum, N: Size> VectorSum for Vector<P, N>
fn vector_sum(self) -> Self::Scalar
fn __expand_vector_sum( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::Scalar>
Auto Trait Implementations§
impl<P, N> Freeze for Vector<P, N>where
P: Freeze,
impl<P, N> RefUnwindSafe for Vector<P, N>where
P: RefUnwindSafe,
N: RefUnwindSafe,
impl<P, N> Send for Vector<P, N>
impl<P, N> Sync for Vector<P, N>
impl<P, N> Unpin for Vector<P, N>
impl<P, N> UnsafeUnpin for Vector<P, N>where
P: UnsafeUnpin,
impl<P, N> UnwindSafe for Vector<P, N>where
P: UnwindSafe,
N: UnwindSafe,
Blanket Implementations§
Source§impl<T> Assign for Twhere
T: CubePrimitive,
impl<T> Assign for Twhere
T: CubePrimitive,
Source§fn __expand_assign_method(&mut self, _scope: &Scope, value: T)
fn __expand_assign_method(&mut self, _scope: &Scope, value: T)
value to self in scope.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
Source§impl<P> Cast for Pwhere
P: CubePrimitive,
impl<P> Cast for Pwhere
P: CubePrimitive,
fn cast_from<From>(_value: From) -> Pwhere
From: CubePrimitive,
fn __expand_cast_from<From: CubePrimitive>( scope: &Scope, value: NativeExpand<From>, ) -> <Self as CubeType>::ExpandType
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneExpand for Twhere
T: Clone,
impl<T> CloneExpand for Twhere
T: Clone,
fn __expand_clone_method(&self, _: &Scope) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> CubeAdd for T
impl<T> CubeAdd for T
fn __expand_add_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
fn __expand_add( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<T> CubeAddAssign for Twhere
T: AddAssign + CubePrimitive,
impl<T> CubeAddAssign for Twhere
T: AddAssign + CubePrimitive,
fn __expand_add_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )
Source§impl<T> CubeBitAnd for T
impl<T> CubeBitAnd for T
fn __expand_bitand_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
fn __expand_bitand( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<T> CubeBitAndAssign for Twhere
T: BitAndAssign + CubePrimitive,
impl<T> CubeBitAndAssign for Twhere
T: BitAndAssign + CubePrimitive,
fn __expand_bitand_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )
Source§impl<T> CubeBitOr for T
impl<T> CubeBitOr for T
fn __expand_bitor_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
fn __expand_bitor( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<T> CubeBitOrAssign for Twhere
T: BitOrAssign + CubePrimitive,
impl<T> CubeBitOrAssign for Twhere
T: BitOrAssign + CubePrimitive,
fn __expand_bitor_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )
Source§impl<T> CubeBitXor for T
impl<T> CubeBitXor for T
fn __expand_bitxor_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
fn __expand_bitxor( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<T> CubeBitXorAssign for Twhere
T: BitXorAssign + CubePrimitive,
impl<T> CubeBitXorAssign for Twhere
T: BitXorAssign + CubePrimitive,
fn __expand_bitxor_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )
Source§impl<T> CubeDiv for T
impl<T> CubeDiv for T
fn __expand_div_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
fn __expand_div( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<T> CubeDivAssign for Twhere
T: DivAssign + CubePrimitive,
impl<T> CubeDivAssign for Twhere
T: DivAssign + CubePrimitive,
fn __expand_div_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )
Source§impl<T> CubeMul for T
impl<T> CubeMul for T
fn __expand_mul_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
fn __expand_mul( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<T> CubeMulAssign for Twhere
T: MulAssign + CubePrimitive,
impl<T> CubeMulAssign for Twhere
T: MulAssign + CubePrimitive,
fn __expand_mul_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )
Source§impl<T> CubePartialOrd for Twhere
T: PartialOrd + CubePrimitive,
impl<T> CubePartialOrd for Twhere
T: PartialOrd + CubePrimitive,
fn __expand_partial_cmp( scope: &Scope, lhs: &Self::ExpandType, rhs: &Self::ExpandType, ) -> OptionExpand<Ordering>
fn __expand_lt( scope: &Scope, lhs: &Self::ExpandType, rhs: &Self::ExpandType, ) -> NativeExpand<bool>
fn __expand_le( scope: &Scope, lhs: &Self::ExpandType, rhs: &Self::ExpandType, ) -> NativeExpand<bool>
fn __expand_gt( scope: &Scope, lhs: &Self::ExpandType, rhs: &Self::ExpandType, ) -> NativeExpand<bool>
fn __expand_ge( scope: &Scope, lhs: &Self::ExpandType, rhs: &Self::ExpandType, ) -> NativeExpand<bool>
Source§impl<T> CubeRem for T
impl<T> CubeRem for T
fn __expand_rem_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
fn __expand_rem( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<T> CubeShl for T
impl<T> CubeShl for T
fn __expand_shl_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
fn __expand_shl( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<T> CubeShlAssign for Twhere
T: ShlAssign + CubePrimitive,
impl<T> CubeShlAssign for Twhere
T: ShlAssign + CubePrimitive,
fn __expand_shl_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )
Source§impl<T> CubeShr for T
impl<T> CubeShr for T
fn __expand_shr_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
fn __expand_shr( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<T> CubeShrAssign for Twhere
T: ShrAssign + CubePrimitive,
impl<T> CubeShrAssign for Twhere
T: ShrAssign + CubePrimitive,
fn __expand_shr_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )
Source§impl<T> CubeSub for T
impl<T> CubeSub for T
fn __expand_sub_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
fn __expand_sub( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<T> CubeSubAssign for Twhere
T: SubAssign + CubePrimitive,
impl<T> CubeSubAssign for Twhere
T: SubAssign + CubePrimitive,
fn __expand_sub_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )
Source§impl<T> DefaultExpand for T
impl<T> DefaultExpand for T
fn __expand_default(scope: &Scope) -> <T as CubeType>::ExpandType
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more