[PATCH] Clang: Reject OpenCL workgroup size requirement of 0

Pedro Ferreira pedro.ferreira at imgtec.com
Tue May 13 02:02:53 PDT 2014


OpenCL allows us to define the workgroup size used in a kernel in order 
to further optimise the code, specifically to that size.
The syntax is
__attribute__((reqd_work_group_size(X, Y, Z)))

where X, Y and Z are compile-time known integers.
Currently clang allows any of those to be 0, which would be illegal in 
OpenCL.

The attached patch adds this validation; it's currently a draft and any 
comments would be welcome.

(I reported this on bug 19699)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.patch
Type: text/x-patch
Size: 1485 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140513/9338652c/attachment.bin>


More information about the cfe-commits mailing list