The OpenCL is designed to support devices with different capabilities under a single platform. This includes devices which conform to different versions of the OpenCL specification. While writing an OpenCL based application one needs to query the implementation about the supported version in the platform. There are mainly two different types of version identifiers to consider.
Platform Version: Indicates the version of the OpenCL runtime supported.
Device Version: Indicates the device capabilities and attributes. The conformant version info provided cannot be greater than platform version.
Now let's write an OpenCL program to get the platform details. Use the get_platform_property
example in this chapter.
The OpenCL standard specifies API interfaces to determine the platform configuration. To query the platform versions and details of the OpenCL implementation, the following two APIs are used:
cl_int clGetPlatformIDs (cl_uint num_entries, cl_platform_id *platforms...