Trait hotg_rune_core::TensorListMut
source · [−]pub trait TensorListMut {
type MutElementPtrBuffer: AsMut<[*mut u8]>;
fn new_tensors(shape: &[Shape<'_>]) -> Self;
fn element_ptr_mut(&mut self) -> Self::MutElementPtrBuffer;
}
Expand description
A set of tensors that can be mutated.
Associated Types
Required methods
fn new_tensors(shape: &[Shape<'_>]) -> Self
fn new_tensors(shape: &[Shape<'_>]) -> Self
Create a new set of empty tensors with the specified shape.
Panics
This will panic if the shape doesn’t match this TensorListMut
because there are a different number of tensors or one of the tensors
is the wrong type.
fn element_ptr_mut(&mut self) -> Self::MutElementPtrBuffer
fn element_ptr_mut(&mut self) -> Self::MutElementPtrBuffer
Get a set of mutable pointers into each tensor’s backing buffer.