Reputation: 86
So let's say I have two OCL kernels:
__kernel void vdotprod(
__global int* x,
__global int* y,
__global int* z,
__global int* d,
const int npoints)
and
kernel void vdotprod(
global int* x,
global int* y,
global int* z,
global int* d,
const int npoints)
Assuming all other aspects of code are the same (incl host code and all), does the __ affect anything? What is the purpose of the __?
Upvotes: 9
Views: 924
Reputation: 9925
The double underscore prefix does not affect the semantics of your OpenCL program.
All OpenCL specific keywords can optionally use a double underscore prefix. Use of this prefix is entirely down to programmer preference. For example, some people prefer to use the underscores as it emphasis where OpenCL extends the standard C99 language. Others prefer to omit them for brevity.
Upvotes: 14