Hi,
While evaluating the reduction example in the specification one of the values is passed as a scalar value instead of a pointer. I am trying to learn how an openCL implementation knows that the variable is a scalar value and not a pointer.

The kernel code looks like: (pg 295)
reduce(__global float *output, __global const float *input,
__local float *shared, unsigned int n)

The host code looks like: (pg 302)
err |= clSetKernelArg(kernels[i], 3, sizeof(int), &entries);

How does the OpenCL clSetKernelArg command know that the kernel 4th kernel argument is passed as an unsigned int and should be placed directly in a register for use by the kernel rather than being placed in global memory and read in by each thread?

The clSetKernelArg command is identical to the previous 3 commands which are passing blocks of memory yet somehow, this clSetKernelArg command knows to place the value that &entries points to in unsigned int 'n' but in the other clSetKernelArg commands, 'output' and 'input' are set to pointers that point to the global memory location that hold the values of what is passed.

Link to specification:
http://www.khronos.org/registry/cl/spec ... 1.0.33.pdf

Thanks in advance.