These days in the OpenCL Programming Guide, found a headache problem, programming sometimes with cl_int sometimes with int, and so on, began to understand that int is the grammatical structure of C, Cl_int is the grammatical structure of OpenCL, write the kernel with Cl_int, write C with Int. However, it is found that C sometimes has cl_int, and the kernel is basically int. Chaos, how can this?
Difficulties can not help but carefully study, originally AH, cl_int is only the OpenCL API data type, int is still the data type of OpenCL, how to understand it? That is, if you want to pass parameters or return values to the OpenCL API, you need to use Cl_int, and the syntax of INT,OPENCL is the same as the syntax of C in other places. Of course cl_int and int also correspond, equivalent to Cl_int is an alias of Int.
hahaha, solved, so understand it.
An issue in OPENCL programming