Reputation: 1722
How do you use clGetDeviceInfo to get CL_DEVICE_ADDRESS_BITS? https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clGetDeviceInfo.html
Upvotes: 1
Views: 679
Reputation: 1722
The below function should accomplish this.
void print_address_device_bits(cl_device_id *mydevice)
{
size_t size;
cl_uint address_bits;
clGetDeviceInfo(*mydevice, CL_DEVICE_ADDRESS_BITS, 0, NULL, &size);
clGetDeviceInfo(*mydevice, CL_DEVICE_ADDRESS_BITS, size, &address_bits, NULL);
printf("size: %lu ,, bits: %u\n", size, address_bits);
}
Any questions or comments?
Upvotes: 1