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§
Sourcefn label(&self) -> Option<Retained<NSString>>
fn label(&self) -> Option<Retained<NSString>>
Queries the string that helps identify this object.
Sourcefn device(&self) -> Retained<ProtocolObject<dyn MTLDevice>>
Available on crate feature MTLDevice only.
fn device(&self) -> Retained<ProtocolObject<dyn MTLDevice>>
MTLDevice only.Returns the device the pipeline state belongs to.
Sourcefn reflection(&self) -> Option<Retained<MTL4MachineLearningPipelineReflection>>
fn reflection(&self) -> Option<Retained<MTL4MachineLearningPipelineReflection>>
Returns reflection information for this machine learning pipeline state.
Sourcefn intermediatesHeapSize(&self) -> NSUInteger
fn intermediatesHeapSize(&self) -> NSUInteger
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.