Struct cubecl::frontend::ExpandElementTyped
source · pub struct ExpandElementTyped<T>where
T: CubeType,{ /* private fields */ }Expand description
Expand type associated with a type.
Implementations§
source§impl<C> ExpandElementTyped<Array<C>>where
C: CubePrimitive,
impl<C> ExpandElementTyped<Array<C>>where
C: CubePrimitive,
pub fn __expand_to_vectorized_method( self, context: &mut CubeContext, vectorization_factor: UInt, ) -> ExpandElementTyped<C>
source§impl<T> ExpandElementTyped<T>where
T: CubeType,
impl<T> ExpandElementTyped<T>where
T: CubeType,
sourcepub fn new(expand: ExpandElement) -> ExpandElementTyped<T>
pub fn new(expand: ExpandElement) -> ExpandElementTyped<T>
Constructs a new ExpandElementTyped.
source§impl<T> ExpandElementTyped<T>where
T: CubePrimitive,
impl<T> ExpandElementTyped<T>where
T: CubePrimitive,
sourcepub fn from_lit<L>(lit: L) -> ExpandElementTyped<T>
pub fn from_lit<L>(lit: L) -> ExpandElementTyped<T>
Create an ExpandElementTyped from a value that is normaly a literal.
sourcepub fn constant(&self) -> Option<ConstantScalarValue>
pub fn constant(&self) -> Option<ConstantScalarValue>
Get the ConstantScalarValue from the variable.
source§impl<T> ExpandElementTyped<T>where
T: CubeType,
impl<T> ExpandElementTyped<T>where
T: CubeType,
pub fn __expand_stride_method<C>(
self,
context: &mut CubeContext,
dim: C,
) -> ExpandElementTyped<UInt>where
C: Index,
pub fn __expand_shape_method<C>(
self,
context: &mut CubeContext,
dim: C,
) -> ExpandElementTyped<UInt>where
C: Index,
pub fn __expand_len_method( self, context: &mut CubeContext, ) -> ExpandElementTyped<UInt>
pub fn __expand_rank_method( self, _context: &mut CubeContext, ) -> ExpandElementTyped<UInt>
Trait Implementations§
source§impl<T> Clone for ExpandElementTyped<T>where
T: CubeType,
impl<T> Clone for ExpandElementTyped<T>where
T: CubeType,
source§fn clone(&self) -> ExpandElementTyped<T>
fn clone(&self) -> ExpandElementTyped<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<T> From<ExpandElement> for ExpandElementTyped<T>where
T: CubeType,
impl<T> From<ExpandElement> for ExpandElementTyped<T>where
T: CubeType,
source§fn from(expand: ExpandElement) -> ExpandElementTyped<T>
fn from(expand: ExpandElement) -> ExpandElementTyped<T>
Converts to this type from the input type.
source§impl<T> From<ExpandElementTyped<T>> for ExpandElementwhere
T: CubeType,
impl<T> From<ExpandElementTyped<T>> for ExpandElementwhere
T: CubeType,
source§fn from(value: ExpandElementTyped<T>) -> ExpandElement
fn from(value: ExpandElementTyped<T>) -> ExpandElement
Converts to this type from the input type.
source§fn init(self, _context: &mut CubeContext) -> ExpandElementTyped<SharedMemory<T>>
fn init(self, _context: &mut CubeContext) -> ExpandElementTyped<SharedMemory<T>>
source§impl<'a, C> Init for ExpandElementTyped<Slice<'a, C>>where
C: CubeType,
impl<'a, C> Init for ExpandElementTyped<Slice<'a, C>>where
C: CubeType,
source§fn init(self, _context: &mut CubeContext) -> ExpandElementTyped<Slice<'a, C>>
fn init(self, _context: &mut CubeContext) -> ExpandElementTyped<Slice<'a, C>>
source§impl<'a, C> Init for ExpandElementTyped<SliceMut<'a, C>>where
C: CubeType,
impl<'a, C> Init for ExpandElementTyped<SliceMut<'a, C>>where
C: CubeType,
source§fn init(self, _context: &mut CubeContext) -> ExpandElementTyped<SliceMut<'a, C>>
fn init(self, _context: &mut CubeContext) -> ExpandElementTyped<SliceMut<'a, C>>
source§impl<T> Init for ExpandElementTyped<T>where
T: ExpandElementBaseInit,
impl<T> Init for ExpandElementTyped<T>where
T: ExpandElementBaseInit,
source§fn init(self, context: &mut CubeContext) -> ExpandElementTyped<T>
fn init(self, context: &mut CubeContext) -> ExpandElementTyped<T>
source§impl<E> SliceOperatorExpand<E> for ExpandElementTyped<Array<E>>where
E: CubePrimitive,
impl<E> SliceOperatorExpand<E> for ExpandElementTyped<Array<E>>where
E: CubePrimitive,
fn slice_base<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementwhere
Start: Index,
End: Index,
fn __expand_slice_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<Slice<'static, E>>where
Start: Index,
End: Index,
fn __expand_slice_mut_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<SliceMut<'static, E>>where
Start: Index,
End: Index,
fn __expand_slice_mut_unsafe_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<SliceMut<'static, E>>where
Start: Index,
End: Index,
fn __expand_as_slice_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<Slice<'static, E>>
fn __expand_as_slice_mut_unsafe_method( &self, context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_as_slice_mut_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>
fn slice_base<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementwhere
Start: Index,
End: Index,
fn __expand_slice_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<Slice<'static, E>>where
Start: Index,
End: Index,
fn __expand_slice_mut_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<SliceMut<'static, E>>where
Start: Index,
End: Index,
fn __expand_slice_mut_unsafe_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<SliceMut<'static, E>>where
Start: Index,
End: Index,
fn __expand_as_slice_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<Slice<'static, E>>
fn __expand_as_slice_mut_unsafe_method( &self, context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_as_slice_mut_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>
source§impl<'a, E> SliceOperatorExpand<E> for ExpandElementTyped<Slice<'a, E>>where
E: CubePrimitive,
impl<'a, E> SliceOperatorExpand<E> for ExpandElementTyped<Slice<'a, E>>where
E: CubePrimitive,
fn slice_base<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementwhere
Start: Index,
End: Index,
fn __expand_slice_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<Slice<'static, E>>where
Start: Index,
End: Index,
fn __expand_slice_mut_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<SliceMut<'static, E>>where
Start: Index,
End: Index,
fn __expand_slice_mut_unsafe_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<SliceMut<'static, E>>where
Start: Index,
End: Index,
fn __expand_as_slice_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<Slice<'static, E>>
fn __expand_as_slice_mut_unsafe_method( &self, context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_as_slice_mut_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>
source§impl<'a, E> SliceOperatorExpand<E> for ExpandElementTyped<SliceMut<'a, E>>where
E: CubePrimitive,
impl<'a, E> SliceOperatorExpand<E> for ExpandElementTyped<SliceMut<'a, E>>where
E: CubePrimitive,
fn slice_base<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementwhere
Start: Index,
End: Index,
fn __expand_slice_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<Slice<'static, E>>where
Start: Index,
End: Index,
fn __expand_slice_mut_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<SliceMut<'static, E>>where
Start: Index,
End: Index,
fn __expand_slice_mut_unsafe_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<SliceMut<'static, E>>where
Start: Index,
End: Index,
fn __expand_as_slice_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<Slice<'static, E>>
fn __expand_as_slice_mut_unsafe_method( &self, context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_as_slice_mut_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>
source§impl<E> SliceOperatorExpand<E> for ExpandElementTyped<Tensor<E>>where
E: CubePrimitive,
impl<E> SliceOperatorExpand<E> for ExpandElementTyped<Tensor<E>>where
E: CubePrimitive,
fn slice_base<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementwhere
Start: Index,
End: Index,
fn __expand_slice_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<Slice<'static, E>>where
Start: Index,
End: Index,
fn __expand_slice_mut_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<SliceMut<'static, E>>where
Start: Index,
End: Index,
fn __expand_slice_mut_unsafe_method<Start, End>(
&self,
context: &mut CubeContext,
start: Start,
end: End,
) -> ExpandElementTyped<SliceMut<'static, E>>where
Start: Index,
End: Index,
fn __expand_as_slice_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<Slice<'static, E>>
fn __expand_as_slice_mut_unsafe_method( &self, context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_as_slice_mut_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>
source§impl<T> Vectorized for ExpandElementTyped<T>where
T: CubeType,
impl<T> Vectorized for ExpandElementTyped<T>where
T: CubeType,
fn vectorization_factor(&self) -> UInt
fn vectorize(self, factor: UInt) -> ExpandElementTyped<T>
Auto Trait Implementations§
impl<T> Freeze for ExpandElementTyped<T>
impl<T> RefUnwindSafe for ExpandElementTyped<T>where
T: RefUnwindSafe,
impl<T> !Send for ExpandElementTyped<T>
impl<T> !Sync for ExpandElementTyped<T>
impl<T> Unpin for ExpandElementTyped<T>where
T: Unpin,
impl<T> UnwindSafe for ExpandElementTyped<T>where
T: 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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)