Skip to main content

IndirectComputeCommand

Struct IndirectComputeCommand 

Source
pub struct IndirectComputeCommand(/* private fields */);
Expand description

A compute command within an indirect command buffer.

C++ equivalent: MTL::IndirectComputeCommand

Indirect compute commands can encode dispatch calls and state changes that will be executed when the indirect command buffer is executed.

Implementations§

Source§

impl IndirectComputeCommand

Source

pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>

Create from a raw pointer.

§Safety

The pointer must be a valid Metal indirect compute command.

Source

pub fn as_raw(&self) -> *mut c_void

Get the raw pointer.

Source

pub fn reset(&self)

Reset this command.

C++ equivalent: void reset()

Source

pub fn set_barrier(&self)

Set a barrier for this command.

C++ equivalent: void setBarrier()

Source

pub fn clear_barrier(&self)

Clear a barrier for this command.

C++ equivalent: void clearBarrier()

Source

pub fn set_compute_pipeline_state(&self, state: &ComputePipelineState)

Set the compute pipeline state.

C++ equivalent: void setComputePipelineState(const ComputePipelineState*)

Source

pub fn set_kernel_buffer( &self, buffer: &Buffer, offset: UInteger, index: UInteger, )

Set a kernel buffer.

C++ equivalent: void setKernelBuffer(const Buffer*, NS::UInteger offset, NS::UInteger index)

Source

pub fn set_kernel_buffer_with_stride( &self, buffer: &Buffer, offset: UInteger, stride: UInteger, index: UInteger, )

Set a kernel buffer with stride.

C++ equivalent: void setKernelBuffer(const Buffer*, NS::UInteger, NS::UInteger, NS::UInteger)

Source

pub fn set_threadgroup_memory_length(&self, length: UInteger, index: UInteger)

Set threadgroup memory length.

C++ equivalent: void setThreadgroupMemoryLength(NS::UInteger, NS::UInteger)

Source

pub fn set_stage_in_region(&self, region: Region)

Set the stage-in region.

C++ equivalent: void setStageInRegion(Region)

Source

pub fn set_imageblock_width(&self, width: UInteger, height: UInteger)

Set the imageblock dimensions.

C++ equivalent: void setImageblockWidth(NS::UInteger, NS::UInteger)

Source

pub fn concurrent_dispatch_threadgroups( &self, threadgroups_per_grid: Size, threads_per_threadgroup: Size, )

Dispatch threadgroups concurrently.

C++ equivalent: void concurrentDispatchThreadgroups(...)

Source

pub fn concurrent_dispatch_threads( &self, threads_per_grid: Size, threads_per_threadgroup: Size, )

Dispatch threads concurrently.

C++ equivalent: void concurrentDispatchThreads(...)

Trait Implementations§

Source§

impl Debug for IndirectComputeCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Referencing for IndirectComputeCommand

Source§

fn as_ptr(&self) -> *const c_void

Get the raw pointer to the Objective-C object.
Source§

fn as_mut_ptr(&self) -> *mut c_void

Get the raw mutable pointer to the Objective-C object.
Source§

fn release(&self)

Release the object, decrementing its reference count. Read more
Source§

fn retain_count(&self) -> usize

Get the retain count of the object. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.