如何使用clGetDeviceInfo获取CL_DEVICE_ADDRESS_BITS? https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clGetDeviceInfo.html
答案 0 :(得分:1)
以下功能应该可以做到这一点。
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);
}
有任何问题或意见吗?