VirtualViewMut

Struct VirtualViewMut 

Source
pub struct VirtualViewMut<T: CubePrimitive, C: Coordinates, S: Coordinates, V: ViewOperationsMut<T, S>> { /* private fields */ }

Implementations§

Source§

impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V: ViewOperationsMut<T, S>> VirtualViewMut<T, C, S, V>

Source

pub fn new(view: V, layout: VirtualLayout<C, S>) -> Self

Source

pub fn __expand_new( scope: &mut Scope, view: <V as CubeType>::ExpandType, layout: <VirtualLayout<C, S> as CubeType>::ExpandType, ) -> <Self as CubeType>::ExpandType

Trait Implementations§

Source§

impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V: ViewOperationsMut<T, S>> CubeType for VirtualViewMut<T, C, S, V>

Source§

type ExpandType = VirtualViewMutExpand<T, C, S, V>

Source§

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

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

impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V> Lined for VirtualViewMut<T, C, S, V>
where V: ViewOperationsMut<T, S>,

Source§

fn line_size(&self) -> u32

Source§

fn __expand_line_size(_scope: &mut Scope, this: Self::ExpandType) -> u32

Source§

impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V> ViewOperations<T, C> for VirtualViewMut<T, C, S, V>
where V: ViewOperationsMut<T, S>,

Source§

fn read(&self, pos: C) -> T

Source§

fn read_checked(&self, pos: C) -> T

Source§

fn read_masked(&self, pos: C, value: T) -> T

Source§

fn read_unchecked(&self, pos: C) -> T

Source§

fn to_linear_slice(&self, pos: C, size: C) -> Slice<T, ReadOnly>

Create a slice starting from pos, with size. The layout handles translation into concrete indices.
Source§

fn as_tensor_map(&self) -> CubeOption<TensorMap<T>>

Source§

fn tensor_map_load( &self, barrier: &Barrier, shared_memory: &mut Slice<T, ReadWrite>, pos: C, )

.Execute a TMA load into shared memory, if the underlying storage supports it. Panics if it’s unsupported.
Source§

fn shape(&self) -> C

Source§

fn is_in_bounds(&self, pos: C) -> bool

Source§

fn __expand_read( scope: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType

Source§

fn __expand_read_checked( scope: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType

Source§

fn __expand_read_masked( scope: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, value: <T as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType

Source§

fn __expand_read_unchecked( scope: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType

Source§

fn __expand_to_linear_slice( scope: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, size: <C as CubeType>::ExpandType, ) -> <Slice<T, ReadOnly> as CubeType>::ExpandType

Source§

fn __expand_as_tensor_map( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <CubeOption<TensorMap<T>> as CubeType>::ExpandType

Source§

fn __expand_tensor_map_load( scope: &mut Scope, this: <Self as CubeType>::ExpandType, barrier: <Barrier as CubeType>::ExpandType, shared_memory: <Slice<T, ReadWrite> as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType

Source§

fn __expand_shape( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <C as CubeType>::ExpandType

Source§

fn __expand_is_in_bounds( scope: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <bool as CubeType>::ExpandType

Source§

impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V> ViewOperationsMut<T, C> for VirtualViewMut<T, C, S, V>
where V: ViewOperationsMut<T, S>,

Source§

fn write(&self, pos: C, value: T)

Source§

fn write_checked(&self, pos: C, value: T)

Source§

fn to_linear_slice_mut(&self, pos: C, size: C) -> Slice<T, ReadWrite>

Create a mutable slice starting from pos, with size. The layout handles translation into concrete indices.
Source§

fn tensor_map_store(&self, shared_memory: &Slice<T>, pos: C)

.Execute a TMA store into global memory, if the underlying storage supports it. Panics if it’s unsupported.
Source§

fn __expand_write( scope: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, value: <T as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType

Source§

fn __expand_write_checked( scope: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, value: <T as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType

Source§

fn __expand_to_linear_slice_mut( scope: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, size: <C as CubeType>::ExpandType, ) -> <Slice<T, ReadWrite> as CubeType>::ExpandType

Source§

fn __expand_tensor_map_store( scope: &mut Scope, this: <Self as CubeType>::ExpandType, shared_memory: <Slice<T> as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType

Auto Trait Implementations§

§

impl<T, C, S, V> Freeze for VirtualViewMut<T, C, S, V>
where V: Freeze,

§

impl<T, C, S, V> RefUnwindSafe for VirtualViewMut<T, C, S, V>

§

impl<T, C, S, V> Send for VirtualViewMut<T, C, S, V>
where V: Send,

§

impl<T, C, S, V> Sync for VirtualViewMut<T, C, S, V>
where V: Sync,

§

impl<T, C, S, V> Unpin for VirtualViewMut<T, C, S, V>
where V: Unpin, T: Unpin, C: Unpin, S: Unpin,

§

impl<T, C, S, V> UnwindSafe for VirtualViewMut<T, C, S, V>

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