Skip to main content

UnitTile

Struct UnitTile 

Source
pub struct UnitTile<E: Numeric> {
    pub data: Array<E>,
    pub layout: UnitTileLayout,
}

Fields§

§data: Array<E>§layout: UnitTileLayout

Implementations§

Source§

impl<E: Numeric> UnitTile<E>

Source

pub fn new(layout: UnitTileLayout) -> UnitTile<E>

Source

pub fn zero(&mut self)

Source

pub fn get(&self, row: u32, col: u32) -> E

Source

pub fn accumulate(&mut self, row: u32, col: u32, val: E)

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 copy_from<E2: Numeric>(&mut self, other: &UnitTile<E2>)

Source

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

Source

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

Source

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

Source

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

Source

pub fn __expand_get( scope: &mut Scope, this: <Self as CubeType>::ExpandType, row: <u32 as CubeType>::ExpandType, col: <u32 as CubeType>::ExpandType, ) -> <E as CubeType>::ExpandType

Source

pub fn __expand_accumulate( scope: &mut Scope, this: <Self as CubeType>::ExpandType, row: <u32 as CubeType>::ExpandType, col: <u32 as CubeType>::ExpandType, val: <E 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_copy_from<E2: Numeric>( scope: &mut Scope, this: <Self as CubeType>::ExpandType, other: <UnitTile<E2> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType

Source

pub fn __expand_load_from_strided_tile<E2: Numeric, ES: Size>( scope: &mut Scope, this: <Self as CubeType>::ExpandType, tile: <StridedTile<E2, ES> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType

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> UnitTile<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 UnitTile<E>

§

impl<E> RefUnwindSafe for UnitTile<E>
where E: RefUnwindSafe,

§

impl<E> Send for UnitTile<E>

§

impl<E> Sync for UnitTile<E>

§

impl<E> Unpin for UnitTile<E>
where E: Unpin,

§

impl<E> UnsafeUnpin for UnitTile<E>

§

impl<E> UnwindSafe for UnitTile<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.