pub struct Im2colTmaReader<E: Numeric> {
pub tensor: TensorMap<E>,
pub n_offset: u32,
pub spatial_offsets: Sequence<u32>,
pub k_offset: u32,
}
Expand description
A view of a feature map tensor that starts reading data from a specified offset. Ensures safe access by preventing out-of-bounds errors. Includes pre-fetched shapes and strides for optimized performance.
Fields§
§tensor: TensorMap<E>
§n_offset: u32
§spatial_offsets: Sequence<u32>
§k_offset: u32
Implementations§
Source§impl<E: Numeric> Im2colTmaReader<E>
impl<E: Numeric> Im2colTmaReader<E>
pub fn new( tensor: VirtualTensor<E>, n_offset: u32, spatial_offsets: Sequence<u32>, k_offset: u32, ) -> Im2colTmaReader<E>
Sourcepub fn update_view(&mut self, k_offset: u32)
pub fn update_view(&mut self, k_offset: u32)
Advance the view along the k dimension by a specified offset, k_offset
.
pub fn __expand_new( scope: &mut Scope, tensor: <VirtualTensor<E> as CubeType>::ExpandType, n_offset: <u32 as CubeType>::ExpandType, spatial_offsets: <Sequence<u32> as CubeType>::ExpandType, k_offset: <u32 as CubeType>::ExpandType, ) -> <Im2colTmaReader<E> as CubeType>::ExpandType
pub fn __expand_update_view( scope: &mut Scope, this: <Self as CubeType>::ExpandType, k_offset: <u32 as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
Trait Implementations§
Source§impl<E: Numeric> CubeType for Im2colTmaReader<E>
impl<E: Numeric> CubeType for Im2colTmaReader<E>
type ExpandType = Im2colTmaReaderExpand<E>
Source§fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
Wrapper around the init method, necessary to type inference.
impl<E: Numeric> Send for Im2colTmaReader<E>
impl<E: Numeric> Sync for Im2colTmaReader<E>
Auto Trait Implementations§
impl<E> Freeze for Im2colTmaReader<E>
impl<E> RefUnwindSafe for Im2colTmaReader<E>where
E: RefUnwindSafe,
impl<E> Unpin for Im2colTmaReader<E>where
E: Unpin,
impl<E> UnwindSafe for Im2colTmaReader<E>where
E: 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