Skip to content

Commit

Permalink
Update cl_img_swap_ops.asciidoc
Browse files Browse the repository at this point in the history
Defining behavior as undefined for cases when the number of work-items is not evenly divisible by four and if some work-items in the block of four are inactive, defining 1-dimensional local ID as a base for grouping work-items.
  • Loading branch information
tomasz-platek authored Jul 11, 2024
1 parent db42ec7 commit 8397e85
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions extensions/cl_img_swap_ops.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ gentype img_swap_y(gentype value);
* In the third work-item, `img_swap_x` returns `value` passed as an argument in the fourth work-item.
* In the fourth work-item, `img_swap_x` returns `value` passed as an argument in the third work-item.

The work-items are assigned into blocks based on their 1-dimensional local ID (see `get_local_linear_id`).

The number of work-items that make up a work-group must be evenly divisible by four; otherwise, the behaviour is undefined.

The function must be called in all four work-items of the block; otherwise, the behaviour is undefined.

Requires that the `__opencl_img_swap` feature macro is defined.
| gentype *img_swap_y*(gentype value)
a| `img_swap_y` swaps `values` between work-items in the following way: all work-items are divided into blocks of four consecutive elements. For each block:
Expand All @@ -84,6 +90,12 @@ Requires that the `__opencl_img_swap` feature macro is defined.
* In the second work-item, `img_swap_y` returns `value` passed as an argument in the fourth work-item.
* In the fourth work-item, `img_swap_y` returns `value` passed as an argument in the second work-item.

The work-items are assigned into blocks based on their 1-dimensional local ID (see `get_local_linear_id`).

The number of work-items that make up a work-group must be evenly divisible by four; otherwise, the behaviour is undefined.

The function must be called in all four work-items of the block; otherwise, the behaviour is undefined.

Requires that the `__opencl_img_swap` feature macro is defined.
|====
--
Expand Down

0 comments on commit 8397e85

Please sign in to comment.