pub struct VectorDescriptor {
pub length: usize,
pub vectors: usize,
pub vector_bytes: usize,
pub data_type: u32,
}Expand description
Plain-Rust configuration for MPSVectorDescriptor.
Fields§
§length: usize§vectors: usize§vector_bytes: usize§data_type: u32Implementations§
Source§impl VectorDescriptor
impl VectorDescriptor
Sourcepub const fn with_stride(
length: usize,
vectors: usize,
vector_bytes: usize,
data_type: u32,
) -> Self
pub const fn with_stride( length: usize, vectors: usize, vector_bytes: usize, data_type: u32, ) -> Self
Construct a vector descriptor with an explicit stride.
Sourcepub fn contiguous(length: usize, data_type: u32) -> Option<Self>
pub fn contiguous(length: usize, data_type: u32) -> Option<Self>
Construct a contiguous vector descriptor for a supported data type.
Sourcepub fn recommended_vector_bytes(length: usize, data_type: u32) -> usize
pub fn recommended_vector_bytes(length: usize, data_type: u32) -> usize
Query MPS’s recommended vector stride for a vector length.
Trait Implementations§
Source§impl Clone for VectorDescriptor
impl Clone for VectorDescriptor
Source§fn clone(&self) -> VectorDescriptor
fn clone(&self) -> VectorDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 VectorDescriptor
impl Debug for VectorDescriptor
impl Copy for VectorDescriptor
Auto Trait Implementations§
impl Freeze for VectorDescriptor
impl RefUnwindSafe for VectorDescriptor
impl Send for VectorDescriptor
impl Sync for VectorDescriptor
impl Unpin for VectorDescriptor
impl UnsafeUnpin for VectorDescriptor
impl UnwindSafe for VectorDescriptor
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