Struct Line

Source
pub struct Line<P> { /* private fields */ }
Expand description

A contiguous list of elements that supports auto-vectorized operations.

Implementations§

Source§

impl<P: CubePrimitive> Line<P>

Source

pub fn new(val: P) -> Self

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

Source

pub fn __expand_new( _scope: &mut Scope, val: P::ExpandType, ) -> ExpandElementTyped<Self>

Expand function of Self::new.

Source§

impl<P: CubePrimitive + Into<ExpandElementTyped<P>>> Line<P>

Source

pub fn fill(self, value: P) -> Self

Fill the line with the given value.

If you want to fill the line with different values, consider using the index API instead.

let mut line = Line::<u32>::empty(2);
line[0] = 1;
line[1] = 2;
Source

pub fn __expand_fill( scope: &mut Scope, line: ExpandElementTyped<Self>, value: ExpandElementTyped<P>, ) -> ExpandElementTyped<Self>

Expand function of fill.

Source§

impl<P: CubePrimitive> Line<P>

Source

pub fn empty(size: u32) -> Self

Create an empty line of the given size.

Note that a line can’t change in size once it’s fixed.

Source

pub fn __expand_empty( scope: &mut Scope, length: u32, ) -> ExpandElementTyped<Self>

Expand function of empty.

Source§

impl<P: CubePrimitive> Line<P>

Source

pub fn size(&self) -> u32

Get the number of individual elements a line 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!(line.size() == 1) {
}
Source

pub fn __expand_size(scope: &mut Scope, element: ExpandElementTyped<P>) -> u32

Expand function of size.

Source§

impl<P: CubePrimitive> Line<P>

Source

pub fn equal(self, _other: Self) -> Line<bool>

Return a new line with the element-wise comparison of the first line being equal to the second line.

Source

pub fn __expand_equal( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Line<bool>>

Expand function of $name.

Source§

impl<P: CubePrimitive> Line<P>

Source

pub fn not_equal(self, _other: Self) -> Line<bool>

Return a new line with the element-wise comparison of the first line being not equal to the second line.

Source

pub fn __expand_not_equal( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Line<bool>>

Expand function of $name.

Source§

impl<P: CubePrimitive> Line<P>

Source

pub fn less_than(self, _other: Self) -> Line<bool>

Return a new line with the element-wise comparison of the first line being less than the second line.

Source

pub fn __expand_less_than( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Line<bool>>

Expand function of $name.

Source§

impl<P: CubePrimitive> Line<P>

Source

pub fn greater_than(self, _other: Self) -> Line<bool>

Return a new line with the element-wise comparison of the first line being greater than the second line.

Source

pub fn __expand_greater_than( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Line<bool>>

Expand function of $name.

Source§

impl<P: CubePrimitive> Line<P>

Source

pub fn less_equal(self, _other: Self) -> Line<bool>

Return a new line with the element-wise comparison of the first line being less than or equal to the second line.

Source

pub fn __expand_less_equal( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Line<bool>>

Expand function of $name.

Source§

impl<P: CubePrimitive> Line<P>

Source

pub fn greater_equal(self, _other: Self) -> Line<bool>

Return a new line with the element-wise comparison of the first line being greater than or equal to the second line.

Source

pub fn __expand_greater_equal( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Line<bool>>

Expand function of $name.

Source§

impl Line<bool>

Source

pub fn and(self, _other: Self) -> Line<bool>

Return a new line with the element-wise and of the lines

Source

pub fn __expand_and( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Line<bool>>

Expand function of and.

Source§

impl Line<bool>

Source

pub fn or(self, _other: Self) -> Line<bool>

Return a new line with the element-wise and of the lines

Source

pub fn __expand_or( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Line<bool>>

Expand function of and.

Source§

impl<P: CountOnes> Line<P>

Source

pub fn count_ones(self) -> Line<u32>

Source

pub fn __expand_count_ones( scope: &mut Scope, value: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Line<u32>>

Source§

impl<P: LeadingZeros> Line<P>

Source§

impl<P: FindFirstSet> Line<P>

Trait Implementations§

Source§

impl<P: CubePrimitive + Abs> Abs for Line<P>

Source§

fn abs(x: Self) -> Self

Source§

fn __expand_abs( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P> Add<f32> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<P> Add<f64> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<P> Add<i32> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<P> Add<i64> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<P> Add<usize> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<P> Add for Line<P>
where P: CubePrimitive + Add<P, Output = P>,

Source§

type Output = Line<P>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<P> AddAssign for Line<P>

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<P> BitAnd for Line<P>
where P: CubePrimitive + BitAnd<P, Output = P>,

Source§

type Output = Line<P>

The resulting type after applying the & operator.
Source§

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

Performs the & operation. Read more
Source§

impl<P> BitAndAssign for Line<P>

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl<P> BitOr for Line<P>
where P: CubePrimitive + BitOr<P, Output = P>,

Source§

type Output = Line<P>

The resulting type after applying the | operator.
Source§

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

Performs the | operation. Read more
Source§

impl<P> BitOrAssign for Line<P>

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl<P> BitXor for Line<P>
where P: CubePrimitive + BitXor<P, Output = P>,

Source§

type Output = Line<P>

The resulting type after applying the ^ operator.
Source§

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

Performs the ^ operation. Read more
Source§

impl<P> BitXorAssign for Line<P>

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl<P: CubePrimitive + BitwiseNot> BitwiseNot for Line<P>

Source§

fn bitwise_not(x: Self) -> Self

Source§

fn __expand_bitwise_not( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive + Ceil> Ceil for Line<P>

Source§

fn ceil(x: Self) -> Self

Source§

fn __expand_ceil( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive + Clamp> Clamp for Line<P>

Source§

fn clamp(input: Self, min_value: Self, max_value: Self) -> Self

Clamp the input value between the max and min values provided.
Source§

fn __expand_clamp( scope: &mut Scope, input: Self::ExpandType, min_value: Self::ExpandType, max_value: Self::ExpandType, ) -> Self::ExpandType

Source§

impl<P: CubePrimitive> Clone for Line<P>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<P: CubePrimitive + Cos> Cos for Line<P>

Source§

fn cos(x: Self) -> Self

Source§

fn __expand_cos( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P> CubeIndex<ExpandElementTyped<u32>> for Line<P>
where P: CubePrimitive,

Source§

type Output = P

Source§

fn cube_idx(&self, _i: ExpandElementTyped<u32>) -> &Self::Output

Source§

impl<P> CubeIndex<u32> for Line<P>
where P: CubePrimitive,

Source§

type Output = P

Source§

fn cube_idx(&self, _i: u32) -> &Self::Output

Source§

impl<P> CubeIndexMut<ExpandElementTyped<u32>> for Line<P>
where P: CubePrimitive,

Source§

fn cube_idx_mut(&mut self, _i: ExpandElementTyped<u32>) -> &mut Self::Output

Source§

impl<P> CubeIndexMut<u32> for Line<P>
where P: CubePrimitive,

Source§

fn cube_idx_mut(&mut self, _i: u32) -> &mut Self::Output

Source§

impl<P: CubePrimitive> CubePrimitive for Line<P>

Source§

fn as_elem(scope: &Scope) -> Elem

Return the element type to use on GPU.
Source§

fn as_elem_native() -> Option<Elem>

Native or static element type.
Source§

fn size() -> Option<usize>

Only native element types have a size.
Source§

fn as_elem_native_unchecked() -> Elem

Native or static element type.
Source§

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

Source§

fn is_supported<S: ComputeServer<Feature = Feature>, C: ComputeChannel<S>>( client: &ComputeClient<S, C>, ) -> bool

Source§

fn elem_size() -> u32

Source§

fn __expand_elem_size(context: &Scope) -> u32

Source§

impl<P: CubePrimitive> CubeType for Line<P>

Source§

type ExpandType = ExpandElementTyped<Line<P>>

Source§

fn init(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType

Wrapper around the init method, necessary to type inference.
Source§

impl<P> Div<f32> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<P> Div<f64> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<P> Div<i32> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<P> Div<i64> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<P> Div<usize> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<P> Div for Line<P>
where P: CubePrimitive + Div<P, Output = P>,

Source§

type Output = Line<P>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<P> DivAssign for Line<P>

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl<N: Numeric> Dot for Line<N>

Source§

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

Source§

fn __expand_dot( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive + Erf> Erf for Line<P>

Source§

fn erf(x: Self) -> Self

Source§

fn __expand_erf( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive + Exp> Exp for Line<P>

Source§

fn exp(x: Self) -> Self

Source§

fn __expand_exp( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive> ExpandElementBaseInit for Line<P>

Source§

impl<P: CubePrimitive + Floor> Floor for Line<P>

Source§

fn floor(x: Self) -> Self

Source§

fn __expand_floor( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive + Into<ExpandElementTyped<P>>> Into<ExpandElementTyped<Line<P>>> for Line<P>

Source§

fn into(self) -> ExpandElementTyped<Self>

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

impl<P: CubePrimitive + Log> Log for Line<P>

Source§

fn log(x: Self) -> Self

Source§

fn __expand_log( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive + Log1p> Log1p for Line<P>

Source§

fn log1p(x: Self) -> Self

Source§

fn __expand_log1p( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive + Max> Max for Line<P>

Source§

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

Source§

fn __expand_max( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive + Min> Min for Line<P>

Source§

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

Source§

fn __expand_min( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Self>

Source§

impl<P> Mul<f32> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<P> Mul<f64> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<P> Mul<i32> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<P> Mul<i64> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<P> Mul<usize> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<P> Mul for Line<P>
where P: CubePrimitive + Mul<P, Output = P>,

Source§

type Output = Line<P>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<P> MulAssign for Line<P>

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl<N: MulHi + CubePrimitive> MulHi for Line<N>

Source§

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

Source§

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

Source§

impl<P: Neg<Output = P>> Neg for Line<P>

Source§

type Output = Line<P>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Line<P>

Performs the unary - operation. Read more
Source§

impl<P: CubePrimitive + NumCast> NumCast for Line<P>

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<P> PartialEq for Line<P>

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<P> PartialOrd for Line<P>

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 · 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 · 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 · 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 · 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: CubePrimitive + Powf> Powf for Line<P>

Source§

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

Source§

fn __expand_powf( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive + Recip> Recip for Line<P>

Source§

fn recip(x: Self) -> Self

Source§

fn __expand_recip( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive + Remainder> Remainder for Line<P>

Source§

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

Source§

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

Source§

impl<P: CubePrimitive + ReverseBits> ReverseBits for Line<P>

Source§

fn reverse_bits(x: Self) -> Self

Source§

fn __expand_reverse_bits( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive + Round> Round for Line<P>

Source§

fn round(x: Self) -> Self

Source§

fn __expand_round( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P> Shl for Line<P>
where P: CubePrimitive + Shl<P, Output = P>,

Source§

type Output = Line<P>

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

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

Performs the << operation. Read more
Source§

impl<P> ShlAssign for Line<P>

Source§

fn shl_assign(&mut self, rhs: Self)

Performs the <<= operation. Read more
Source§

impl<P> Shr for Line<P>
where P: CubePrimitive + Shr<P, Output = P>,

Source§

type Output = Line<P>

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

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

Performs the >> operation. Read more
Source§

impl<P> ShrAssign for Line<P>

Source§

fn shr_assign(&mut self, rhs: Self)

Performs the >>= operation. Read more
Source§

impl<P: CubePrimitive + Sin> Sin for Line<P>

Source§

fn sin(x: Self) -> Self

Source§

fn __expand_sin( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive + Sqrt> Sqrt for Line<P>

Source§

fn sqrt(x: Self) -> Self

Source§

fn __expand_sqrt( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P> Sub<f32> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<P> Sub<f64> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<P> Sub<i32> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<P> Sub<i64> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<P> Sub<usize> for Line<P>
where P: CubePrimitive,

Source§

type Output = Line<P>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<P> Sub for Line<P>
where P: CubePrimitive + Sub<P, Output = P>,

Source§

type Output = Line<P>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<P> SubAssign for Line<P>

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<P: CubePrimitive + Tanh> Tanh for Line<P>

Source§

fn tanh(x: Self) -> Self

Source§

fn __expand_tanh( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>

Source§

impl<P: CubePrimitive + NumCast> ToPrimitive for Line<P>

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: CubePrimitive> Copy for Line<P>

Source§

impl<P: CubePrimitive> Eq for Line<P>

Auto Trait Implementations§

§

impl<P> Freeze for Line<P>
where P: Freeze,

§

impl<P> RefUnwindSafe for Line<P>
where P: RefUnwindSafe,

§

impl<P> Send for Line<P>
where P: Send,

§

impl<P> Sync for Line<P>
where P: Sync,

§

impl<P> Unpin for Line<P>
where P: Unpin,

§

impl<P> UnwindSafe for Line<P>
where P: 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> 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: &mut Scope, value: ExpandElementTyped<From>, ) -> <Self as CubeType>::ExpandType

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<P> CubeDebug for P
where P: CubePrimitive,

Source§

fn set_debug_name(&self, scope: &mut 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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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

Checks if this value is equivalent to the given key. Read more
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<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 __expand_reinterpret<From: CubePrimitive>( scope: &mut Scope, value: ExpandElementTyped<From>, ) -> <Self as CubeType>::ExpandType

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V