Skip to content

Commit 0eff119

Browse files
authored
add recommendation for bits in bitfields (#688)
* add recommendation for bits in bitfields * updated change log
1 parent 85b4e11 commit 0eff119

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

extensions/cl_extension_template.asciidoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ lowercase.
237237
238238
If the extension does not add any new API enumerants then this section
239239
may be omitted.
240+
241+
Please note that bits in bitfields (such as `cl_mem_flags`) are limited
242+
in number. When possible, it is recommended to use properties instead,
243+
to conserve bitfield bits.
240244
****
241245

242246
== New OpenCL C Functions
@@ -461,6 +465,7 @@ best not to renumber issues, either.
461465
| 0.4.0 | 2019-10-25 | Kévin Petit | Added conformance tests section.
462466
| 0.5.0 | 2020-02-13 | Kévin Petit | Syntax fixes + added SPIR-V environment section.
463467
| 0.6.0 | 2020-04-20 | Alastair Murray | Use naming conventions in the new type example.
468+
| 0.7.0 | 2021-10-05 | Ben Ashbaugh | Added recommendation for bits in bitfields.
464469
|====
465470

466471
****

xml/cl.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,8 @@ server's OpenCL/api-docs repository.
778778
</enums>
779779

780780
<enums name="cl_mem_flags" vendor="Khronos" type="bitmask">
781+
<!-- Note: cl_mem_flags bits are limited! When possible, using
782+
cl_mem_properties or cl_pipe_properties is recommended instead. -->
781783
<enum bitpos="0" name="CL_MEM_READ_WRITE"/>
782784
<enum bitpos="1" name="CL_MEM_WRITE_ONLY"/>
783785
<enum bitpos="2" name="CL_MEM_READ_ONLY"/>

0 commit comments

Comments
 (0)