| 1770 | |
| 1771 | #if defined(CL_VERSION_1_2) && defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) |
| 1772 | static cl_uint getContextPlatformVersion(cl_context context) |
| 1773 | { |
| 1774 | // The platform cannot be queried directly, so we first have to grab a |
| 1775 | // device and obtain its context |
| 1776 | ::size_t size = 0; |
| 1777 | clGetContextInfo(context, CL_CONTEXT_DEVICES, 0, NULL, &size); |
| 1778 | if (size == 0) |
| 1779 | return 0; |
| 1780 | cl_device_id *devices = (cl_device_id *) alloca(size); |
| 1781 | clGetContextInfo(context, CL_CONTEXT_DEVICES, size, devices, NULL); |
| 1782 | return getDevicePlatformVersion(devices[0]); |
| 1783 | } |
| 1784 | #endif // #if defined(CL_VERSION_1_2) && defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) |
| 1785 | |
| 1786 | template <typename T> |
no test coverage detected