MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / getContextPlatformVersion

Function getContextPlatformVersion

include/CL/opencl.hpp:2049–2060  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2047}
2048
2049static cl_uint getContextPlatformVersion(cl_context context)
2050{
2051 // The platform cannot be queried directly, so we first have to grab a
2052 // device and obtain its context
2053 size_type size = 0;
2054 clGetContextInfo(context, CL_CONTEXT_DEVICES, 0, nullptr, &size);
2055 if (size == 0)
2056 return 0;
2057 vector<cl_device_id> devices(size/sizeof(cl_device_id));
2058 clGetContextInfo(context, CL_CONTEXT_DEVICES, size, devices.data(), nullptr);
2059 return getDevicePlatformVersion(devices[0]);
2060}
2061#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 && CL_HPP_MINIMUM_OPENCL_VERSION < 120
2062
2063template <typename T>

Callers 3

Image2DMethod · 0.85
Image3DMethod · 0.85
CommandQueueMethod · 0.85

Calls 3

clGetContextInfoFunction · 0.85
getDevicePlatformVersionFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected