Module Metal.ComputeCommandEncoder

Encodes compute commands. See MTLComputeCommandEncoder.

type t
val sexp_of_t : t -> Sexplib0.Sexp.t
val set_label : t -> string -> unit
val get_label : t -> string
val get_device : t -> Device.t
module DispatchType : sig ... end

Possible ways to dispatch commands within an encoder. See MTLDispatchType.

val on_buffer : CommandBuffer.t -> t
val on_buffer_with_dispatch_type : CommandBuffer.t -> DispatchType.t -> t
val end_encoding : t -> unit
val insert_debug_signpost : t -> string -> unit
val push_debug_group : t -> string -> unit
val pop_debug_group : t -> unit
val set_compute_pipeline_state : t -> ComputePipelineState.t -> unit
val set_buffer : t -> ?offset:int -> index:int -> Buffer.t -> unit

Sets a buffer argument for the compute function.

val set_buffers : t -> offsets:int list -> index:int -> Buffer.t list -> unit

Sets multiple buffer arguments. The offsets length must match the number of buffers.

val set_bytes : t -> bytes:unit Ctypes.ptr -> length:int -> index:int -> unit

Sets inline constant data as a buffer argument.

val set_threadgroup_memory_length : t -> length:int -> index:int -> unit

Sets the length of a threadgroup memory argument.

val dispatch_threadgroups : t -> threadgroups_per_grid:Size.t -> threads_per_threadgroup:Size.t -> unit

Dispatches threadgroups for execution.

val use_resource : t -> Resource.t -> ResourceUsage.t -> unit

Declares that a resource will be used by the following commands.

val use_resources : t -> Resource.t list -> ResourceUsage.t -> unit

Declares that multiple resources will be used by the following commands.

val execute_commands_in_buffer : t -> IndirectCommandBuffer.t -> Range.t -> unit