AnsweredAssumed Answered

clSetKernelArgSVMPointer() does not support a constant?

Question asked by sky3551211 on Nov 21, 2014
Latest reply on Nov 24, 2014 by sky3551211



cl_uchar4* svmbuffer=(cl_uchar4*)clSVMAlloc(....)

cl_uchar4* svmoutbuffer=(cl_uchar4*)clSVMAlloc(....)

int n=2;


status = clSetKernelArgSVMPointer(kernel2D,0,svmbuffer);

status = clSetKernelArgSVMPointer( kernel2D,1,svmoutbuffer);

status = clSetKernelArgSVMPointer( kernel2D,1,&n);

__kernel void image1dCopy(global uchar4* svmbuffer,global uchar4* svmoutbuffer, global int *n)





But an error is located at  "status = clSetKernelArgSVMPointer( kernel2D,1,&n);",

and the error code is CL_INVALID_ARG_VALUE.

When I change the "global int *n" to "global int n", it show me error: parameter may not be qualified with an address space.

So, clSetKernelArgSVMPointer() does not support a constant?