pub struct Vector<P, N>{ /* private fields */ }Expand description
A contiguous list of elements that supports auto-vectorized operations.
Implementations§
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
pub fn __expand_new( scope: &mut Scope, val: NativeExpand<P>, ) -> NativeExpand<Vector<P, N>>
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
Sourcepub fn vector_size(&self) -> usize
pub fn vector_size(&self) -> usize
Get the length of the current vector.
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
pub fn min_value() -> Vector<P, N>
pub fn max_value() -> Vector<P, N>
Sourcepub fn from_int(val: i64) -> Vector<P, N>
pub fn from_int(val: i64) -> Vector<P, N>
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: &mut Scope, ) -> <Vector<P, N> as CubeType>::ExpandType
pub fn __expand_max_value( scope: &mut Scope, ) -> <Vector<P, N> as CubeType>::ExpandType
pub fn __expand_from_int( scope: &mut Scope, val: <i64 as CubeType>::ExpandType, ) -> <Vector<P, N> as CubeType>::ExpandType
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
Sourcepub fn fill(self, value: P) -> Vector<P, N>
pub fn fill(self, value: P) -> Vector<P, N>
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;pub fn __expand_fill( scope: &mut Scope, this: <Vector<P, N> as CubeType>::ExpandType, value: <P as CubeType>::ExpandType, ) -> <Vector<P, N> as CubeType>::ExpandType
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
pub fn empty() -> Vector<P, N>
pub fn __expand_empty( scope: &mut Scope, ) -> <Vector<P, N> as CubeType>::ExpandType
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
pub fn zeroed() -> Vector<P, N>
pub fn __expand_zeroed( scope: &mut Scope, ) -> <Vector<P, N> as CubeType>::ExpandType
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
Sourcepub fn size(&self) -> usize
pub fn size(&self) -> usize
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: &mut Scope,
element: NativeExpand<Vector<P, N>>,
) -> usize
pub fn __expand_size( scope: &mut Scope, element: NativeExpand<Vector<P, N>>, ) -> usize
Expand function of size.
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
Sourcepub fn equal(self, other: Vector<P, N>) -> Vector<bool, N>
pub fn equal(self, other: Vector<P, N>) -> Vector<bool, N>
Return a new vector with the element-wise comparison of the first vector being equal to the second vector.
pub fn __expand_equal( scope: &mut Scope, this: <Vector<P, N> as CubeType>::ExpandType, other: <Vector<P, N> as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
Sourcepub fn not_equal(self, other: Vector<P, N>) -> Vector<bool, N>
pub fn not_equal(self, other: Vector<P, N>) -> Vector<bool, N>
Return a new vector with the element-wise comparison of the first vector being not equal to the second vector.
pub fn __expand_not_equal( scope: &mut Scope, this: <Vector<P, N> as CubeType>::ExpandType, other: <Vector<P, N> as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
Sourcepub fn less_than(self, other: Vector<P, N>) -> Vector<bool, N>
pub fn less_than(self, other: Vector<P, N>) -> Vector<bool, N>
Return a new vector with the element-wise comparison of the first vector being less than the second vector.
pub fn __expand_less_than( scope: &mut Scope, this: <Vector<P, N> as CubeType>::ExpandType, other: <Vector<P, N> as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
Sourcepub fn greater_than(self, other: Vector<P, N>) -> Vector<bool, N>
pub fn greater_than(self, other: Vector<P, N>) -> Vector<bool, N>
Return a new vector with the element-wise comparison of the first vector being greater than the second vector.
pub fn __expand_greater_than( scope: &mut Scope, this: <Vector<P, N> as CubeType>::ExpandType, other: <Vector<P, N> as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
Sourcepub fn less_equal(self, other: Vector<P, N>) -> Vector<bool, N>
pub fn less_equal(self, other: Vector<P, N>) -> 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.
pub fn __expand_less_equal( scope: &mut Scope, this: <Vector<P, N> as CubeType>::ExpandType, other: <Vector<P, N> as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
Sourcepub fn greater_equal(self, other: Vector<P, N>) -> Vector<bool, N>
pub fn greater_equal(self, other: Vector<P, N>) -> 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.
pub fn __expand_greater_equal( scope: &mut Scope, this: <Vector<P, N> as CubeType>::ExpandType, other: <Vector<P, N> as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Source§impl<N> Vector<bool, N>where
N: Size,
impl<N> Vector<bool, N>where
N: Size,
Sourcepub fn and(self, other: Vector<bool, N>) -> Vector<bool, N>
pub fn and(self, other: Vector<bool, N>) -> Vector<bool, N>
Return a new vector with the element-wise and of the vectors
pub fn __expand_and( scope: &mut Scope, this: <Vector<bool, N> as CubeType>::ExpandType, other: <Vector<bool, N> as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Source§impl<N> Vector<bool, N>where
N: Size,
impl<N> Vector<bool, N>where
N: Size,
Sourcepub fn or(self, other: Vector<bool, N>) -> Vector<bool, N>
pub fn or(self, other: Vector<bool, N>) -> Vector<bool, N>
Return a new vector with the element-wise and of the vectors
pub fn __expand_or( scope: &mut Scope, this: <Vector<bool, N> as CubeType>::ExpandType, other: <Vector<bool, N> as CubeType>::ExpandType, ) -> <Vector<bool, N> as CubeType>::ExpandType
Source§impl<P, N> Vector<P, N>
impl<P, N> Vector<P, N>
pub fn count_ones(self) -> Vector<u32, N>
pub fn __expand_count_ones( scope: &mut Scope, this: <Vector<P, N> as CubeType>::ExpandType, ) -> <Vector<u32, N> as CubeType>::ExpandType
Trait Implementations§
Source§impl<P, N> Abs for Vector<P, N>
impl<P, N> Abs for Vector<P, N>
fn abs(self) -> Self
fn __expand_abs(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> AddAssign for Vector<P, N>
impl<P, N> AddAssign for Vector<P, N>
Source§fn add_assign(&mut self, rhs: Vector<P, N>)
fn add_assign(&mut self, rhs: Vector<P, N>)
+= operation. Read moreSource§impl<P, N> ArcCos for Vector<P, N>
impl<P, N> ArcCos for Vector<P, N>
fn acos(self) -> Self
fn __expand_acos(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> ArcCosh for Vector<P, N>
impl<P, N> ArcCosh for Vector<P, N>
fn acosh(self) -> Self
fn __expand_acosh( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> ArcSin for Vector<P, N>
impl<P, N> ArcSin for Vector<P, N>
fn asin(self) -> Self
fn __expand_asin(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> ArcSinh for Vector<P, N>
impl<P, N> ArcSinh for Vector<P, N>
fn asinh(self) -> Self
fn __expand_asinh( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> ArcTan for Vector<P, N>
impl<P, N> ArcTan for Vector<P, N>
fn atan(self) -> Self
fn __expand_atan(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> ArcTan2 for Vector<P, N>
impl<P, N> ArcTan2 for Vector<P, N>
fn atan2(self, _rhs: Self) -> Self
fn __expand_atan2( scope: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> ArcTanh for Vector<P, N>
impl<P, N> ArcTanh for Vector<P, N>
fn atanh(self) -> Self
fn __expand_atanh( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> BitAndAssign for Vector<P, N>
impl<P, N> BitAndAssign for Vector<P, N>
Source§fn bitand_assign(&mut self, rhs: Vector<P, N>)
fn bitand_assign(&mut self, rhs: Vector<P, N>)
&= operation. Read moreSource§impl<P, N> BitOrAssign for Vector<P, N>
impl<P, N> BitOrAssign for Vector<P, N>
Source§fn bitor_assign(&mut self, rhs: Vector<P, N>)
fn bitor_assign(&mut self, rhs: Vector<P, N>)
|= operation. Read moreSource§impl<P, N> BitXorAssign for Vector<P, N>
impl<P, N> BitXorAssign for Vector<P, N>
Source§fn bitxor_assign(&mut self, rhs: Vector<P, N>)
fn bitxor_assign(&mut self, rhs: Vector<P, N>)
^= operation. Read moreSource§impl<P, N> Ceil for Vector<P, N>
impl<P, N> Ceil for Vector<P, N>
fn ceil(self) -> Self
fn __expand_ceil(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> Cos for Vector<P, N>
impl<P, N> Cos for Vector<P, N>
fn cos(self) -> Self
fn __expand_cos(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> Cosh for Vector<P, N>
impl<P, N> Cosh for Vector<P, N>
fn cosh(self) -> Self
fn __expand_cosh(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<E, N> CubeIndex for Vector<E, N>
impl<E, N> CubeIndex for Vector<E, N>
type Output = E
type Idx = usize
fn cube_idx(&self, _i: Self::Idx) -> &Self::Output
fn expand_index( scope: &mut Scope, array: Self::ExpandType, index: <Self::Idx as CubeType>::ExpandType, ) -> <Self::Output as CubeType>::ExpandType
fn expand_index_unchecked( scope: &mut Scope, array: Self::ExpandType, index: <Self::Idx as CubeType>::ExpandType, ) -> <Self::Output as CubeType>::ExpandType
Source§impl<E, N> CubeIndexMut for Vector<E, N>
impl<E, N> CubeIndexMut for Vector<E, N>
fn cube_idx_mut(&mut self, _i: Self::Idx) -> &mut Self::Output
fn expand_index_mut( scope: &mut Scope, array: Self::ExpandType, index: <Self::Idx as CubeType>::ExpandType, value: <Self::Output as CubeType>::ExpandType, )
Source§impl<P, N> CubeNot for Vector<P, N>
impl<P, N> CubeNot for Vector<P, N>
fn __expand_not(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> CubePrimitive for Vector<P, N>
impl<P, N> CubePrimitive for Vector<P, N>
type Scalar = P
type Size = N
type WithScalar<S: Scalar> = Vector<S, N>
Source§fn as_type_native() -> Option<Type>
fn as_type_native() -> Option<Type>
fn from_const_value(value: ConstantValue) -> Vector<P, N>
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: ManagedVariable) -> Self::ExpandType
fn into_lit_unchecked(self) -> Self
fn supported_uses<R>(client: &ComputeClient<R>) -> EnumSet<TypeUsage>where
R: Runtime,
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, N> CubeType for &Vector<P, N>
impl<P, N> CubeType for &Vector<P, N>
type ExpandType = NativeExpand<Vector<P, N>>
Source§impl<P, N> CubeType for &mut Vector<P, N>
impl<P, N> CubeType for &mut Vector<P, N>
type ExpandType = NativeExpand<Vector<P, N>>
Source§impl<P, N> CubeType for Vector<P, N>
impl<P, N> CubeType for Vector<P, N>
type ExpandType = NativeExpand<Vector<P, N>>
Source§impl<P, N> Degrees for Vector<P, N>
impl<P, N> Degrees for Vector<P, N>
fn to_degrees(self) -> Self
fn __expand_to_degrees( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> DivAssign for Vector<P, N>
impl<P, N> DivAssign for Vector<P, N>
Source§fn div_assign(&mut self, rhs: Vector<P, N>)
fn div_assign(&mut self, rhs: Vector<P, N>)
/= operation. Read moreSource§impl<T, N> Dot for Vector<T, N>
impl<T, N> Dot for Vector<T, N>
fn dot(self, _rhs: Self) -> Self::Scalar
fn __expand_dot( scope: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self::Scalar>
Source§impl<P, N> Erf for Vector<P, N>
impl<P, N> Erf for Vector<P, N>
fn erf(self) -> Self
fn __expand_erf(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> Exp for Vector<P, N>
impl<P, N> Exp for Vector<P, N>
fn exp(self) -> Self
fn __expand_exp(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> FindFirstSet for Vector<P, N>
impl<P, N> FindFirstSet for Vector<P, N>
fn find_first_set(self) -> Self::WithScalar<u32>
fn __expand_find_first_set( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::WithScalar<u32>>
Source§impl<T, N> FloatOps for Vector<T, N>
impl<T, N> 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: &mut Scope, this: Self::ExpandType, other: Self::ExpandType, ) -> Self::ExpandType
fn __expand_max( scope: &mut Scope, this: Self::ExpandType, other: Self::ExpandType, ) -> Self::ExpandType
fn __expand_clamp( scope: &mut Scope, this: Self::ExpandType, min: Self::ExpandType, max: Self::ExpandType, ) -> Self::ExpandType
Source§impl<P, N> Floor for Vector<P, N>
impl<P, N> Floor for Vector<P, N>
fn floor(self) -> Self
fn __expand_floor( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<T, N> From<Vector<T, N>> for ConstantValue
impl<T, N> From<Vector<T, N>> for ConstantValue
Source§fn from(value: Vector<T, N>) -> ConstantValue
fn from(value: Vector<T, N>) -> ConstantValue
Source§impl<T, N> Hypot for Vector<T, N>
impl<T, N> Hypot for Vector<T, N>
fn hypot(self, _rhs: Self) -> Self
fn __expand_hypot( scope: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> Into<NativeExpand<Vector<P, N>>> for Vector<P, N>
impl<P, N> Into<NativeExpand<Vector<P, N>>> for Vector<P, N>
Source§fn into(self) -> NativeExpand<Vector<P, N>>
fn into(self) -> NativeExpand<Vector<P, N>>
Source§impl<T, N> IntoRuntime for Vector<T, N>
impl<T, N> IntoRuntime for Vector<T, N>
fn __expand_runtime_method( self, scope: &mut Scope, ) -> <Vector<T, N> as CubeType>::ExpandType
fn runtime(self) -> Self
Source§impl<P, N> InverseSqrt for Vector<P, N>
impl<P, N> InverseSqrt for Vector<P, N>
fn inverse_sqrt(self) -> Self
fn __expand_inverse_sqrt( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> IsInf for Vector<P, N>
impl<P, N> IsInf for Vector<P, N>
fn is_inf(self) -> Self::WithScalar<bool>
fn __expand_is_inf( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::WithScalar<bool>>
Source§impl<P, N> IsNan for Vector<P, N>
impl<P, N> IsNan for Vector<P, N>
fn is_nan(self) -> Self::WithScalar<bool>
fn __expand_is_nan( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::WithScalar<bool>>
Source§impl<P, N> LeadingZeros for Vector<P, N>
impl<P, N> LeadingZeros for Vector<P, N>
fn leading_zeros(self) -> Self::WithScalar<u32>
fn __expand_leading_zeros( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::WithScalar<u32>>
Source§impl<E, N, IO> List<Vector<E, N>> for VirtualTensor<E, N, IO>
impl<E, N, IO> List<Vector<E, N>> for VirtualTensor<E, N, IO>
fn __expand_read( scope: &mut Scope, this: VirtualTensorExpand<E, N, IO>, index: <usize as CubeType>::ExpandType, ) -> <Vector<E, N> as CubeType>::ExpandType
fn read(&self, index: usize) -> T
fn read_unchecked(&self, index: usize) -> T
fn len(&self) -> usize
fn __expand_read_unchecked( scope: &mut Scope, this: Self::ExpandType, index: <usize as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType
fn __expand_len( scope: &mut Scope, this: Self::ExpandType, ) -> <usize as CubeType>::ExpandType
Source§impl<E, N, IO> ListExpand<Vector<E, N>> for VirtualTensorExpand<E, N, IO>
impl<E, N, IO> ListExpand<Vector<E, N>> for VirtualTensorExpand<E, N, IO>
fn __expand_read_method( &self, scope: &mut Scope, index: <usize as CubeType>::ExpandType, ) -> <Vector<E, N> as CubeType>::ExpandType
fn __expand_read_unchecked_method( &self, _scope: &mut Scope, _index: NativeExpand<usize>, ) -> <Vector<E, N> as CubeType>::ExpandType
fn __expand_len_method(&self, scope: &mut Scope) -> NativeExpand<usize>
Source§impl<E, N> ListMut<Vector<E, N>> for VirtualTensor<E, N, ReadWrite>
impl<E, N> ListMut<Vector<E, N>> for VirtualTensor<E, N, ReadWrite>
fn __expand_write( scope: &mut Scope, this: VirtualTensorExpand<E, N, ReadWrite>, index: <usize as CubeType>::ExpandType, value: <Vector<E, N> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
fn write(&self, index: usize, value: T)
Source§impl<E, N> ListMutExpand<Vector<E, N>> for VirtualTensorExpand<E, N, ReadWrite>
impl<E, N> ListMutExpand<Vector<E, N>> for VirtualTensorExpand<E, N, ReadWrite>
fn __expand_write_method( &self, scope: &mut Scope, index: <usize as CubeType>::ExpandType, value: <Vector<E, N> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
Source§impl<P, N> Log for Vector<P, N>
impl<P, N> Log for Vector<P, N>
fn ln(self) -> Self
fn __expand_ln(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> Log1p for Vector<P, N>
impl<P, N> Log1p for Vector<P, N>
fn log1p(self) -> Self
fn __expand_log1p( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> Magnitude for Vector<P, N>
impl<P, N> Magnitude for Vector<P, N>
fn magnitude(self) -> Self
fn __expand_magnitude( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::Scalar>
Source§impl<P, N> MulAssign for Vector<P, N>
impl<P, N> MulAssign for Vector<P, N>
Source§fn mul_assign(&mut self, rhs: Vector<P, N>)
fn mul_assign(&mut self, rhs: Vector<P, N>)
*= operation. Read moreSource§impl<T, N> MulHi for Vector<T, N>
impl<T, N> MulHi for Vector<T, N>
fn mul_hi(self, _rhs: Self) -> Self
fn __expand_mul_hi( scope: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> NativeAssign for Vector<P, N>
impl<P, N> NativeAssign for Vector<P, N>
fn elem_init_mut(scope: &mut Scope, elem: ManagedVariable) -> ManagedVariable
Source§impl<P, N> Normalize for Vector<P, N>
impl<P, N> Normalize for Vector<P, N>
fn normalize(self) -> Self
fn __expand_normalize( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> Ord for Vector<P, N>
impl<P, N> 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> PartialEq for Vector<P, N>
impl<P, N> PartialEq for Vector<P, N>
Source§impl<P, N> PartialOrd for Vector<P, N>
impl<P, N> PartialOrd for Vector<P, N>
Source§impl<P, N> Powf for Vector<P, N>
impl<P, N> Powf for Vector<P, N>
fn powf(self, _rhs: Self) -> Self
fn __expand_powf( scope: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, I, N> Powi<Vector<I, N>> for Vector<P, N>
impl<P, I, N> Powi<Vector<I, N>> for Vector<P, N>
fn powi(self, _rhs: Rhs) -> Self
fn __expand_powi( scope: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Rhs>, ) -> NativeExpand<Self>
Source§impl<P, N> Radians for Vector<P, N>
impl<P, N> Radians for Vector<P, N>
fn to_radians(self) -> Self
fn __expand_to_radians( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> Recip for Vector<P, N>
impl<P, N> Recip for Vector<P, N>
fn recip(self) -> Self
fn __expand_recip( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> Remainder for Vector<P, N>
impl<P, N> Remainder for Vector<P, N>
fn rem(self, _rhs: Self) -> Self
fn __expand_rem( scope: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> ReverseBits for Vector<P, N>
impl<P, N> ReverseBits for Vector<P, N>
fn reverse_bits(self) -> Self
fn __expand_reverse_bits( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<T, N> Rhypot for Vector<T, N>
impl<T, N> Rhypot for Vector<T, N>
fn rhypot(self, _rhs: Self) -> Self
fn __expand_rhypot( scope: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> Round for Vector<P, N>
impl<P, N> Round for Vector<P, N>
fn round(self) -> Self
fn __expand_round( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> SaturatingAdd for Vector<P, N>
impl<P, N> SaturatingAdd for Vector<P, N>
fn saturating_add(self, _rhs: Self) -> Self
fn __expand_saturating_add( scope: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> SaturatingSub for Vector<P, N>
impl<P, N> SaturatingSub for Vector<P, N>
fn saturating_sub(self, _rhs: Self) -> Self
fn __expand_saturating_sub( scope: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> ShlAssign for Vector<P, N>
impl<P, N> ShlAssign for Vector<P, N>
Source§fn shl_assign(&mut self, rhs: Vector<P, N>)
fn shl_assign(&mut self, rhs: Vector<P, N>)
<<= operation. Read moreSource§impl<P, N> ShrAssign for Vector<P, N>
impl<P, N> ShrAssign for Vector<P, N>
Source§fn shr_assign(&mut self, rhs: Vector<P, N>)
fn shr_assign(&mut self, rhs: Vector<P, N>)
>>= operation. Read moreSource§impl<P, N> Sin for Vector<P, N>
impl<P, N> Sin for Vector<P, N>
fn sin(self) -> Self
fn __expand_sin(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> Sinh for Vector<P, N>
impl<P, N> Sinh for Vector<P, N>
fn sinh(self) -> Self
fn __expand_sinh(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<E, N> SliceMutOperator<Vector<E, N>> for VirtualTensor<E, N, ReadWrite>
impl<E, N> SliceMutOperator<Vector<E, N>> for VirtualTensor<E, N, ReadWrite>
Source§fn slice_mut(&mut self, start: usize, end: usize) -> Slice<E, ReadWrite> ⓘ
fn slice_mut(&mut self, start: usize, end: usize) -> Slice<E, ReadWrite> ⓘ
start and end indices.
In checked mode, if the end index is out-of-bound, it is replaced by
the length of self.Source§fn to_slice_mut(&mut self) -> Slice<E, ReadWrite> ⓘ
fn to_slice_mut(&mut self) -> Slice<E, ReadWrite> ⓘ
fn __expand_slice_mut( scope: &mut Scope, this: Self::ExpandType, start: <usize as CubeType>::ExpandType, end: <usize as CubeType>::ExpandType, ) -> <Slice<E, ReadWrite> as CubeType>::ExpandType ⓘ
fn __expand_to_slice_mut( scope: &mut Scope, this: Self::ExpandType, ) -> <Slice<E, ReadWrite> as CubeType>::ExpandType ⓘ
Source§impl<E, N> SliceMutOperatorExpand<Vector<E, N>> for VirtualTensorExpand<E, N, ReadWrite>
impl<E, N> SliceMutOperatorExpand<Vector<E, N>> for VirtualTensorExpand<E, N, ReadWrite>
fn __expand_slice_mut_method( &self, scope: &mut Scope, start: NativeExpand<usize>, end: NativeExpand<usize>, ) -> SliceExpand<Vector<E, N>, ReadWrite>
fn __expand_to_slice_mut_method( &self, scope: &mut Scope, ) -> SliceExpand<Vector<E, N>, ReadWrite>
Source§impl<E, N, IO> SliceOperator<Vector<E, N>> for VirtualTensor<E, N, IO>
impl<E, N, IO> SliceOperator<Vector<E, N>> for VirtualTensor<E, N, IO>
Source§fn slice(&self, start: usize, end: usize) -> Slice<E> ⓘ
fn slice(&self, start: usize, end: usize) -> Slice<E> ⓘ
start and end indices.
In checked mode, if the end index is out-of-bound, it is replaced by
the length of self.fn __expand_slice( scope: &mut Scope, this: Self::ExpandType, start: <usize as CubeType>::ExpandType, end: <usize as CubeType>::ExpandType, ) -> <Slice<E> as CubeType>::ExpandType ⓘ
fn __expand_to_slice( scope: &mut Scope, this: Self::ExpandType, ) -> <Slice<E> as CubeType>::ExpandType ⓘ
Source§impl<E, N, IO> SliceOperatorExpand<Vector<E, N>> for VirtualTensorExpand<E, N, IO>
impl<E, N, IO> SliceOperatorExpand<Vector<E, N>> for VirtualTensorExpand<E, N, IO>
fn __expand_slice_method( &self, scope: &mut Scope, start: NativeExpand<usize>, end: NativeExpand<usize>, ) -> SliceExpand<Vector<E, N>, ReadOnly>
fn __expand_to_slice_method( &self, scope: &mut Scope, ) -> SliceExpand<Vector<E, N>, ReadOnly>
Source§impl<P, N> Sqrt for Vector<P, N>
impl<P, N> Sqrt for Vector<P, N>
fn sqrt(self) -> Self
fn __expand_sqrt(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> SubAssign for Vector<P, N>
impl<P, N> SubAssign for Vector<P, N>
Source§fn sub_assign(&mut self, rhs: Vector<P, N>)
fn sub_assign(&mut self, rhs: Vector<P, N>)
-= operation. Read moreSource§impl<P, N> Tan for Vector<P, N>
impl<P, N> Tan for Vector<P, N>
fn tan(self) -> Self
fn __expand_tan(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> Tanh for Vector<P, N>
impl<P, N> Tanh for Vector<P, N>
fn tanh(self) -> Self
fn __expand_tanh(scope: &mut Scope, x: NativeExpand<Self>) -> NativeExpand<Self>
Source§impl<P, N> ToPrimitive for Vector<P, N>
impl<P, N> 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, N> TrailingZeros for Vector<P, N>
impl<P, N> TrailingZeros for Vector<P, N>
fn trailing_zeros(self) -> Self::WithScalar<u32>
fn __expand_trailing_zeros( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::WithScalar<u32>>
Source§impl<P, N> Trunc for Vector<P, N>
impl<P, N> Trunc for Vector<P, N>
fn trunc(self) -> Self
fn __expand_trunc( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>
Source§impl<P, N> VectorSum for Vector<P, N>
impl<P, N> VectorSum for Vector<P, N>
fn vector_sum(self) -> Self
fn __expand_vector_sum( scope: &mut Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::Scalar>
impl<P, N> Copy for Vector<P, N>
impl<P, N> Eq for Vector<P, N>
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§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>(
scope: &mut Scope,
value: NativeExpand<From>,
) -> Self::ExpandTypewhere
From: CubePrimitive,
Source§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
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 Twhere
T: Add<Output = T> + CubePrimitive,
impl<T> CubeAdd for Twhere
T: Add<Output = T> + CubePrimitive,
fn __expand_add( scope: &mut 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: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, )
Source§impl<P> CubeDebug for Pwhere
P: CubePrimitive,
impl<P> CubeDebug for Pwhere
P: CubePrimitive,
Source§fn set_debug_name(&self, scope: &mut Scope, name: &'static str)
fn set_debug_name(&self, scope: &mut Scope, name: &'static str)
Source§impl<T> CubeDiv for Twhere
T: Div<Output = T> + CubePrimitive,
impl<T> CubeDiv for Twhere
T: Div<Output = T> + CubePrimitive,
fn __expand_mul( scope: &mut 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: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, )
Source§impl<T> CubeMul for Twhere
T: Mul<Output = T> + CubePrimitive,
impl<T> CubeMul for Twhere
T: Mul<Output = T> + CubePrimitive,
fn __expand_mul( scope: &mut 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: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, )
Source§impl<T> CubeOrd for Twhere
T: Ord + CubePrimitive,
impl<T> CubeOrd for Twhere
T: Ord + CubePrimitive,
fn __expand_cmp( scope: &mut Scope, lhs: Self::ExpandType, rhs: Self::ExpandType, ) -> OrderingExpand
fn __expand_min( scope: &mut Scope, lhs: Self::ExpandType, rhs: Self::ExpandType, ) -> Self::ExpandType
fn __expand_max( scope: &mut Scope, lhs: Self::ExpandType, rhs: Self::ExpandType, ) -> Self::ExpandType
fn __expand_clamp( scope: &mut Scope, lhs: Self::ExpandType, min: Self::ExpandType, max: Self::ExpandType, ) -> Self::ExpandType
Source§impl<T> CubeSub for Twhere
T: Sub<Output = T> + CubePrimitive,
impl<T> CubeSub for Twhere
T: Sub<Output = T> + CubePrimitive,
fn __expand_sub( scope: &mut 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: &mut Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, )
Source§impl<T> DefaultExpand for T
impl<T> DefaultExpand for T
fn __expand_default(scope: &mut 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.