pub struct MachineLearningCommandEncoder(/* private fields */);Expand description
A command encoder for machine learning operations.
C++ equivalent: MTL4::MachineLearningCommandEncoder
Implementations§
Source§impl MachineLearningCommandEncoder
impl MachineLearningCommandEncoder
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a MachineLearningCommandEncoder from a raw pointer.
Sourcepub fn set_pipeline_state(&self, pipeline_state: &MachineLearningPipelineState)
pub fn set_pipeline_state(&self, pipeline_state: &MachineLearningPipelineState)
Set the pipeline state.
C++ equivalent: void setPipelineState(const MTL4::MachineLearningPipelineState*)
Sourcepub fn set_argument_table(&self, argument_table: &ArgumentTable)
pub fn set_argument_table(&self, argument_table: &ArgumentTable)
Set the argument table.
C++ equivalent: void setArgumentTable(const MTL4::ArgumentTable*)
Sourcepub fn dispatch_network(&self, intermediates_heap: &Heap)
pub fn dispatch_network(&self, intermediates_heap: &Heap)
Dispatch the neural network.
C++ equivalent: void dispatchNetwork(const MTL::Heap*)
Sourcepub fn end_encoding(&self)
pub fn end_encoding(&self)
End encoding.
C++ equivalent: void endEncoding()
Trait Implementations§
Source§impl Drop for MachineLearningCommandEncoder
impl Drop for MachineLearningCommandEncoder
Source§impl Referencing for MachineLearningCommandEncoder
impl Referencing for MachineLearningCommandEncoder
Source§fn as_mut_ptr(&self) -> *mut c_void
fn as_mut_ptr(&self) -> *mut c_void
Get the raw mutable pointer to the Objective-C object.
Source§fn retain(&self) -> Selfwhere
Self: Clone,
fn retain(&self) -> Selfwhere
Self: Clone,
Retain the object, incrementing its reference count. Read more
Source§fn autorelease(&self) -> Selfwhere
Self: Clone,
fn autorelease(&self) -> Selfwhere
Self: Clone,
Autorelease the object. Read more
Source§fn retain_count(&self) -> usize
fn retain_count(&self) -> usize
Get the retain count of the object. Read more
impl Send for MachineLearningCommandEncoder
impl Sync for MachineLearningCommandEncoder
Auto Trait Implementations§
impl Freeze for MachineLearningCommandEncoder
impl RefUnwindSafe for MachineLearningCommandEncoder
impl Unpin for MachineLearningCommandEncoder
impl UnwindSafe for MachineLearningCommandEncoder
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