pub struct TensorSet { /* private fields */ }Expand description
A named collection of tensors — the input or output side of an execute call.
Implementations§
Source§impl TensorSet
impl TensorSet
pub fn new() -> Result<Self, NeuronError>
Sourcepub unsafe fn add(
&mut self,
name: &CStr,
tensor: *mut c_void,
) -> Result<(), NeuronError>
pub unsafe fn add( &mut self, name: &CStr, tensor: *mut c_void, ) -> Result<(), NeuronError>
Add a pre-allocated nrt_tensor_t to this set under name.
Tensor lifetime is managed by the caller (or by the Neuron
runtime via nrt_tensor_allocate, which we don’t wrap yet).
§Safety
tensor must point to a valid nrt_tensor_t that outlives this set.
pub fn raw(&self) -> NrtTensorSetHandle
Trait Implementations§
Auto Trait Implementations§
impl !Send for TensorSet
impl !Sync for TensorSet
impl Freeze for TensorSet
impl RefUnwindSafe for TensorSet
impl Unpin for TensorSet
impl UnsafeUnpin for TensorSet
impl UnwindSafe for TensorSet
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