cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

barno
Journeyman III

Pointer Size in OpenCL

I need to reserve some space for pointers from my host in my GPU. How do I know how much space I need, e.g. what is the size of a single pointer?

0 Likes
3 Replies
himanshu_gautam
Grandmaster

barno,

I don't think those pointers are in any way useful inside kernel code.To access any data inside a kernel you must have cl_mem objects.

Anyhow AFAIK pointer sizes are standard and you can query it using sizeof operator.

0 Likes

clGetDeviceInfo with CL_DEVICE_ADDRESS_BITS. but have pointer is not usefull.

0 Likes

As nou pointed out, having pointers to GPU memory isn't useful. If you didn't explicitly pass a cl_mem object to the kernel, attempting to modify anything in its region will result in incorrect behavior (data won't load or store, etc.).

0 Likes