pub enum Storage {
View {
buffer_ref: StorageRef,
view_ref: StorageRef,
},
Owned {
buffer_ref: StorageRef,
},
}Expand description
A reference to a tensor storage.
Variants§
View
When a tensor is a partial view of another tensor.
Fields
§
buffer_ref: StorageRefStorage reference for the whole buffer.
§
view_ref: StorageRefStorage reference for the partial buffer.
Owned
When a tensor use all of its buffer.
Fields
§
buffer_ref: StorageRefStorage reference for the whole buffer.
Implementations§
Source§impl Storage
impl Storage
Sourcepub fn buffer_ref(&self) -> &StorageRef
pub fn buffer_ref(&self) -> &StorageRef
Get the whole buffer reference.
Trait Implementations§
impl StructuralPartialEq for Storage
Auto Trait Implementations§
impl Freeze for Storage
impl RefUnwindSafe for Storage
impl !Send for Storage
impl !Sync for Storage
impl Unpin for Storage
impl UnwindSafe for Storage
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