Hi forum,
I am going through a source code example that came along with the nvidia SDK and from the host side the kernel arguments are sent as follows:
ciErrNum = clSetKernelArg(ckBoxRowsLmem, 0, sizeof(cl_mem), (void*)&cmDevBufIn);
ciErrNum |= clSetKernelArg(ckBoxRowsLmem, 1, sizeof(cl_mem), (void*)&cmDevBufTemp);
As you can see that both of the buffer type is cl_mem.
But inside the kernel they are accepted as follows:
__kernel void BoxRowsLmem( __global const uchar4* uc4Source,
__global unsigned int* uiDest,
One is accepted as uchar4* and the other as unsigned int *. Can you imagine why and when we do this type of operation?
Regards
Sajjad