Forum Discussion
Altera_Forum
Honored Contributor
8 years agoI am not really sure if I understand what you are trying to do with that code. Are you trying to pass two values (rather than buffers) to the kernel? If that is the case, just pass them as values, no need to define pointers and allocate buffers.
uint init = 0;
int size = SIZE;
status = clSetKernelArg(well_kernel, 4, sizeof(uint), (void *) &init);
checkError(status, "Failed to set kernel arg 4");
status = clSetKernelArg(well_kernel, 5, sizeof(int), (void *) &size);
checkError(status, "Failed to set kernel arg 5");