#[repr(C)]pub struct NdArrayVTable {
pub count: unsafe fn(PtrConst) -> usize,
pub n_dim: unsafe fn(PtrConst) -> usize,
pub dim: unsafe fn(PtrConst, usize) -> Option<usize>,
pub get: unsafe fn(PtrConst, usize) -> Option<PtrConst>,
pub get_mut: Option<unsafe fn(PtrMut, usize) -> Option<PtrMut>>,
pub byte_stride: Option<unsafe fn(PtrConst, usize) -> Option<isize>>,
pub as_ptr: Option<unsafe fn(PtrConst) -> PtrConst>,
pub as_mut_ptr: Option<unsafe fn(PtrMut) -> PtrMut>,
}Expand description
Virtual table for a n-dimensional array type (like Matrix<T>, Tensor<T>, etc.)
Fields§
§count: unsafe fn(PtrConst) -> usizecf. NdArrayCountFn
n_dim: unsafe fn(PtrConst) -> usizecf. NdArrayNDimFn
dim: unsafe fn(PtrConst, usize) -> Option<usize>cf. NdArrayDimFn
get: unsafe fn(PtrConst, usize) -> Option<PtrConst>cf. NdArrayGetFn
get_mut: Option<unsafe fn(PtrMut, usize) -> Option<PtrMut>>cf. NdArrayGetMutFn
Only available for mutable arrays
byte_stride: Option<unsafe fn(PtrConst, usize) -> Option<isize>>cf. NdArrayByteStrideFn
Only available for types that can be accessed as a strided array
as_ptr: Option<unsafe fn(PtrConst) -> PtrConst>cf. NdArrayAsPtrFn
Only available for types that can be accessed as a strided array
as_mut_ptr: Option<unsafe fn(PtrMut) -> PtrMut>cf. NdArrayAsMutPtrFn
Only available for types that can be accessed as a strided array
Trait Implementations§
Source§impl Clone for NdArrayVTable
impl Clone for NdArrayVTable
Source§fn clone(&self) -> NdArrayVTable
fn clone(&self) -> NdArrayVTable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NdArrayVTable
impl Debug for NdArrayVTable
impl Copy for NdArrayVTable
Auto Trait Implementations§
impl Freeze for NdArrayVTable
impl RefUnwindSafe for NdArrayVTable
impl Send for NdArrayVTable
impl Sync for NdArrayVTable
impl Unpin for NdArrayVTable
impl UnwindSafe for NdArrayVTable
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