pub struct MlxArrayVector(/* private fields */);Expand description
Temporary MLX vector that retains array handles for one aggregate operation.
Implementations§
Source§impl MlxArrayVector
impl MlxArrayVector
pub fn empty(operation: &'static str) -> Result<Self, MlxCError>
pub fn new(arrays: &[&MlxArray]) -> Result<Self, MlxCError>
pub const fn raw(&self) -> mlx_vector_array
pub fn raw_mut(&mut self) -> *mut mlx_vector_array
pub fn len(&self) -> usize
pub fn array_at( &self, output_index: usize, operation: &'static str, ) -> Result<MlxArray, MlxCError>
Sourcepub fn set(&mut self, source: &Self) -> Result<(), MlxCError>
pub fn set(&mut self, source: &Self) -> Result<(), MlxCError>
Copies the source vector handle into this handle.
Sourcepub fn from_array(array: &MlxArray) -> Result<Self, MlxCError>
pub fn from_array(array: &MlxArray) -> Result<Self, MlxCError>
Creates an owned vector holding one copied array handle.
Sourcepub fn set_arrays(&mut self, arrays: &[MlxArray]) -> Result<(), MlxCError>
pub fn set_arrays(&mut self, arrays: &[MlxArray]) -> Result<(), MlxCError>
Replaces the vector contents with copies of the provided arrays.
Sourcepub fn set_one(&mut self, array: &MlxArray) -> Result<(), MlxCError>
pub fn set_one(&mut self, array: &MlxArray) -> Result<(), MlxCError>
Replaces the vector contents with one copied array handle.
Trait Implementations§
Source§impl Debug for MlxArrayVector
impl Debug for MlxArrayVector
Source§impl Drop for MlxArrayVector
impl Drop for MlxArrayVector
Auto Trait Implementations§
impl !Send for MlxArrayVector
impl !Sync for MlxArrayVector
impl Freeze for MlxArrayVector
impl RefUnwindSafe for MlxArrayVector
impl Unpin for MlxArrayVector
impl UnsafeUnpin for MlxArrayVector
impl UnwindSafe for MlxArrayVector
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