pub struct TensorEntry {
pub name: String,
pub dtype: Dtype,
pub shape: Vec<usize>,
pub begin: usize,
pub end: usize,
}Expand description
Everything the directory declares about one tensor, plus its resolved absolute byte span.
Fields§
§name: StringTensor name as it appears in the directory.
dtype: DtypeStorage dtype.
shape: Vec<usize>Logical shape, outermost dimension first.
begin: usizeAbsolute start offset into the whole file.
end: usizeAbsolute end offset (exclusive) into the whole file.
Implementations§
Source§impl TensorEntry
impl TensorEntry
Sourcepub fn element_count(&self) -> usize
pub fn element_count(&self) -> usize
Total element count.
Trait Implementations§
Source§impl Clone for TensorEntry
impl Clone for TensorEntry
Source§fn clone(&self) -> TensorEntry
fn clone(&self) -> TensorEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TensorEntry
impl Debug for TensorEntry
impl Eq for TensorEntry
Source§impl PartialEq for TensorEntry
impl PartialEq for TensorEntry
impl StructuralPartialEq for TensorEntry
Auto Trait Implementations§
impl Freeze for TensorEntry
impl RefUnwindSafe for TensorEntry
impl Send for TensorEntry
impl Sync for TensorEntry
impl Unpin for TensorEntry
impl UnsafeUnpin for TensorEntry
impl UnwindSafe for TensorEntry
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