KhronosGroup / KhronosGroup/OpenCL-Docs

Can we relax requirements on size of the masks used with the `shuffle` and `shuffle2` built-in functions?

Open
#767 0 comments 1 reaction 0 assignees View on GitHub
needs-cts-coverage needs-spirv-validator OpenCL C Spec
Dominant language
Python
Stars
420
Forks
131
Avg merge
5d 13h
Merged PRs (30d)
11

Description

The spec currently states:

> The size of each element in the mask must match the size of each element in the result.

This seems rather overkill and doesn't seem helpful for either implementations or applications. For example it means than shuffling a vector of floats requires 32-bit masks when 8-bit masks would be more than sufficient for all the vector sizes currently defined by OpenCL C.

Could we relax this requirement in a future version of OpenCL C?

Contributor guide

Open the contributing guide

Research direction

Review the OpenCL C specification text for the shuffle and shuffle2 built-in functions, focusing on the requirement that mask element size match result element size. Compare that requirement with the currently defined vector sizes and evaluate the proposed relaxation. Done means the future-version specification decision and resulting wording are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.