MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / getContextPlatformVersion

Function getContextPlatformVersion

include/internal/CL/cl.hpp:1772–1783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1770
1771#if defined(CL_VERSION_1_2) && defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
1772static 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
1786template <typename T>

Callers 2

Image2DMethod · 0.85
Image3DMethod · 0.85

Calls 1

getDevicePlatformVersionFunction · 0.85

Tested by

no test coverage detected