pub struct WhiteboxFragment<E: Numeric> {
pub array: Array<E>,
pub layout: WhiteboxFragmentLayout,
}Expand description
Assumes:
- unit_size * plane_dim = total_size (not dim wise but in total count)
Fields§
§array: Array<E>§layout: WhiteboxFragmentLayoutImplementations§
Source§impl<E: Numeric> WhiteboxFragment<E>
impl<E: Numeric> WhiteboxFragment<E>
pub fn new(layout: WhiteboxFragmentLayout) -> WhiteboxFragment<E>
pub fn zero(&mut self)
pub fn load_from_slice(&mut self, smem_slice: &Slice<E>)
pub fn load_from_strided_tile<E2: Numeric, N: Size>( &mut self, strided_tile: &StridedTile<E2, N>, )
pub fn store_to<F: Float>(&self, smem_slice: &mut SliceMut<F>)
pub fn rowwise_scale(&mut self, scale: &RowWise<E>)
pub fn rowwise_max(&self) -> RowWise<E>
pub fn rowwise_sum(&self) -> RowWise<E>
pub fn num_units_per_row(&self) -> u32
pub fn scale_and_mask<M: Mask>(&mut self, scale: E, mask: &M)
pub fn __expand_new( scope: &mut Scope, layout: WhiteboxFragmentLayout, ) -> <WhiteboxFragment<E> as CubeType>::ExpandType
pub fn __expand_zero( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
pub fn __expand_load_from_slice( scope: &mut Scope, this: <Self as CubeType>::ExpandType, smem_slice: <Slice<E> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
pub fn __expand_load_from_strided_tile<E2: Numeric, N: Size>( scope: &mut Scope, this: <Self as CubeType>::ExpandType, strided_tile: <StridedTile<E2, N> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
pub fn __expand_store_to<F: Float>( scope: &mut Scope, this: <Self as CubeType>::ExpandType, smem_slice: <SliceMut<F> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
pub fn __expand_rowwise_scale( scope: &mut Scope, this: <Self as CubeType>::ExpandType, scale: <RowWise<E> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
pub fn __expand_rowwise_max( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <RowWise<E> as CubeType>::ExpandType
pub fn __expand_rowwise_sum( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <RowWise<E> as CubeType>::ExpandType
pub fn __expand_num_units_per_row( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> u32
pub fn __expand_scale_and_mask<M: Mask>( scope: &mut Scope, this: <Self as CubeType>::ExpandType, scale: <E as CubeType>::ExpandType, mask: <M as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
Source§impl<E: Float> WhiteboxFragment<E>
impl<E: Float> WhiteboxFragment<E>
pub fn exp_diff(&mut self, rowwise: &RowWise<E>)
pub fn __expand_exp_diff( scope: &mut Scope, this: <Self as CubeType>::ExpandType, rowwise: <RowWise<E> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
Trait Implementations§
Source§impl<E: Numeric> CubeType for WhiteboxFragment<E>
impl<E: Numeric> CubeType for WhiteboxFragment<E>
type ExpandType = WhiteboxFragmentExpand<E>
Auto Trait Implementations§
impl<E> Freeze for WhiteboxFragment<E>
impl<E> RefUnwindSafe for WhiteboxFragment<E>where
E: RefUnwindSafe,
impl<E> Send for WhiteboxFragment<E>
impl<E> Sync for WhiteboxFragment<E>
impl<E> Unpin for WhiteboxFragment<E>where
E: Unpin,
impl<E> UnsafeUnpin for WhiteboxFragment<E>
impl<E> UnwindSafe for WhiteboxFragment<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