Skip to main content

WhiteboxFragment

Struct WhiteboxFragment 

Source
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: WhiteboxFragmentLayout

Implementations§

Source§

impl<E: Numeric> WhiteboxFragment<E>

Source

pub fn new(layout: WhiteboxFragmentLayout) -> WhiteboxFragment<E>

Source

pub fn zero(&mut self)

Source

pub fn load_from_slice(&mut self, smem_slice: &Slice<E>)

Source

pub fn load_from_strided_tile<E2: Numeric, N: Size>( &mut self, strided_tile: &StridedTile<E2, N>, )

Source

pub fn store_to<F: Float>(&self, smem_slice: &mut SliceMut<F>)

Source

pub fn rowwise_scale(&mut self, scale: &RowWise<E>)

Source

pub fn rowwise_max(&self) -> RowWise<E>

Source

pub fn rowwise_sum(&self) -> RowWise<E>

Source

pub fn num_units_per_row(&self) -> u32

Source

pub fn scale_and_mask<M: Mask>(&mut self, scale: E, mask: &M)

Source

pub fn __expand_new( scope: &mut Scope, layout: WhiteboxFragmentLayout, ) -> <WhiteboxFragment<E> as CubeType>::ExpandType

Source

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

Source

pub fn __expand_load_from_slice( scope: &mut Scope, this: <Self as CubeType>::ExpandType, smem_slice: <Slice<E> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType

Source

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

Source

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

Source

pub fn __expand_rowwise_scale( scope: &mut Scope, this: <Self as CubeType>::ExpandType, scale: <RowWise<E> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType

Source

pub fn __expand_rowwise_max( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <RowWise<E> as CubeType>::ExpandType

Source

pub fn __expand_rowwise_sum( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <RowWise<E> as CubeType>::ExpandType

Source

pub fn __expand_num_units_per_row( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> u32

Source

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>

Source

pub fn exp_diff(&mut self, rowwise: &RowWise<E>)

Source

pub fn __expand_exp_diff( scope: &mut Scope, this: <Self as CubeType>::ExpandType, rowwise: <RowWise<E> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType

Trait Implementations§

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> 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> IntoComptime for T

Source§

fn comptime(self) -> Self

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.