pub struct Tensor<'s> { /* private fields */ }
Implementations§
Source§impl<'s> Tensor<'s>
impl<'s> Tensor<'s>
pub fn new_empty(name: &'s str) -> Self
pub fn is_dense(&self) -> bool
pub fn is_same_layout(&self, other: &Self) -> bool
pub fn nnz(&self) -> usize
pub fn new( name: &'s str, elmts: Vec<TensorBlock<'s>>, layout: ArcLayout, indices: Vec<char>, ) -> Self
pub fn new_no_layout( name: &'s str, elmts: Vec<TensorBlock<'s>>, indices: Vec<char>, ) -> Self
pub fn rank(&self) -> usize
pub fn shape(&self) -> &Shape
pub fn name(&self) -> &str
pub fn elmts(&self) -> &[TensorBlock<'s>]
pub fn indices(&self) -> &[char]
pub fn layout_ptr(&self) -> &ArcLayout
pub fn layout(&self) -> &Layout
pub fn set_name(&mut self, name: &'s str)
Trait Implementations§
Auto Trait Implementations§
impl<'s> Freeze for Tensor<'s>
impl<'s> RefUnwindSafe for Tensor<'s>
impl<'s> Send for Tensor<'s>
impl<'s> Sync for Tensor<'s>
impl<'s> Unpin for Tensor<'s>
impl<'s> UnwindSafe for Tensor<'s>
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