pub struct MlxVectorInt(/* private fields */);Expand description
Owned MLX integer vector handle released exactly once through the C API.
Implementations§
Source§impl MlxVectorInt
impl MlxVectorInt
Sourcepub fn from_values(values: &[i32]) -> Result<Self, MlxCError>
pub fn from_values(values: &[i32]) -> Result<Self, MlxCError>
Creates an owned vector holding copies of the provided values.
Sourcepub fn from_value(value: i32) -> Result<Self, MlxCError>
pub fn from_value(value: i32) -> Result<Self, MlxCError>
Creates an owned vector holding one copied value.
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 set_values(&mut self, values: &[i32]) -> Result<(), MlxCError>
pub fn set_values(&mut self, values: &[i32]) -> Result<(), MlxCError>
Replaces the vector contents with copies of the provided values.
Sourcepub fn set_one(&mut self, value: i32) -> Result<(), MlxCError>
pub fn set_one(&mut self, value: i32) -> Result<(), MlxCError>
Replaces the vector contents with one copied value.
Trait Implementations§
Source§impl Debug for MlxVectorInt
impl Debug for MlxVectorInt
Source§impl Drop for MlxVectorInt
impl Drop for MlxVectorInt
Auto Trait Implementations§
impl !Send for MlxVectorInt
impl !Sync for MlxVectorInt
impl Freeze for MlxVectorInt
impl RefUnwindSafe for MlxVectorInt
impl Unpin for MlxVectorInt
impl UnsafeUnpin for MlxVectorInt
impl UnwindSafe for MlxVectorInt
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