pub struct Tensor { /* private fields */ }Implementations§
Source§impl Tensor
impl Tensor
pub fn with_id(self, id: impl Into<String>) -> Self
pub fn set_id(&mut self, id: impl Into<String>)
pub fn id(&self) -> Option<&str>
Sourcepub fn num_bytes(&self) -> usize
pub fn num_bytes(&self) -> usize
Return the number of bytes this entire Tensor will consume in memory.
This currently assumes it is optimally packed into memory bytes
pub fn dtype(&self) -> &DataType
pub fn addr(&self) -> u64
pub fn set_addr(&mut self, addr: u64)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tensor
impl RefUnwindSafe for Tensor
impl Send for Tensor
impl Sync for Tensor
impl Unpin for Tensor
impl UnsafeUnpin for Tensor
impl UnwindSafe for Tensor
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