pub struct MlxImportedFunction(/* private fields */);Expand description
Owned MLX imported function released exactly once.
Implementations§
Source§impl MlxImportedFunction
impl MlxImportedFunction
Sourcepub fn load(path: &str) -> Result<Self, MlxCError>
pub fn load(path: &str) -> Result<Self, MlxCError>
Loads a previously exported MLX function file.
§Errors
Returns the captured MLX-C description when loading fails.
Sourcepub fn apply(
&self,
arguments: &MlxArrayVector,
) -> Result<MlxArrayVector, MlxCError>
pub fn apply( &self, arguments: &MlxArrayVector, ) -> Result<MlxArrayVector, MlxCError>
Applies the imported function to the arguments.
§Errors
Returns the captured MLX-C description when application fails.
Sourcepub fn apply_with_keywords(
&self,
arguments: &MlxArrayVector,
keyword_arguments: &MlxMapStringToArray,
) -> Result<MlxArrayVector, MlxCError>
pub fn apply_with_keywords( &self, arguments: &MlxArrayVector, keyword_arguments: &MlxMapStringToArray, ) -> Result<MlxArrayVector, MlxCError>
Applies the imported function to the arguments and keywords.
§Errors
Returns the captured MLX-C description when application fails.
Trait Implementations§
Source§impl Debug for MlxImportedFunction
impl Debug for MlxImportedFunction
Source§impl Drop for MlxImportedFunction
impl Drop for MlxImportedFunction
Auto Trait Implementations§
impl !Send for MlxImportedFunction
impl !Sync for MlxImportedFunction
impl Freeze for MlxImportedFunction
impl RefUnwindSafe for MlxImportedFunction
impl Unpin for MlxImportedFunction
impl UnsafeUnpin for MlxImportedFunction
impl UnwindSafe for MlxImportedFunction
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