MTL4MachineLearningPipelineState

Trait MTL4MachineLearningPipelineState 

Source
pub unsafe trait MTL4MachineLearningPipelineState:
    MTLAllocation
    + NSObjectProtocol
    + Send
    + Sync {
    // Provided methods
    fn label(&self) -> Option<Retained<NSString>>
       where Self: Sized + Message { ... }
    fn device(&self) -> Retained<ProtocolObject<dyn MTLDevice>>
       where Self: Sized + Message { ... }
    fn reflection(
        &self,
    ) -> Option<Retained<MTL4MachineLearningPipelineReflection>>
       where Self: Sized + Message { ... }
    fn intermediatesHeapSize(&self) -> NSUInteger
       where Self: Sized + Message { ... }
}
Available on crate features MTL4MachineLearningPipeline and MTLAllocation only.
Expand description

A pipeline state that you can use with machine-learning encoder instances.

See MTL4MachineLearningCommandEncoder for more information.

See also Apple’s documentation

Provided Methods§

Source

fn label(&self) -> Option<Retained<NSString>>
where Self: Sized + Message,

Queries the string that helps identify this object.

Source

fn device(&self) -> Retained<ProtocolObject<dyn MTLDevice>>
where Self: Sized + Message,

Available on crate feature MTLDevice only.

Returns the device the pipeline state belongs to.

Source

fn reflection(&self) -> Option<Retained<MTL4MachineLearningPipelineReflection>>
where Self: Sized + Message,

Returns reflection information for this machine learning pipeline state.

Source

fn intermediatesHeapSize(&self) -> NSUInteger
where Self: Sized + Message,

Obtain the size of the heap, in bytes, this pipeline requires during the execution.

Use this value to allocate a MTLHeap instance of sufficient size that you can then provide to MTL4MachineLearningCommandEncoder/dispatchNetworkWithIntermediatesHeap:.

Metal uses this heap to store intermediate data as it executes the pipeline. It is your responsibility to provide a heap at least as large as this property requests.

Trait Implementations§

Source§

impl ProtocolType for dyn MTL4MachineLearningPipelineState

Source§

const NAME: &'static str = "MTL4MachineLearningPipelineState"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn MTL4MachineLearningPipelineState

Implementations on Foreign Types§

Source§

impl<T> MTL4MachineLearningPipelineState for ProtocolObject<T>

Implementors§