pub struct NdArray<T> { /* private fields */ }
Implementations§
Source§impl<T> NdArray<T>
impl<T> NdArray<T>
pub fn map(&self) -> Result<MappedMemory<'_, T>>
pub fn read<U: Clone>(&self, dst: &mut [U]) -> Result<()>
pub fn write<U: Clone>(&self, src: &[U]) -> Result<()>
pub fn to_vec<U: Clone + Default>(&self) -> Result<Vec<U>>
pub fn memory(&self) -> &Memory
pub fn shape(&self) -> &[u32]
pub fn elem_shape(&self) -> &[u32]
pub fn elem_count(&self) -> usize
pub fn scalar_count(&self) -> usize
pub fn elem_type(&self) -> TiDataType
pub fn ndarray(&self) -> &TiNdArray
Auto Trait Implementations§
impl<T> Freeze for NdArray<T>
impl<T> RefUnwindSafe for NdArray<T>where
T: RefUnwindSafe,
impl<T> !Send for NdArray<T>
impl<T> !Sync for NdArray<T>
impl<T> Unpin for NdArray<T>where
T: Unpin,
impl<T> UnwindSafe for NdArray<T>where
T: UnwindSafe,
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