pub struct ComputePipelineDescriptor(/* private fields */);Expand description
Descriptor for MTL4 compute pipelines.
C++ equivalent: MTL4::ComputePipelineDescriptor
ComputePipelineDescriptor configures the compute function and threadgroup settings for a compute pipeline.
Implementations§
Source§impl ComputePipelineDescriptor
impl ComputePipelineDescriptor
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a ComputePipelineDescriptor from a raw pointer.
Sourcepub fn set_label(&self, label: &str)
pub fn set_label(&self, label: &str)
Set the label.
C++ equivalent: void setLabel(const NS::String*)
Sourcepub fn options(&self) -> Option<PipelineOptions>
pub fn options(&self) -> Option<PipelineOptions>
Get the pipeline options.
C++ equivalent: PipelineOptions* options() const
Sourcepub fn set_options(&self, options: &PipelineOptions)
pub fn set_options(&self, options: &PipelineOptions)
Set the pipeline options.
C++ equivalent: void setOptions(const MTL4::PipelineOptions*)
Sourcepub fn compute_function_descriptor(&self) -> Option<FunctionDescriptor>
pub fn compute_function_descriptor(&self) -> Option<FunctionDescriptor>
Get the compute function descriptor.
C++ equivalent: FunctionDescriptor* computeFunctionDescriptor() const
Sourcepub fn set_compute_function_descriptor(&self, descriptor: &FunctionDescriptor)
pub fn set_compute_function_descriptor(&self, descriptor: &FunctionDescriptor)
Set the compute function descriptor.
C++ equivalent: void setComputeFunctionDescriptor(const MTL4::FunctionDescriptor*)
Sourcepub fn max_total_threads_per_threadgroup(&self) -> UInteger
pub fn max_total_threads_per_threadgroup(&self) -> UInteger
Get the maximum total threads per threadgroup.
C++ equivalent: NS::UInteger maxTotalThreadsPerThreadgroup() const
Sourcepub fn set_max_total_threads_per_threadgroup(&self, max_threads: UInteger)
pub fn set_max_total_threads_per_threadgroup(&self, max_threads: UInteger)
Set the maximum total threads per threadgroup.
C++ equivalent: void setMaxTotalThreadsPerThreadgroup(NS::UInteger)
Sourcepub fn required_threads_per_threadgroup(&self) -> Size
pub fn required_threads_per_threadgroup(&self) -> Size
Get the required threads per threadgroup.
C++ equivalent: MTL::Size requiredThreadsPerThreadgroup() const
Sourcepub fn set_required_threads_per_threadgroup(&self, size: Size)
pub fn set_required_threads_per_threadgroup(&self, size: Size)
Set the required threads per threadgroup.
C++ equivalent: void setRequiredThreadsPerThreadgroup(MTL::Size)
Sourcepub fn static_linking_descriptor(&self) -> Option<StaticLinkingDescriptor>
pub fn static_linking_descriptor(&self) -> Option<StaticLinkingDescriptor>
Get the static linking descriptor.
C++ equivalent: StaticLinkingDescriptor* staticLinkingDescriptor() const
Sourcepub fn set_static_linking_descriptor(
&self,
descriptor: &StaticLinkingDescriptor,
)
pub fn set_static_linking_descriptor( &self, descriptor: &StaticLinkingDescriptor, )
Set the static linking descriptor.
C++ equivalent: void setStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor*)
Sourcepub fn support_binary_linking(&self) -> bool
pub fn support_binary_linking(&self) -> bool
Get whether binary linking is supported.
C++ equivalent: bool supportBinaryLinking() const
Sourcepub fn set_support_binary_linking(&self, support: bool)
pub fn set_support_binary_linking(&self, support: bool)
Set whether binary linking is supported.
C++ equivalent: void setSupportBinaryLinking(bool)
Sourcepub fn support_indirect_command_buffers(
&self,
) -> IndirectCommandBufferSupportState
pub fn support_indirect_command_buffers( &self, ) -> IndirectCommandBufferSupportState
Get the indirect command buffer support state.
C++ equivalent: IndirectCommandBufferSupportState supportIndirectCommandBuffers() const
Sourcepub fn set_support_indirect_command_buffers(
&self,
state: IndirectCommandBufferSupportState,
)
pub fn set_support_indirect_command_buffers( &self, state: IndirectCommandBufferSupportState, )
Set the indirect command buffer support state.
C++ equivalent: void setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState)
Sourcepub fn thread_group_size_is_multiple_of_thread_execution_width(&self) -> bool
pub fn thread_group_size_is_multiple_of_thread_execution_width(&self) -> bool
Get whether threadgroup size is a multiple of thread execution width.
C++ equivalent: bool threadGroupSizeIsMultipleOfThreadExecutionWidth() const
Sourcepub fn set_thread_group_size_is_multiple_of_thread_execution_width(
&self,
value: bool,
)
pub fn set_thread_group_size_is_multiple_of_thread_execution_width( &self, value: bool, )
Set whether threadgroup size is a multiple of thread execution width.
C++ equivalent: void setThreadGroupSizeIsMultipleOfThreadExecutionWidth(bool)