KhronosGroup / KhronosGroup/OpenCL-Docs

Complicated Wording in OpenCL C Specification

Open
#1,432 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
420
Forks
131
Avg merge
5d 13h
Merged PRs (30d)
11

Description

The OpenCL C Unified Specification says this for `sub_group_clustered_rotate`:

`Returns value for the work item with sub-group local ID equal to the sum of, the remainder of the division of the sum of this work item’s ID within the cluster and delta by clustersize, and the sub-group local ID of the first work-item of the cluster to which the work-item executing the function belongs.`

I feel like this is unnecessarily complicated and can probably made more readable, maybe adding a formula along side:

`(((get_sub_group_local_id() % *clustersize*) + delta) % *clustersize*) + ((get_sub_group_local_id() / *clustersize*) * *clustersize*)

Contributor guide

Open the contributing guide

Research direction

Search the OpenCL C Unified Specification for the sub_group_clustered_rotate wording quoted in the issue, then compare the proposed formula with the existing definition. Done means the operation is described more readably and the formula is included if it accurately clarifies the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.