Forum Discussion
Altera_Forum
Honored Contributor
8 years agoOutput Message: "...A host pointer is provided without also specifying one of..."
The full message I am getting on the terminal is : Context callback: A host pointer is provided without also specifying one of CL_MEM_USE_HOST_PTR or CL_MEM_COPY_HOST_PTR
Context callback: A ...
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");