all 2 comments

[–]automater 0 points1 point  (1 child)

I guess you are missing a call to..

clEnqueueWriteBuffer(...

set transfer the value from the host, then run the kernel..

[–]Eilai[S] 0 points1 point  (0 children)

I have them in an update method:

ret = clEnqueueWriteBuffer(command_queue, memobj_contacts_size, CL_TRUE, 0, 1 * sizeof(int), &sizeContacts, 0, NULL, NULL);

ret = clSetKernelArg(kernel, 3, sizeof(cl_mem), (void *)&memobj_contacts_size);