pub struct MlxFunctionExporter(/* private fields */);Expand description
Owned MLX function exporter released exactly once.
Implementations§
Source§impl MlxFunctionExporter
impl MlxFunctionExporter
Sourcepub fn new(
path: &str,
function: &MlxClosure,
shapeless: bool,
) -> Result<Self, MlxCError>
pub fn new( path: &str, function: &MlxClosure, shapeless: bool, ) -> Result<Self, MlxCError>
Builds an exporter that writes new function versions into the file.
§Errors
Returns the captured MLX-C description when creation fails.
Sourcepub fn apply(&self, arguments: &MlxArrayVector) -> Result<(), MlxCError>
pub fn apply(&self, arguments: &MlxArrayVector) -> Result<(), MlxCError>
Writes one compiled specialization for the arguments.
§Errors
Returns the captured MLX-C description when the specialization fails.
Sourcepub fn apply_with_keywords(
&self,
arguments: &MlxArrayVector,
keyword_arguments: &MlxMapStringToArray,
) -> Result<(), MlxCError>
pub fn apply_with_keywords( &self, arguments: &MlxArrayVector, keyword_arguments: &MlxMapStringToArray, ) -> Result<(), MlxCError>
Writes one compiled specialization for the arguments and keywords.
§Errors
Returns the captured MLX-C description when the specialization fails.
Trait Implementations§
Source§impl Debug for MlxFunctionExporter
impl Debug for MlxFunctionExporter
Source§impl Drop for MlxFunctionExporter
impl Drop for MlxFunctionExporter
Auto Trait Implementations§
impl !Send for MlxFunctionExporter
impl !Sync for MlxFunctionExporter
impl Freeze for MlxFunctionExporter
impl RefUnwindSafe for MlxFunctionExporter
impl Unpin for MlxFunctionExporter
impl UnsafeUnpin for MlxFunctionExporter
impl UnwindSafe for MlxFunctionExporter
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