How to pass vector parameter to OpenCL kernel in C?
问题 I'm having trouble passing a vector type (uint8) parameter to an OpenCL kernel function from the host code in C. In the host I've got the data in an array: cl_uint dataArr[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; (My real data is more than just [1, 8]; this is just for ease of explanation.) I then transfer the data over to a buffer to be passed to the kernel: cl_mem kernelInputData = clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, sizeof(cl_uint)*8, dataArr, NULL); Next, I pass this