View Full Version : Using a single integer value(not a pointer as parameter for?

08-29-2012, 11:36 AM
Hello GPGPU hackers!

How to use the normal integer values not a pionter as kernel arguments?
can someone give here a short example?

09-01-2012, 10:21 AM
Most of the OpenCL examples from any of the vendors include an example of this. It's similar to passing pointers as kernel args, but instead of passing the pointer value, you pass the address of the scalar value.

clSetKernelArg(kernel, 0, sizeof(int), &someInt);