关于opencl C 的几点限制
OpenCL C language isbasically standard C (C99) with some extensions and restrictions.
This language is used to program the kernel. Aside from theseextensions and restrictions, the language can be treated the same asC
Restrictions
Below lists the restricted portion from the C language in OpenCL C.
1.The pointer passed as an argument to a kernel function must be of type __global, __constant, or __local.
2.Pointer to a pointer cannot be passed as an argument to a kernel function.
3.Bit-fields are not supported.
4.Variable length arrays and structures with flexible (or unsized) arrays are not supported.
5.Variadic macros and functions are not supported.
6.C99 standard headers cannot be included
7.The extern, static, auto and register storage-class specifiers are not supported.
8.Predefined identifiers are not supported.
9.Recursion is not supported.
10.The function using the __kernel qualifier can only have return type void in the source code.
11.Writes to a pointer of type char, uchar, char2, uchar2, short, ushort, and half are not supported.(1.0之前,1.1版本以后该限制取消)
12.Support for double precision floating-point is currently an optional extension. It may or may not be implemented.