Documentation
¶
Overview ¶
Package msl emits Metal Shading Language source from the compute IR. It is a printer: every name is synthesized from an IR index, every operator expression is parenthesized, and no Go is interpreted. The Metal runtime compiler compiles the output.
Index ¶
Constants ¶
const GroupWorkgroup = 128
GroupWorkgroup is a group entry's threadgroup width, the unit the Metal backend widens a group row in (GroupThreads).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntryPoint ¶
type EntryPoint struct {
Name string
Buffers []compile.BufferBinding
ParamsBinding int
DispatchBinding int
Workgroup [2]int
BufferLengths bool // extra binding after Dispatch, word counts by buffer index
}
EntryPoint describes one emitted entry point: its function name in the source, the buffer bindings in order, the binding of the params struct (-1 when the entry takes none) and of the dispatch record, and the workgroup size the host dispatches with.