workgroupShapeOf
On this page

workgroupShapeOf()

Function in IR

The workgroup shape of a compute entry: the structured workgroupShape field first, then [workgroupSize, 1, 1], then the extents of the @workgroup_size(x, y, z) attribute string; undefined when none is present.

import { workgroupShapeOf } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

const workgroupShapeOf: (
f: Pick<FuncDecl, "workgroupSize" | "workgroupShape" | "attrs">,
) => WorkgroupShape | undefined

Parameters

f Pick<FuncDecl, 'workgroupSize' | 'workgroupShape' | 'attrs'>

Return value

WorkgroupShape | undefined

Description

Every consumer that sizes a grid (the CPU dispatch, reflect, a runner) reads this, so the three extents have one source.

See also

Source

src/core/ir/nodes.ts, line 921, at commit 26de7be8

Edit this page Report a problem