pub struct TensorInput<EI: Numeric, EO: Numeric, GA: MatmulArgs> { /* private fields */ }
Expand description
Tensor input representation.
You can use the tensor input as if it was a pointer to the actually tensor.
Implementations§
Source§impl<EI: Numeric, EO: Numeric, MA: MatmulArgs> TensorInput<EI, EO, MA>
impl<EI: Numeric, EO: Numeric, MA: MatmulArgs> TensorInput<EI, EO, MA>
Sourcepub fn new(
state: &MA::State<EI, EO>,
ident: TensorInputIdent,
) -> TensorInput<EI, EO, MA>
pub fn new( state: &MA::State<EI, EO>, ident: TensorInputIdent, ) -> TensorInput<EI, EO, MA>
Create a tensor input from the state and the ident.
pub fn read_window(&self, start: u32, end: u32) -> Slice<Line<EI>>
Sourcepub fn buffer_len(&self) -> u32
pub fn buffer_len(&self) -> u32
Get the buffer length of the tensor.
Sourcepub fn as_tensor_map(&self) -> TensorMap<EI>
pub fn as_tensor_map(&self) -> TensorMap<EI>
Get the buffer length of the tensor.
pub fn __expand_new( context: &mut Scope, state: <MA::State<EI, EO> as CubeType>::ExpandType, ident: TensorInputIdent, ) -> <TensorInput<EI, EO, MA> as CubeType>::ExpandType
pub fn __expand_read_window( context: &mut Scope, this: <Self as CubeType>::ExpandType, start: <u32 as CubeType>::ExpandType, end: <u32 as CubeType>::ExpandType, ) -> <Slice<Line<EI>> as CubeType>::ExpandType
pub fn __expand_read( context: &mut Scope, this: <Self as CubeType>::ExpandType, coordinate: <u32 as CubeType>::ExpandType, ) -> <Line<EI> 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, axis: <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
pub fn __expand_as_tensor_map( context: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <TensorMap<EI> as CubeType>::ExpandType
Trait Implementations§
Source§impl<EI: Numeric, EO: Numeric, GA: MatmulArgs> Clone for TensorInput<EI, EO, GA>
impl<EI: Numeric, EO: Numeric, GA: MatmulArgs> Clone for TensorInput<EI, EO, GA>
Source§impl<EI: Numeric, EO: Numeric, GA: MatmulArgs> CubeType for TensorInput<EI, EO, GA>
impl<EI: Numeric, EO: Numeric, GA: MatmulArgs> CubeType for TensorInput<EI, EO, GA>
type ExpandType = TensorInputExpand<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<EI> for TensorInput<EI, EO, MA>
impl<EI: Numeric, EO: Numeric, MA: MatmulArgs> VirtualTensorOperations<EI> for TensorInput<EI, EO, MA>
impl<EI: Numeric, EO: Numeric, GA: MatmulArgs> Copy for TensorInput<EI, EO, GA>
Auto Trait Implementations§
impl<EI, EO, GA> Freeze for TensorInput<EI, EO, GA>
impl<EI, EO, GA> RefUnwindSafe for TensorInput<EI, EO, GA>
impl<EI, EO, GA> !Send for TensorInput<EI, EO, GA>
impl<EI, EO, GA> !Sync for TensorInput<EI, EO, GA>
impl<EI, EO, GA> Unpin for TensorInput<EI, EO, GA>
impl<EI, EO, GA> UnwindSafe for TensorInput<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