pub enum IntTensor {
U8(Tensor<u8>),
I32(Tensor<i32>),
U32(Tensor<u32>),
}Variants§
Implementations§
Source§impl IntTensor
impl IntTensor
pub fn id(&self) -> TensorId
pub fn shape(&self) -> &Shape
pub fn dtype(&self) -> DType
pub fn layout(&self) -> &Layout
pub fn dims(&self) -> &[usize]
pub fn dim<D: Dim>(&self, dim: D) -> Result<usize>
pub fn element_count(&self) -> usize
pub fn is_contiguous(&self) -> bool
pub fn rank(&self) -> usize
pub fn flatten_all(&self) -> Result<Self>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IntTensor
impl RefUnwindSafe for IntTensor
impl Send for IntTensor
impl Sync for IntTensor
impl Unpin for IntTensor
impl UnsafeUnpin for IntTensor
impl UnwindSafe for IntTensor
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