| 47 | namespace { |
| 48 | template <typename T> |
| 49 | T GetPlatformInfo(cl_platform_id id, cl_platform_info info) { |
| 50 | T result; |
| 51 | cl_int error = clGetPlatformInfo(id, info, sizeof(T), &result, nullptr); |
| 52 | if (error != CL_SUCCESS) { |
| 53 | return -1; |
| 54 | } |
| 55 | return result; |
| 56 | } |
| 57 | |
| 58 | std::string GetPlatformInfo(cl_platform_id id, cl_platform_info info) { |
| 59 | size_t size; |