- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I meet some problems with clSetKernelArgSVMPointer()
main.cpp:
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.cl:
__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?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try just int n instead of global int n.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page