Enum ort::tensor::TensorData
source · pub enum TensorData<'t, T, D>where
D: Dimension,{
TensorPtr {
ptr: *mut OrtValue,
array_view: ArrayView<'t, T, D>,
},
Strings {
strings: Array<T, D>,
},
}
Expand description
Represents the possible ways tensor data can be accessed.
This should only be used internally.
Variants§
TensorPtr
Fields
Data residing in ONNX Runtime’s tensor, in which case the 't
lifetime is what makes this valid.
This is used for data types whose in-memory form from ONNX Runtime is compatible with Rust’s, like
primitive numeric types.
Strings
String data is output differently by ONNX, and is of course also variable size, so it cannot use the same simple pointer representation.
Trait Implementations§
Auto Trait Implementations§
impl<'t, T, D> RefUnwindSafe for TensorData<'t, T, D>where D: RefUnwindSafe, T: RefUnwindSafe,
impl<'t, T, D> !Send for TensorData<'t, T, D>
impl<'t, T, D> !Sync for TensorData<'t, T, D>
impl<'t, T, D> Unpin for TensorData<'t, T, D>where D: Unpin,
impl<'t, T, D> UnwindSafe for TensorData<'t, T, D>where D: UnwindSafe, T: RefUnwindSafe,
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