Skip to main content

Vector

Struct Vector 

Source
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>

Source

pub fn new(val: P) -> Self

Create a new vector of size 1 using the given value.

Source

pub fn __expand_new( scope: &Scope, val: NativeExpand<P>, ) -> NativeExpand<Vector<P, N>>

Source§

impl<P: Scalar, N: Size> Vector<P, N>

Source

pub fn vector_size(&self) -> VectorSize

Get the length of the current vector.

Source§

impl<P: Scalar, N: Size> Vector<P, N>

Source

pub fn extract(self, index: usize) -> P

Source

pub fn insert(&mut self, index: usize, value: P)

Source

pub fn __expand_extract( scope: &Scope, this: <Self as CubeType>::ExpandType, index: <usize as CubeType>::ExpandType, ) -> <P as CubeType>::ExpandType

Source

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>

Source

pub fn min_value() -> Self

Source

pub fn max_value() -> Self

Source

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.

Source

pub fn __expand_min_value(scope: &Scope) -> <Self as CubeType>::ExpandType

Source

pub fn __expand_max_value(scope: &Scope) -> <Self as CubeType>::ExpandType

Source

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>

Source

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;
Source

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>

Source

pub fn empty() -> Self

Source

pub fn __expand_empty(scope: &Scope) -> <Self as CubeType>::ExpandType

Source§

impl<P: Scalar + Zeroable, N: Size> Vector<P, N>

Source

pub fn zeroed() -> Self

Source

pub fn __expand_zeroed(scope: &Scope) -> <Self as CubeType>::ExpandType

Source§

impl<P: Scalar, N: Size> Vector<P, N>

Source

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) {
}
Source

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>

Source

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.

Source

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>

Source

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.

Source

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>

Source

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.

Source

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>

Source

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.

Source

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>

Source

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.

Source

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>

Source

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.

Source

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>

Source

pub fn vec_and(self, other: Self) -> Vector<bool, N>

Return a new vector with the element-wise and of the vectors

Source

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>

Source

pub fn or(self, other: Self) -> Vector<bool, N>

Return a new vector with the element-wise and of the vectors

Source

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>

Source

pub fn count_ones(self) -> Vector<u32, N>

Source

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>

Source§

fn abs(self) -> Self

Source§

fn __expand_abs(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P, N: Size> Add for Vector<P, N>
where P: Scalar + Add<P, Output = P>,

Source§

type Output = Vector<P, N>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<P, N: Size> Add<f32> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the + operator.
Source§

fn add(self, _rhs: f32) -> Self::Output

Performs the + operation. Read more
Source§

impl<P, N: Size> Add<f64> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the + operator.
Source§

fn add(self, _rhs: f64) -> Self::Output

Performs the + operation. Read more
Source§

impl<P, N: Size> Add<i32> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the + operator.
Source§

fn add(self, _rhs: i32) -> Self::Output

Performs the + operation. Read more
Source§

impl<P, N: Size> Add<i64> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the + operator.
Source§

fn add(self, _rhs: i64) -> Self::Output

Performs the + operation. Read more
Source§

impl<P, N: Size> Add<usize> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the + operator.
Source§

fn add(self, _rhs: usize) -> Self::Output

Performs the + operation. Read more
Source§

impl<P, N: Size> AddAssign for Vector<P, N>
where P: Scalar + AddAssign,

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<P: Scalar + ArcCos, N: Size> ArcCos for Vector<P, N>

Source§

fn acos(self) -> Self

Source§

fn __expand_acos(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + ArcCosh, N: Size> ArcCosh for Vector<P, N>

Source§

fn acosh(self) -> Self

Source§

fn __expand_acosh(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + ArcSin, N: Size> ArcSin for Vector<P, N>

Source§

fn asin(self) -> Self

Source§

fn __expand_asin(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + ArcSinh, N: Size> ArcSinh for Vector<P, N>

Source§

fn asinh(self) -> Self

Source§

fn __expand_asinh(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + ArcTan, N: Size> ArcTan for Vector<P, N>

Source§

fn atan(self) -> Self

Source§

fn __expand_atan(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + ArcTan2, N: Size> ArcTan2 for Vector<P, N>

Source§

fn atan2(self, _rhs: Self) -> Self

Source§

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>

Source§

fn atanh(self) -> Self

Source§

fn __expand_atanh(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P, N: Size> BitAnd for Vector<P, N>
where P: Scalar + BitAnd<P, Output = P>,

Source§

type Output = Vector<P, N>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl<P, N: Size> BitAndAssign for Vector<P, N>
where P: Scalar + BitAndAssign,

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl<P, N: Size> BitOr for Vector<P, N>
where P: Scalar + BitOr<P, Output = P>,

Source§

type Output = Vector<P, N>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl<P, N: Size> BitOrAssign for Vector<P, N>
where P: Scalar + BitOrAssign,

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl<P, N: Size> BitXor for Vector<P, N>
where P: Scalar + BitXor<P, Output = P>,

Source§

type Output = Vector<P, N>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<P, N: Size> BitXorAssign for Vector<P, N>
where P: Scalar + BitXorAssign,

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl<P: Scalar + Ceil, N: Size> Ceil for Vector<P, N>

Source§

fn ceil(self) -> Self

Source§

fn __expand_ceil(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar, N: Size> Clone for Vector<P, N>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<P: Scalar, N: Size> Copy for Vector<P, N>

Source§

impl<P: Scalar + Cos, N: Size> Cos for Vector<P, N>

Source§

fn cos(self) -> Self

Source§

fn __expand_cos(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + Cosh, N: Size> Cosh for Vector<P, N>

Source§

fn cosh(self) -> Self

Source§

fn __expand_cosh(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar, N: Size> CubeDebug for Vector<P, N>

Source§

fn set_debug_name(&self, scope: &Scope, name: &'static str)

Set the debug name of this type’s expansion. Should do nothing for types that don’t appear at runtime
Source§

impl<P: Scalar + CubeNot, N: Size> CubeNot for Vector<P, N>

Source§

fn __expand_not_method(self, scope: &Scope) -> NativeExpand<Self>

Source§

fn __expand_not(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar, N: Size> CubePrimitive for Vector<P, N>

Source§

type Scalar = P

Source§

type Size = N

Source§

type WithScalar<S: Scalar> = Vector<S, N>

Source§

fn __expand_as_type(scope: &Scope) -> Type

Source§

fn as_type_native() -> Option<Type>

Native or static element type.
Source§

fn from_const_value(value: ConstantValue) -> Self

Source§

fn as_type() -> Type

Return the element type to use on GPU.
Source§

fn as_type_native_unchecked() -> Type

Native or static element type.
Source§

fn size() -> Option<usize>

Only native element types have a size.
Source§

fn size_bits() -> Option<usize>

Only native element types have a size.
Source§

fn size_bits_unchecked() -> usize

Only native element types have a size.
Source§

fn from_expand_elem(elem: Value) -> Self::ExpandType

Source§

fn into_lit_unchecked(self) -> Self

Source§

fn supported_uses<R: Runtime>(client: &ComputeClient<R>) -> EnumSet<TypeUsage>

Source§

fn type_size() -> usize

Source§

fn type_size_bits() -> usize

Source§

fn packing_factor() -> usize

Source§

fn vector_size() -> usize

Source§

fn __expand_type_size(scope: &Scope) -> usize

Source§

fn __expand_type_size_bits(scope: &Scope) -> usize

Source§

fn __expand_packing_factor(scope: &Scope) -> usize

Source§

fn __expand_vector_size(scope: &Scope) -> usize

Source§

impl<P: Scalar, N: Size> CubeType for Vector<P, N>

Source§

impl<P: Debug + Scalar, N: Debug + Size> Debug for Vector<P, N>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Scalar + Default, N: Size> Default for Vector<T, N>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<P: Scalar + Degrees, N: Size> Degrees for Vector<P, N>

Source§

fn to_degrees(self) -> Self

Source§

fn __expand_to_degrees( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<P, N: Size> Div for Vector<P, N>
where P: Scalar + Div<P, Output = P>,

Source§

type Output = Vector<P, N>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<P, N: Size> Div<f32> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the / operator.
Source§

fn div(self, _rhs: f32) -> Self::Output

Performs the / operation. Read more
Source§

impl<P, N: Size> Div<f64> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the / operator.
Source§

fn div(self, _rhs: f64) -> Self::Output

Performs the / operation. Read more
Source§

impl<P, N: Size> Div<i32> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the / operator.
Source§

fn div(self, _rhs: i32) -> Self::Output

Performs the / operation. Read more
Source§

impl<P, N: Size> Div<i64> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the / operator.
Source§

fn div(self, _rhs: i64) -> Self::Output

Performs the / operation. Read more
Source§

impl<P, N: Size> Div<usize> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the / operator.
Source§

fn div(self, _rhs: usize) -> Self::Output

Performs the / operation. Read more
Source§

impl<P, N: Size> DivAssign for Vector<P, N>
where P: Scalar + DivAssign,

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl<T: Dot + Scalar, N: Size> Dot for Vector<T, N>

Source§

fn dot(self, _rhs: Self) -> Self::Scalar

Source§

fn __expand_dot( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self::Scalar>

Source§

impl<P: Scalar, N: Size> Eq for Vector<P, N>

Source§

impl<P: Scalar + Erf, N: Size> Erf for Vector<P, N>

Source§

fn erf(self) -> Self

Source§

fn __expand_erf(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + Exp, N: Size> Exp for Vector<P, N>

Source§

fn exp(self) -> Self

Source§

fn __expand_exp(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + Expm1, N: Size> Expm1 for Vector<P, N>

Source§

fn exp_m1(self) -> Self

Source§

fn __expand_exp_m1(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: FindFirstSet + Scalar, N: Size> FindFirstSet for Vector<P, N>

Source§

impl<T: FloatOps + Scalar, N: Size> FloatOps for Vector<T, N>

Source§

fn min(self, other: Self) -> Self

Source§

fn max(self, other: Self) -> Self

Source§

fn clamp(self, min: Self, max: Self) -> Self

Source§

fn __expand_min( scope: &Scope, this: <Self as CubeType>::ExpandType, other: <Self as CubeType>::ExpandType, ) -> <Self as CubeType>::ExpandType

Source§

fn __expand_max( scope: &Scope, this: <Self as CubeType>::ExpandType, other: <Self as CubeType>::ExpandType, ) -> <Self as CubeType>::ExpandType

Source§

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>

Source§

fn floor(self) -> Self

Source§

fn __expand_floor(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<T: Scalar + Into<ConstantValue>, N: Size> From<Vector<T, N>> for ConstantValue

Source§

fn from(value: Vector<T, N>) -> Self

Converts to this type from the input type.
Source§

impl<T: Hypot + Scalar, N: Size> Hypot for Vector<T, N>

Source§

fn hypot(self, _rhs: Self) -> Self

Source§

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>

Source§

fn into(self) -> NativeExpand<Self>

Converts this type into the (usually inferred) input type.
Source§

impl<T: Scalar + IntoExpand, N: Size> IntoExpand for Vector<T, N>

Source§

type Expand = NativeExpand<Vector<T, N>>

Source§

fn into_expand(self, scope: &Scope) -> Self::Expand

Source§

impl<T: Scalar + IntoRuntime, N: Size> IntoRuntime for Vector<T, N>

Source§

fn __expand_runtime_method(self, scope: &Scope) -> Self::ExpandType

Source§

fn runtime(self) -> Self

Source§

impl<P: Scalar + InverseSqrt, N: Size> InverseSqrt for Vector<P, N>

Source§

fn inverse_sqrt(self) -> Self

Source§

fn __expand_inverse_sqrt( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<P: Scalar + IsInf, N: Size> IsInf for Vector<P, N>

Source§

impl<P: Scalar + IsNan, N: Size> IsNan for Vector<P, N>

Source§

impl<P: LeadingZeros + Scalar, N: Size> LeadingZeros for Vector<P, N>

Source§

impl<P: Scalar + Log, N: Size> Log for Vector<P, N>

Source§

fn ln(self) -> Self

Source§

fn __expand_ln(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + Log1p, N: Size> Log1p for Vector<P, N>

Source§

fn log1p(self) -> Self

Source§

fn __expand_log1p(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + Magnitude, N: Size> Magnitude for Vector<P, N>

Source§

fn magnitude(self) -> Self::Scalar

Source§

fn __expand_magnitude( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::Scalar>

Source§

impl<P: Scalar + ModFloor, N: Size> ModFloor for Vector<P, N>

Source§

fn mod_floor(self, _rhs: Self) -> Self

Source§

fn __expand_mod_floor( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<P, N: Size> Mul for Vector<P, N>
where P: Scalar + Mul<P, Output = P>,

Source§

type Output = Vector<P, N>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<P, N: Size> Mul<f32> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the * operator.
Source§

fn mul(self, _rhs: f32) -> Self::Output

Performs the * operation. Read more
Source§

impl<P, N: Size> Mul<f64> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the * operator.
Source§

fn mul(self, _rhs: f64) -> Self::Output

Performs the * operation. Read more
Source§

impl<P, N: Size> Mul<i32> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the * operator.
Source§

fn mul(self, _rhs: i32) -> Self::Output

Performs the * operation. Read more
Source§

impl<P, N: Size> Mul<i64> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the * operator.
Source§

fn mul(self, _rhs: i64) -> Self::Output

Performs the * operation. Read more
Source§

impl<P, N: Size> Mul<usize> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the * operator.
Source§

fn mul(self, _rhs: usize) -> Self::Output

Performs the * operation. Read more
Source§

impl<P, N: Size> MulAssign for Vector<P, N>
where P: Scalar + MulAssign,

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl<T: MulHi + Scalar, N: Size> MulHi for Vector<T, N>

Source§

fn mul_hi(self, _rhs: Self) -> Self

Source§

fn __expand_mul_hi( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<P: Scalar, N: Size> NativeAssign for Vector<P, N>

Source§

fn elem_init_mut(scope: &Scope, elem: Value) -> Value

Source§

impl<P: Scalar + Neg<Output = P>, N: Size> Neg for Vector<P, N>

Source§

type Output = Vector<P, N>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<P: Scalar + Normalize, N: Size> Normalize for Vector<P, N>

Source§

fn normalize(self) -> Self

Source§

fn __expand_normalize( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<P: Not<Output = P> + Scalar, N: Size> Not for Vector<P, N>

Source§

type Output = Vector<P, N>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl<P: Scalar + NumCast, N: Size> NumCast for Vector<P, N>

Source§

fn from<T: ToPrimitive>(n: T) -> Option<Self>

Creates a number from another value that can be converted into a primitive via the ToPrimitive trait. If the source value cannot be represented by the target type, then None is returned. Read more
Source§

impl<T: Scalar + One, N: Size> One for Vector<T, N>

Source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

fn is_one(&self) -> bool
where Self: PartialEq,

Returns true if self is equal to the multiplicative identity. Read more
Source§

impl<P: Scalar + Ord, N: Size> Ord for Vector<P, N>

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<P, N: Size> PartialEq for Vector<P, N>
where P: Scalar + PartialEq,

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<P, N: Size> PartialOrd for Vector<P, N>
where P: Scalar + PartialOrd,

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<P: Scalar + Powf, N: Size> Powf for Vector<P, N>

Source§

fn powf(self, _rhs: Self) -> Self

Source§

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>

Source§

fn powi(self, _rhs: Rhs) -> Self

Source§

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>

Source§

fn to_radians(self) -> Self

Source§

fn __expand_to_radians( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<P: Scalar + Recip, N: Size> Recip for Vector<P, N>

Source§

fn recip(self) -> Self

Source§

fn __expand_recip(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + Rem<Output = P>, N: Size> Rem for Vector<P, N>

Source§

type Output = Vector<P, N>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
Source§

impl<P: Scalar + ReverseBits, N: Size> ReverseBits for Vector<P, N>

Source§

fn reverse_bits(self) -> Self

Source§

fn __expand_reverse_bits( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<T: Rhypot + Scalar, N: Size> Rhypot for Vector<T, N>

Source§

fn rhypot(self, _rhs: Self) -> Self

Source§

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>

Source§

fn round(self) -> Self

Source§

fn __expand_round(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + SaturatingAdd, N: Size> SaturatingAdd for Vector<P, N>

Source§

fn saturating_add(self, _rhs: Self) -> Self

Source§

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>

Source§

fn saturating_sub(self, _rhs: Self) -> Self

Source§

fn __expand_saturating_sub( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<P, N: Size> Shl for Vector<P, N>
where P: Scalar + Shl<P, Output = P>,

Source§

type Output = Vector<P, N>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: Self) -> Self::Output

Performs the << operation. Read more
Source§

impl<P, N: Size> ShlAssign for Vector<P, N>
where P: Scalar + ShlAssign,

Source§

fn shl_assign(&mut self, rhs: Self)

Performs the <<= operation. Read more
Source§

impl<P, N: Size> Shr for Vector<P, N>
where P: Scalar + Shr<P, Output = P>,

Source§

type Output = Vector<P, N>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: Self) -> Self::Output

Performs the >> operation. Read more
Source§

impl<P, N: Size> ShrAssign for Vector<P, N>
where P: Scalar + ShrAssign,

Source§

fn shr_assign(&mut self, rhs: Self)

Performs the >>= operation. Read more
Source§

impl<P: Scalar + Sin, N: Size> Sin for Vector<P, N>

Source§

fn sin(self) -> Self

Source§

fn __expand_sin(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + Sinh, N: Size> Sinh for Vector<P, N>

Source§

fn sinh(self) -> Self

Source§

fn __expand_sinh(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + Sqrt, N: Size> Sqrt for Vector<P, N>

Source§

fn sqrt(self) -> Self

Source§

fn __expand_sqrt(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P, N: Size> Sub for Vector<P, N>
where P: Scalar + Sub<P, Output = P>,

Source§

type Output = Vector<P, N>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<P, N: Size> Sub<f32> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the - operator.
Source§

fn sub(self, _rhs: f32) -> Self::Output

Performs the - operation. Read more
Source§

impl<P, N: Size> Sub<f64> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the - operator.
Source§

fn sub(self, _rhs: f64) -> Self::Output

Performs the - operation. Read more
Source§

impl<P, N: Size> Sub<i32> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the - operator.
Source§

fn sub(self, _rhs: i32) -> Self::Output

Performs the - operation. Read more
Source§

impl<P, N: Size> Sub<i64> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the - operator.
Source§

fn sub(self, _rhs: i64) -> Self::Output

Performs the - operation. Read more
Source§

impl<P, N: Size> Sub<usize> for Vector<P, N>
where P: Scalar,

Source§

type Output = Vector<P, N>

The resulting type after applying the - operator.
Source§

fn sub(self, _rhs: usize) -> Self::Output

Performs the - operation. Read more
Source§

impl<P, N: Size> SubAssign for Vector<P, N>
where P: Scalar + SubAssign,

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<P: Scalar + Tan, N: Size> Tan for Vector<P, N>

Source§

fn tan(self) -> Self

Source§

fn __expand_tan(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + Tanh, N: Size> Tanh for Vector<P, N>

Source§

fn tanh(self) -> Self

Source§

fn __expand_tanh(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + NumCast, N: Size> ToPrimitive for Vector<P, N>

Source§

fn to_i64(&self) -> Option<i64>

Converts the value of self to an i64. If the value cannot be represented by an i64, then None is returned.
Source§

fn to_u64(&self) -> Option<u64>

Converts the value of self to a u64. If the value cannot be represented by a u64, then None is returned.
Source§

fn to_isize(&self) -> Option<isize>

Converts the value of self to an isize. If the value cannot be represented by an isize, then None is returned.
Source§

fn to_i8(&self) -> Option<i8>

Converts the value of self to an i8. If the value cannot be represented by an i8, then None is returned.
Source§

fn to_i16(&self) -> Option<i16>

Converts the value of self to an i16. If the value cannot be represented by an i16, then None is returned.
Source§

fn to_i32(&self) -> Option<i32>

Converts the value of self to an i32. If the value cannot be represented by an i32, then None is returned.
Source§

fn to_i128(&self) -> Option<i128>

Converts the value of self to an i128. If the value cannot be represented by an i128 (i64 under the default implementation), then None is returned. Read more
Source§

fn to_usize(&self) -> Option<usize>

Converts the value of self to a usize. If the value cannot be represented by a usize, then None is returned.
Source§

fn to_u8(&self) -> Option<u8>

Converts the value of self to a u8. If the value cannot be represented by a u8, then None is returned.
Source§

fn to_u16(&self) -> Option<u16>

Converts the value of self to a u16. If the value cannot be represented by a u16, then None is returned.
Source§

fn to_u32(&self) -> Option<u32>

Converts the value of self to a u32. If the value cannot be represented by a u32, then None is returned.
Source§

fn to_u128(&self) -> Option<u128>

Converts the value of self to a u128. If the value cannot be represented by a u128 (u64 under the default implementation), then None is returned. Read more
Source§

fn to_f32(&self) -> Option<f32>

Converts the value of self to an f32. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f32.
Source§

fn to_f64(&self) -> Option<f64>

Converts the value of self to an f64. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f64. Read more
Source§

impl<P: TrailingZeros + Scalar, N: Size> TrailingZeros for Vector<P, N>

Source§

impl<P: Scalar + Trunc, N: Size> Trunc for Vector<P, N>

Source§

fn trunc(self) -> Self

Source§

fn __expand_trunc(scope: &Scope, x: NativeExpand<Self>) -> NativeExpand<Self>

Source§

impl<P: Scalar + VectorSum, N: Size> VectorSum for Vector<P, N>

Source§

fn vector_sum(self) -> Self::Scalar

Source§

fn __expand_vector_sum( scope: &Scope, x: NativeExpand<Self>, ) -> NativeExpand<Self::Scalar>

Source§

impl<T: Scalar + Zero, N: Size> Zero for Vector<T, N>

Source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.

Auto Trait Implementations§

§

impl<P, N> Freeze for Vector<P, N>
where P: Freeze,

§

impl<P, N> RefUnwindSafe for Vector<P, N>

§

impl<P, N> Send for Vector<P, N>

§

impl<P, N> Sync for Vector<P, N>

§

impl<P, N> Unpin for Vector<P, N>
where P: Unpin, N: Unpin,

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Assign for T
where T: CubePrimitive,

Source§

fn __expand_assign_method(&mut self, _scope: &Scope, value: T)

Assign value to self in scope.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<P> Cast for P
where P: CubePrimitive,

Source§

fn cast_from<From>(_value: From) -> P
where From: CubePrimitive,

Source§

fn __expand_cast_from<From: CubePrimitive>( scope: &Scope, value: NativeExpand<From>, ) -> <Self as CubeType>::ExpandType

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneExpand for T
where T: Clone,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<T> CubeAdd for T
where T: Add<Output = T> + CubePrimitive + IntoRuntime,

Source§

fn __expand_add_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

fn __expand_add( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<T> CubeAddAssign for T

Source§

fn __expand_add_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )

Source§

impl<T> CubeBitAnd for T
where T: BitAnd<Output = T> + CubePrimitive + IntoRuntime,

Source§

fn __expand_bitand_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

fn __expand_bitand( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<T> CubeBitAndAssign for T

Source§

fn __expand_bitand_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )

Source§

impl<T> CubeBitOr for T
where T: BitOr<Output = T> + CubePrimitive + IntoRuntime,

Source§

fn __expand_bitor_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

fn __expand_bitor( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<T> CubeBitOrAssign for T

Source§

fn __expand_bitor_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )

Source§

impl<T> CubeBitXor for T
where T: BitXor<Output = T> + CubePrimitive + IntoRuntime,

Source§

fn __expand_bitxor_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

fn __expand_bitxor( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<T> CubeBitXorAssign for T

Source§

fn __expand_bitxor_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )

Source§

impl<T> CubeDiv for T
where T: Div<Output = T> + CubePrimitive + IntoRuntime,

Source§

fn __expand_div_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

fn __expand_div( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<T> CubeDivAssign for T

Source§

fn __expand_div_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )

Source§

impl<T> CubeMul for T
where T: Mul<Output = T> + CubePrimitive + IntoRuntime,

Source§

fn __expand_mul_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

fn __expand_mul( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<T> CubeMulAssign for T

Source§

fn __expand_mul_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )

Source§

impl<T> CubePartialOrd for T

Source§

fn __expand_partial_cmp( scope: &Scope, lhs: &Self::ExpandType, rhs: &Self::ExpandType, ) -> OptionExpand<Ordering>

Source§

fn __expand_lt( scope: &Scope, lhs: &Self::ExpandType, rhs: &Self::ExpandType, ) -> NativeExpand<bool>

Source§

fn __expand_le( scope: &Scope, lhs: &Self::ExpandType, rhs: &Self::ExpandType, ) -> NativeExpand<bool>

Source§

fn __expand_gt( scope: &Scope, lhs: &Self::ExpandType, rhs: &Self::ExpandType, ) -> NativeExpand<bool>

Source§

fn __expand_ge( scope: &Scope, lhs: &Self::ExpandType, rhs: &Self::ExpandType, ) -> NativeExpand<bool>

Source§

impl<T> CubeRem for T
where T: Rem<Output = T> + CubePrimitive + IntoRuntime,

Source§

fn __expand_rem_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

fn __expand_rem( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<T> CubeShl for T
where T: Shl<Output = T> + CubePrimitive + IntoRuntime,

Source§

fn __expand_shl_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

fn __expand_shl( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<T> CubeShlAssign for T

Source§

fn __expand_shl_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )

Source§

impl<T> CubeShr for T
where T: Shr<Output = T> + CubePrimitive + IntoRuntime,

Source§

fn __expand_shr_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

fn __expand_shr( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<T> CubeShrAssign for T

Source§

fn __expand_shr_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )

Source§

impl<T> CubeSub for T
where T: Sub<Output = T> + CubePrimitive + IntoRuntime,

Source§

fn __expand_sub_method( self, scope: &Scope, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

fn __expand_sub( scope: &Scope, lhs: NativeExpand<Self>, rhs: NativeExpand<Self>, ) -> NativeExpand<Self>

Source§

impl<T> CubeSubAssign for T

Source§

fn __expand_sub_assign( scope: &Scope, lhs: &mut NativeExpand<Self>, rhs: NativeExpand<Self>, )

Source§

impl<T> DefaultExpand for T

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoComptime for T

Source§

fn comptime(self) -> Self

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> NativeCubeType for T
where T: CubeType<ExpandType = NativeExpand<T>> + ?Sized,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T> OneExpand for T
where T: CubeType + One + IntoRuntime,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<P> Reinterpret for P
where P: CubePrimitive,

Source§

fn reinterpret<From: CubePrimitive>(value: From) -> Self

Reinterpret the bits of another primitive as this primitive without conversion.
Source§

fn reinterpret_vectorization<From: CubePrimitive>() -> usize

Calculates the expected vectorization for the reinterpret target
Source§

fn __expand_reinterpret<From: CubePrimitive>( scope: &Scope, value: NativeExpand<From>, ) -> <Self as CubeType>::ExpandType

Source§

fn __expand_reinterpret_vectorization<From: CubePrimitive>( scope: &Scope, ) -> usize

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> TuneInputs for T
where T: Clone + Send + Sync + 'static,

Source§

type At<'a> = T

The concrete input type at lifetime 'a.
Source§

impl<T> ZeroExpand for T
where T: CubeType + Zero + IntoRuntime,