pub struct TensorOutput<EI: Numeric, EO: Numeric, GA: MatmulArgs> { /* private fields */ }
Expand description
Tensor output representation.
You can use the tensor output as if it was a pointer to the actually tensor.
§Warning
There is no mutability guarantee.
Implementations§
Source§impl<EI: Numeric, EO: Numeric, GA: MatmulArgs> TensorOutput<EI, EO, GA>
impl<EI: Numeric, EO: Numeric, GA: MatmulArgs> TensorOutput<EI, EO, GA>
Sourcepub fn new(state: &mut GA::State<EI, EO>) -> TensorOutput<EI, EO, GA>
pub fn new(state: &mut GA::State<EI, EO>) -> TensorOutput<EI, EO, GA>
Create a tensor output from the state.
Sourcepub fn write(&self, coordinate: u32, value: Line<EO>)
pub fn write(&self, coordinate: u32, value: Line<EO>)
Write the value to tensor at the given coordinate.
Sourcepub fn buffer_len(&self) -> u32
pub fn buffer_len(&self) -> u32
Get the buffer length of the tensor.
pub fn __expand_new( context: &mut Scope, state: <GA::State<EI, EO> as CubeType>::ExpandType, ) -> <TensorOutput<EI, EO, GA> as CubeType>::ExpandType
pub fn __expand_write( context: &mut Scope, this: <Self as CubeType>::ExpandType, coordinate: <u32 as CubeType>::ExpandType, value: <Line<EO> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
pub fn __expand_shape( context: &mut Scope, this: <Self as CubeType>::ExpandType, axis: <u32 as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
pub fn __expand_stride( context: &mut Scope, this: <Self as CubeType>::ExpandType, dim: <u32 as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
pub fn __expand_rank( context: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
pub fn __expand_len( context: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
pub fn __expand_buffer_len( context: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
Trait Implementations§
Source§impl<EI: Numeric, EO: Numeric, GA: MatmulArgs> Clone for TensorOutput<EI, EO, GA>
impl<EI: Numeric, EO: Numeric, GA: MatmulArgs> Clone for TensorOutput<EI, EO, GA>
Source§impl<EI: Numeric, EO: Numeric, GA: MatmulArgs> CubeType for TensorOutput<EI, EO, GA>
impl<EI: Numeric, EO: Numeric, GA: MatmulArgs> CubeType for TensorOutput<EI, EO, GA>
type ExpandType = TensorOutputExpand<EI, EO, GA>
Source§fn init(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
fn init(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
Wrapper around the init method, necessary to type inference.
Source§impl<EI: Numeric, EO: Numeric, MA: MatmulArgs> VirtualTensorOperations<EO> for TensorOutput<EI, EO, MA>
impl<EI: Numeric, EO: Numeric, MA: MatmulArgs> VirtualTensorOperations<EO> for TensorOutput<EI, EO, MA>
impl<EI: Numeric, EO: Numeric, GA: MatmulArgs> Copy for TensorOutput<EI, EO, GA>
Auto Trait Implementations§
impl<EI, EO, GA> Freeze for TensorOutput<EI, EO, GA>
impl<EI, EO, GA> RefUnwindSafe for TensorOutput<EI, EO, GA>
impl<EI, EO, GA> !Send for TensorOutput<EI, EO, GA>
impl<EI, EO, GA> !Sync for TensorOutput<EI, EO, GA>
impl<EI, EO, GA> Unpin for TensorOutput<EI, EO, GA>
impl<EI, EO, GA> UnwindSafe for TensorOutput<EI, EO, GA>
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