| 15 | namespace compute = boost::compute; |
| 16 | |
| 17 | int main() |
| 18 | { |
| 19 | // get the default device |
| 20 | compute::device device = compute::system::default_device(); |
| 21 | |
| 22 | std::cout << "device: " << device.name() << std::endl; |
| 23 | std::cout << " global memory size: " |
| 24 | << device.get_info<cl_ulong>(CL_DEVICE_GLOBAL_MEM_SIZE) / 1024 / 1024 |
| 25 | << " MB" |
| 26 | << std::endl; |
| 27 | std::cout << " local memory size: " |
| 28 | << device.get_info<cl_ulong>(CL_DEVICE_LOCAL_MEM_SIZE) / 1024 |
| 29 | << " KB" |
| 30 | << std::endl; |
| 31 | std::cout << " constant memory size: " |
| 32 | << device.get_info<cl_ulong>(CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE) / 1024 |
| 33 | << " KB" |
| 34 | << std::endl; |
| 35 | |
| 36 | return 0; |
| 37 | } |