pub struct Line<P> { /* private fields */ }Expand description
A contiguous list of elements that supports auto-vectorized operations.
Implementations§
Source§impl<P> Line<P>where
P: CubePrimitive,
impl<P> Line<P>where
P: CubePrimitive,
pub fn __expand_new( scope: &mut Scope, val: <P as CubeType>::ExpandType, ) -> <Line<P> as CubeType>::ExpandType
Source§impl<P> Line<P>where
P: CubePrimitive,
impl<P> Line<P>where
P: CubePrimitive,
Source§impl<P> Line<P>
impl<P> Line<P>
Sourcepub fn fill(self, value: P) -> Line<P>
pub fn fill(self, value: P) -> Line<P>
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;pub fn __expand_fill( scope: &mut Scope, this: <Line<P> as CubeType>::ExpandType, value: <P as CubeType>::ExpandType, ) -> <Line<P> as CubeType>::ExpandType
Source§impl<P> Line<P>where
P: CubePrimitive,
impl<P> Line<P>where
P: CubePrimitive,
Source§impl<P> Line<P>where
P: CubePrimitive,
impl<P> Line<P>where
P: CubePrimitive,
Sourcepub fn size(&self) -> u32
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) {
}Sourcepub fn __expand_size(scope: &mut Scope, element: ExpandElementTyped<P>) -> u32
pub fn __expand_size(scope: &mut Scope, element: ExpandElementTyped<P>) -> u32
Expand function of size.
Source§impl<P> Line<P>where
P: CubePrimitive,
impl<P> Line<P>where
P: CubePrimitive,
Sourcepub fn equal(self, other: Line<P>) -> Line<bool>
pub fn equal(self, other: Line<P>) -> Line<bool>
Return a new line with the element-wise comparison of the first line being equal to the second line.
pub fn __expand_equal( scope: &mut Scope, this: <Line<P> as CubeType>::ExpandType, other: <Line<P> as CubeType>::ExpandType, ) -> <Line<bool> as CubeType>::ExpandType
Source§impl<P> Line<P>where
P: CubePrimitive,
impl<P> Line<P>where
P: CubePrimitive,
Sourcepub fn not_equal(self, other: Line<P>) -> Line<bool>
pub fn not_equal(self, other: Line<P>) -> Line<bool>
Return a new line with the element-wise comparison of the first line being not equal to the second line.
pub fn __expand_not_equal( scope: &mut Scope, this: <Line<P> as CubeType>::ExpandType, other: <Line<P> as CubeType>::ExpandType, ) -> <Line<bool> as CubeType>::ExpandType
Source§impl<P> Line<P>where
P: CubePrimitive,
impl<P> Line<P>where
P: CubePrimitive,
Sourcepub fn less_than(self, other: Line<P>) -> Line<bool>
pub fn less_than(self, other: Line<P>) -> Line<bool>
Return a new line with the element-wise comparison of the first line being less than the second line.
pub fn __expand_less_than( scope: &mut Scope, this: <Line<P> as CubeType>::ExpandType, other: <Line<P> as CubeType>::ExpandType, ) -> <Line<bool> as CubeType>::ExpandType
Source§impl<P> Line<P>where
P: CubePrimitive,
impl<P> Line<P>where
P: CubePrimitive,
Sourcepub fn greater_than(self, other: Line<P>) -> Line<bool>
pub fn greater_than(self, other: Line<P>) -> Line<bool>
Return a new line with the element-wise comparison of the first line being greater than the second line.
pub fn __expand_greater_than( scope: &mut Scope, this: <Line<P> as CubeType>::ExpandType, other: <Line<P> as CubeType>::ExpandType, ) -> <Line<bool> as CubeType>::ExpandType
Source§impl<P> Line<P>where
P: CubePrimitive,
impl<P> Line<P>where
P: CubePrimitive,
Sourcepub fn less_equal(self, other: Line<P>) -> Line<bool>
pub fn less_equal(self, other: Line<P>) -> Line<bool>
Return a new line with the element-wise comparison of the first line being less than or equal to the second line.
pub fn __expand_less_equal( scope: &mut Scope, this: <Line<P> as CubeType>::ExpandType, other: <Line<P> as CubeType>::ExpandType, ) -> <Line<bool> as CubeType>::ExpandType
Source§impl<P> Line<P>where
P: CubePrimitive,
impl<P> Line<P>where
P: CubePrimitive,
Sourcepub fn greater_equal(self, other: Line<P>) -> Line<bool>
pub fn greater_equal(self, other: Line<P>) -> Line<bool>
Return a new line with the element-wise comparison of the first line being greater than or equal to the second line.
pub fn __expand_greater_equal( scope: &mut Scope, this: <Line<P> as CubeType>::ExpandType, other: <Line<P> as CubeType>::ExpandType, ) -> <Line<bool> as CubeType>::ExpandType
Source§impl<P> Line<P>where
P: CountOnes,
impl<P> Line<P>where
P: CountOnes,
pub fn count_ones(self) -> Line<u32>
pub fn __expand_count_ones( scope: &mut Scope, this: <Line<P> as CubeType>::ExpandType, ) -> <Line<u32> as CubeType>::ExpandType
Source§impl<P> Line<P>where
P: LeadingZeros,
impl<P> Line<P>where
P: LeadingZeros,
pub fn leading_zeros(self) -> Line<u32>
pub fn __expand_leading_zeros( scope: &mut Scope, this: <Line<P> as CubeType>::ExpandType, ) -> <Line<u32> as CubeType>::ExpandType
Source§impl<P> Line<P>where
P: FindFirstSet,
impl<P> Line<P>where
P: FindFirstSet,
pub fn find_first_set(self) -> Line<u32>
pub fn __expand_find_first_set( scope: &mut Scope, this: <Line<P> as CubeType>::ExpandType, ) -> <Line<u32> as CubeType>::ExpandType
Trait Implementations§
Source§impl<P> Abs for Line<P>where
P: CubePrimitive + Abs,
impl<P> Abs for Line<P>where
P: CubePrimitive + Abs,
fn abs(x: Self) -> Self
fn __expand_abs( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<P> AddAssign for Line<P>where
P: CubePrimitive + AddAssign,
impl<P> AddAssign for Line<P>where
P: CubePrimitive + AddAssign,
Source§fn add_assign(&mut self, rhs: Line<P>)
fn add_assign(&mut self, rhs: Line<P>)
+= operation. Read moreSource§impl<P> BitAndAssign for Line<P>where
P: CubePrimitive + BitAndAssign,
impl<P> BitAndAssign for Line<P>where
P: CubePrimitive + BitAndAssign,
Source§fn bitand_assign(&mut self, rhs: Line<P>)
fn bitand_assign(&mut self, rhs: Line<P>)
&= operation. Read moreSource§impl<P> BitOrAssign for Line<P>where
P: CubePrimitive + BitOrAssign,
impl<P> BitOrAssign for Line<P>where
P: CubePrimitive + BitOrAssign,
Source§fn bitor_assign(&mut self, rhs: Line<P>)
fn bitor_assign(&mut self, rhs: Line<P>)
|= operation. Read moreSource§impl<P> BitXorAssign for Line<P>where
P: CubePrimitive + BitXorAssign,
impl<P> BitXorAssign for Line<P>where
P: CubePrimitive + BitXorAssign,
Source§fn bitxor_assign(&mut self, rhs: Line<P>)
fn bitxor_assign(&mut self, rhs: Line<P>)
^= operation. Read moreSource§impl<P> BitwiseNot for Line<P>where
P: CubePrimitive + BitwiseNot,
impl<P> BitwiseNot for Line<P>where
P: CubePrimitive + BitwiseNot,
fn bitwise_not(x: Self) -> Self
fn __expand_bitwise_not( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<P> Ceil for Line<P>where
P: CubePrimitive + Ceil,
impl<P> Ceil for Line<P>where
P: CubePrimitive + Ceil,
fn ceil(x: Self) -> Self
fn __expand_ceil( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<P> Clamp for Line<P>where
P: CubePrimitive + Clamp,
impl<P> Clamp for Line<P>where
P: CubePrimitive + Clamp,
Source§fn clamp(input: Self, min_value: Self, max_value: Self) -> Self
fn clamp(input: Self, min_value: Self, max_value: Self) -> Self
fn __expand_clamp( scope: &mut Scope, input: Self::ExpandType, min_value: Self::ExpandType, max_value: Self::ExpandType, ) -> Self::ExpandType
Source§impl<P> Clone for Line<P>where
P: CubePrimitive,
impl<P> Clone for Line<P>where
P: CubePrimitive,
Source§impl<P> Cos for Line<P>where
P: CubePrimitive + Cos,
impl<P> Cos for Line<P>where
P: CubePrimitive + Cos,
fn cos(x: Self) -> Self
fn __expand_cos( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<E> CubeIndex for Line<E>where
E: CubePrimitive,
impl<E> CubeIndex for Line<E>where
E: CubePrimitive,
type Output = E
type Idx = u32
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> CubeIndexMut for Line<E>where
E: CubePrimitive,
impl<E> CubeIndexMut for Line<E>where
E: CubePrimitive,
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> CubePrimitive for Line<P>where
P: CubePrimitive,
impl<P> CubePrimitive for Line<P>where
P: CubePrimitive,
Source§fn as_type(scope: &Scope) -> StorageType
fn as_type(scope: &Scope) -> StorageType
Source§fn as_type_native() -> Option<StorageType>
fn as_type_native() -> Option<StorageType>
fn from_const_value(value: ConstantScalarValue) -> Line<P>
Source§fn as_type_native_unchecked() -> StorageType
fn as_type_native_unchecked() -> StorageType
Source§fn size_bits_unchecked() -> usize
fn size_bits_unchecked() -> usize
fn from_expand_elem(elem: ExpandElement) -> Self::ExpandType
fn into_lit_unchecked(self) -> Self
fn supported_uses<S>(client: &ComputeClient<S>) -> EnumSet<TypeUsage>where
S: ComputeServer,
fn elem_size() -> u32
fn elem_size_bits() -> u32
fn packing_factor() -> u32
fn __expand_elem_size(scope: &Scope) -> u32
fn __expand_elem_size_bits(scope: &Scope) -> u32
fn __expand_packing_factor(scope: &Scope) -> u32
Source§impl<P> CubeType for &Line<P>where
P: CubePrimitive,
impl<P> CubeType for &Line<P>where
P: CubePrimitive,
type ExpandType = ExpandElementTyped<Line<P>>
Source§fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
Source§impl<P> CubeType for &mut Line<P>where
P: CubePrimitive,
impl<P> CubeType for &mut Line<P>where
P: CubePrimitive,
type ExpandType = ExpandElementTyped<Line<P>>
Source§fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
Source§impl<P> CubeType for Line<P>where
P: CubePrimitive,
impl<P> CubeType for Line<P>where
P: CubePrimitive,
type ExpandType = ExpandElementTyped<Line<P>>
Source§fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
Source§impl<P> DivAssign for Line<P>where
P: CubePrimitive + DivAssign,
impl<P> DivAssign for Line<P>where
P: CubePrimitive + DivAssign,
Source§fn div_assign(&mut self, rhs: Line<P>)
fn div_assign(&mut self, rhs: Line<P>)
/= operation. Read moreSource§impl<N> Dot for Line<N>where
N: Numeric,
impl<N> Dot for Line<N>where
N: Numeric,
fn dot(self, _rhs: Line<N>) -> Line<N>
fn __expand_dot( scope: &mut Scope, lhs: ExpandElementTyped<Line<N>>, rhs: ExpandElementTyped<Line<N>>, ) -> ExpandElementTyped<Line<N>>
Source§impl<P> Erf for Line<P>where
P: CubePrimitive + Erf,
impl<P> Erf for Line<P>where
P: CubePrimitive + Erf,
fn erf(x: Self) -> Self
fn __expand_erf( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<P> Exp for Line<P>where
P: CubePrimitive + Exp,
impl<P> Exp for Line<P>where
P: CubePrimitive + Exp,
fn exp(x: Self) -> Self
fn __expand_exp( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<P> ExpandElementIntoMut for Line<P>where
P: CubePrimitive,
impl<P> ExpandElementIntoMut for Line<P>where
P: CubePrimitive,
fn elem_into_mut(scope: &mut Scope, elem: ExpandElement) -> ExpandElement
Source§impl<P> Floor for Line<P>where
P: CubePrimitive + Floor,
impl<P> Floor for Line<P>where
P: CubePrimitive + Floor,
fn floor(x: Self) -> Self
fn __expand_floor( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<P> Into<ExpandElementTyped<Line<P>>> for Line<P>
impl<P> Into<ExpandElementTyped<Line<P>>> for Line<P>
Source§fn into(self) -> ExpandElementTyped<Line<P>>
fn into(self) -> ExpandElementTyped<Line<P>>
Source§impl<P> IsInf for Line<P>where
P: CubePrimitive + IsInf,
impl<P> IsInf for Line<P>where
P: CubePrimitive + IsInf,
fn is_inf(x: Self) -> bool
fn __expand_is_inf( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<bool>
Source§impl<P> IsNan for Line<P>where
P: CubePrimitive + IsNan,
impl<P> IsNan for Line<P>where
P: CubePrimitive + IsNan,
fn is_nan(x: Self) -> bool
fn __expand_is_nan( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<bool>
Source§impl<E, IO> List<Line<E>> for VirtualTensor<E, IO>
impl<E, IO> List<Line<E>> for VirtualTensor<E, IO>
fn __expand_read( scope: &mut Scope, this: VirtualTensorExpand<E, IO>, index: <u32 as CubeType>::ExpandType, ) -> <Line<E> as CubeType>::ExpandType
fn read(&self, index: u32) -> T
fn read_unchecked(&self, index: u32) -> T
fn len(&self) -> u32
fn __expand_read_unchecked( scope: &mut Scope, this: Self::ExpandType, index: <u32 as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType
fn __expand_len( scope: &mut Scope, this: Self::ExpandType, ) -> <u32 as CubeType>::ExpandType
Source§impl<E, IO> ListExpand<Line<E>> for VirtualTensorExpand<E, IO>
impl<E, IO> ListExpand<Line<E>> for VirtualTensorExpand<E, IO>
fn __expand_read_method( &self, scope: &mut Scope, index: <u32 as CubeType>::ExpandType, ) -> <Line<E> as CubeType>::ExpandType
fn __expand_read_unchecked_method( &self, _scope: &mut Scope, _index: ExpandElementTyped<u32>, ) -> <Line<E> as CubeType>::ExpandType
fn __expand_len_method(&self, scope: &mut Scope) -> ExpandElementTyped<u32>
Source§impl<E> ListMut<Line<E>> for VirtualTensor<E, ReadWrite>where
E: Numeric,
impl<E> ListMut<Line<E>> for VirtualTensor<E, ReadWrite>where
E: Numeric,
fn __expand_write( scope: &mut Scope, this: VirtualTensorExpand<E, ReadWrite>, index: <u32 as CubeType>::ExpandType, value: <Line<E> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
fn write(&self, index: u32, value: T)
Source§impl<E> ListMutExpand<Line<E>> for VirtualTensorExpand<E, ReadWrite>where
E: Numeric,
impl<E> ListMutExpand<Line<E>> for VirtualTensorExpand<E, ReadWrite>where
E: Numeric,
fn __expand_write_method( &self, scope: &mut Scope, index: <u32 as CubeType>::ExpandType, value: <Line<E> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
Source§impl<P> Log for Line<P>where
P: CubePrimitive + Log,
impl<P> Log for Line<P>where
P: CubePrimitive + Log,
fn log(x: Self) -> Self
fn __expand_log( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<P> Log1p for Line<P>where
P: CubePrimitive + Log1p,
impl<P> Log1p for Line<P>where
P: CubePrimitive + Log1p,
fn log1p(x: Self) -> Self
fn __expand_log1p( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<P> Max for Line<P>where
P: CubePrimitive + Max,
impl<P> Max for Line<P>where
P: CubePrimitive + Max,
fn max(self, _rhs: Self) -> Self
fn __expand_max( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Self>
Source§impl<P> Min for Line<P>where
P: CubePrimitive + Min,
impl<P> Min for Line<P>where
P: CubePrimitive + Min,
fn min(self, _rhs: Self) -> Self
fn __expand_min( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Self>
Source§impl<P> MulAssign for Line<P>where
P: CubePrimitive + MulAssign,
impl<P> MulAssign for Line<P>where
P: CubePrimitive + MulAssign,
Source§fn mul_assign(&mut self, rhs: Line<P>)
fn mul_assign(&mut self, rhs: Line<P>)
*= operation. Read moreSource§impl<N> MulHi for Line<N>where
N: MulHi + CubePrimitive,
impl<N> MulHi for Line<N>where
N: MulHi + CubePrimitive,
fn mul_hi(self, _rhs: Self) -> Self
fn __expand_mul_hi( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Self>
Source§impl<P> PartialOrd for Line<P>where
P: CubePrimitive + PartialOrd,
impl<P> PartialOrd for Line<P>where
P: CubePrimitive + PartialOrd,
Source§impl<P> Powf for Line<P>where
P: CubePrimitive + Powf,
impl<P> Powf for Line<P>where
P: CubePrimitive + Powf,
fn powf(self, _rhs: Self) -> Self
fn __expand_powf( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Self>
Source§impl<P, I> Powi<Line<I>> for Line<P>
impl<P, I> Powi<Line<I>> for Line<P>
fn powi(self, _rhs: Rhs) -> Self
fn __expand_powi( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Rhs>, ) -> ExpandElementTyped<Self>
Source§impl<P> Recip for Line<P>where
P: CubePrimitive + Recip,
impl<P> Recip for Line<P>where
P: CubePrimitive + Recip,
fn recip(x: Self) -> Self
fn __expand_recip( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<P> Remainder for Line<P>where
P: CubePrimitive + Remainder,
impl<P> Remainder for Line<P>where
P: CubePrimitive + Remainder,
fn rem(self, _rhs: Self) -> Self
fn __expand_rem( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Self>
Source§impl<P> ReverseBits for Line<P>where
P: CubePrimitive + ReverseBits,
impl<P> ReverseBits for Line<P>where
P: CubePrimitive + ReverseBits,
fn reverse_bits(x: Self) -> Self
fn __expand_reverse_bits( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<P> Round for Line<P>where
P: CubePrimitive + Round,
impl<P> Round for Line<P>where
P: CubePrimitive + Round,
fn round(x: Self) -> Self
fn __expand_round( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<P> SaturatingAdd for Line<P>where
P: CubePrimitive + SaturatingAdd,
impl<P> SaturatingAdd for Line<P>where
P: CubePrimitive + SaturatingAdd,
fn saturating_add(self, _rhs: Self) -> Self
fn __expand_saturating_add( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Self>
Source§impl<P> SaturatingSub for Line<P>where
P: CubePrimitive + SaturatingSub,
impl<P> SaturatingSub for Line<P>where
P: CubePrimitive + SaturatingSub,
fn saturating_sub(self, _rhs: Self) -> Self
fn __expand_saturating_sub( scope: &mut Scope, lhs: ExpandElementTyped<Self>, rhs: ExpandElementTyped<Self>, ) -> ExpandElementTyped<Self>
Source§impl<P> ShlAssign for Line<P>where
P: CubePrimitive + ShlAssign,
impl<P> ShlAssign for Line<P>where
P: CubePrimitive + ShlAssign,
Source§fn shl_assign(&mut self, rhs: Line<P>)
fn shl_assign(&mut self, rhs: Line<P>)
<<= operation. Read moreSource§impl<P> ShrAssign for Line<P>where
P: CubePrimitive + ShrAssign,
impl<P> ShrAssign for Line<P>where
P: CubePrimitive + ShrAssign,
Source§fn shr_assign(&mut self, rhs: Line<P>)
fn shr_assign(&mut self, rhs: Line<P>)
>>= operation. Read moreSource§impl<P> Sin for Line<P>where
P: CubePrimitive + Sin,
impl<P> Sin for Line<P>where
P: CubePrimitive + Sin,
fn sin(x: Self) -> Self
fn __expand_sin( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<E> SliceMutOperator<Line<E>> for VirtualTensor<E, ReadWrite>where
E: Numeric,
impl<E> SliceMutOperator<Line<E>> for VirtualTensor<E, ReadWrite>where
E: Numeric,
Source§fn slice_mut(&mut self, start: u32, end: u32) -> Slice<E, ReadWrite> ⓘ
fn slice_mut(&mut self, start: u32, end: u32) -> 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: <u32 as CubeType>::ExpandType, end: <u32 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> SliceMutOperatorExpand<Line<E>> for VirtualTensorExpand<E, ReadWrite>where
E: Numeric,
impl<E> SliceMutOperatorExpand<Line<E>> for VirtualTensorExpand<E, ReadWrite>where
E: Numeric,
fn __expand_slice_mut_method( &self, scope: &mut Scope, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> SliceExpand<Line<E>, ReadWrite>
fn __expand_to_slice_mut_method( &self, scope: &mut Scope, ) -> SliceExpand<Line<E>, ReadWrite>
Source§impl<E, IO> SliceOperator<Line<E>> for VirtualTensor<E, IO>
impl<E, IO> SliceOperator<Line<E>> for VirtualTensor<E, IO>
Source§fn slice(&self, start: u32, end: u32) -> Slice<E> ⓘ
fn slice(&self, start: u32, end: u32) -> 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: <u32 as CubeType>::ExpandType, end: <u32 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, IO> SliceOperatorExpand<Line<E>> for VirtualTensorExpand<E, IO>
impl<E, IO> SliceOperatorExpand<Line<E>> for VirtualTensorExpand<E, IO>
fn __expand_slice_method( &self, scope: &mut Scope, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> SliceExpand<Line<E>, ReadOnly>
fn __expand_to_slice_method( &self, scope: &mut Scope, ) -> SliceExpand<Line<E>, ReadOnly>
Source§impl<P> Sqrt for Line<P>where
P: CubePrimitive + Sqrt,
impl<P> Sqrt for Line<P>where
P: CubePrimitive + Sqrt,
fn sqrt(x: Self) -> Self
fn __expand_sqrt( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<P> SubAssign for Line<P>where
P: CubePrimitive + SubAssign,
impl<P> SubAssign for Line<P>where
P: CubePrimitive + SubAssign,
Source§fn sub_assign(&mut self, rhs: Line<P>)
fn sub_assign(&mut self, rhs: Line<P>)
-= operation. Read moreSource§impl<P> Tanh for Line<P>where
P: CubePrimitive + Tanh,
impl<P> Tanh for Line<P>where
P: CubePrimitive + Tanh,
fn tanh(x: Self) -> Self
fn __expand_tanh( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
Source§impl<P> ToPrimitive for Line<P>where
P: CubePrimitive + NumCast,
impl<P> ToPrimitive for Line<P>where
P: CubePrimitive + NumCast,
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> Trunc for Line<P>where
P: CubePrimitive + Trunc,
impl<P> Trunc for Line<P>where
P: CubePrimitive + Trunc,
fn trunc(x: Self) -> Self
fn __expand_trunc( scope: &mut Scope, x: Self::ExpandType, ) -> ExpandElementTyped<Self>
impl<P> Copy for Line<P>where
P: CubePrimitive,
impl<P> Eq for Line<P>where
P: CubePrimitive,
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> 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: ExpandElementTyped<From>,
) -> Self::ExpandTypewhere
From: CubePrimitive,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<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.