# new builtins: @workItemId, @workGroupId, @workGroupSize · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/3357c59cebacb6b60da865376b20d2b307d12ec1)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 3357c59cebacb6b60da865376b20d2b307d12ec1

Requested commit: 3357c59cebacb6b60da865376b20d2b307d12ec1

Commit: 3357c59cebacb6b60da865376b20d2b307d12ec1

Tree: 51edbb19a1f063888bac386c6a51ba250e361b11

Author: Robin Voetter

Committer: Veikka Tuominen

## Message

```
new builtins: @workItemId, @workGroupId, @workGroupSize

* @workItemId returns the index of the work item in a work group for a
  dimension.
* @workGroupId returns the index of the work group in the kernel dispatch for a
  dimension.
* @workGroupSize returns the size of the work group for a dimension.

These builtins are mainly useful for GPU backends. They are currently only
implemented for the AMDGCN LLVM backend.

```

## Parents

- [83051b0cbf31b76e824d3911a7f4a0be3c0cf94d](https://git.cafe/gitcafe/zig/commit/83051b0cbf31b76e824d3911a7f4a0be3c0cf94d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/3357c59cebacb6b60da865376b20d2b307d12ec1?format=markdown)
