C Specification
Specific information about an OpenCL platform can be obtained with the function:
// Provided by CL_VERSION_1_0
cl_int clGetPlatformInfo(
    cl_platform_id platform,
    cl_platform_info param_name,
    size_t param_value_size,
    void* param_value,
    size_t* param_value_size_ret);Parameters
- 
platform refers to the platform ID returned by clGetPlatformIDs or can be NULL. If platform isNULL, the behavior is implementation-defined.
- 
param_name is an enumeration constant that identifies the platform information being queried. It can be one of the following values as specified in the Platform Queries table. 
- 
param_value is a pointer to memory location where appropriate values for a given param_name, as specified in the Platform Queries table, will be returned. If param_value is NULL, it is ignored.
- 
param_value_size specifies the size in bytes of memory pointed to by param_value. This size must be greater than or equal to the size of the return type specified in the Platform Queries table. If param_value is NULL, it is ignored.
- 
param_value_size_ret returns the actual size in bytes of data being queried by param_name. If param_value_size_ret is NULL, it is ignored.
Description
The information that can be queried using clGetPlatformInfo is specified in the Platform Queries table.
| Platform Info | Return Type | Description | 
|---|---|---|
| 
 | 
 | OpenCL profile string. Returns the profile name supported by the implementation. The profile name returned can be one of the following strings: FULL_PROFILE - if the implementation supports the OpenCL specification (functionality defined as part of the core specification and does not require any extensions to be supported). EMBEDDED_PROFILE - if the implementation supports the OpenCL embedded profile. The embedded profile is defined to be a subset for each version of OpenCL. The embedded profile for OpenCL is described in OpenCL Embedded Profile. | 
| 
 | 
 | OpenCL version string. Returns the OpenCL version supported by the implementation. This version string has the following format: OpenCL<space><major_version.minor_version><space><platform-specific information> The major_version.minor_version value returned will be one of 1.0, 1.1, 1.2, 2.0, 2.1, 2.2 or 3.0. | 
| 
 missing before version 3.0. or 
 provided by the  | 
 or  | Returns the detailed (major, minor, patch) version supported by the
        platform. The major and minor version numbers returned must match
        those returned via  | 
| 
 | 
 | Platform name string. | 
| 
 | 
 | Platform vendor string. | 
| 
 | 
 | Returns a space separated list of extension names (the extension names themselves do not contain any spaces) supported by the platform. Each extension that is supported by all devices associated with this platform must be reported here. | 
| 
 missing before version 3.0. or 
 provided by the  | 
 or  | Returns an array of description (name and version) structures that lists
        all the extensions supported by the platform. The same extension name
        must not be reported more than once. The list of extensions reported
        must match the list reported via  | 
| 
 missing before version 2.1. | 
 | Returns the resolution of the host timer in nanoseconds as used by clGetDeviceAndHostTimer. Support for device and host timer synchronization is required for platforms supporting OpenCL 2.1 or 2.2. This value must be 0 for platforms that do not support device and host timer synchronization. | 
| 
 provided by the  | 
 | Describes platform command-buffer capabilities, encoded as bits in a bitfield. Supported capabilities are:        provided by the         provided by the         provided by the  | 
| 
 provided by the  | 
 | Returns the list of importable external memory handle types supported by all devices in platform. | 
| 
 provided by the  | 
 | Returns the list of the semaphore types supported all devices in platform. | 
| 
 provided by the  | 
 | Returns the list of importable external semaphore handle types supported by all devices in platform. The size of this query may be 0 if no importable external semaphore handle types are supported by all devices in platform. | 
| 
 provided by the  | 
 | Returns the list of exportable external semaphore handle types supported by all devices in the platform. This size of this query may be 0 if no exportable external semaphore handle types are supported by all devices in platform. | 
| 
 provided by the  | 
 | The function name suffix used to identify extension functions to be directed to this platform by the ICD Loader. | 
clGetPlatformInfo returns CL_SUCCESS if the function is executed
successfully.
Otherwise, it returns one of the following
errors [3].
- 
CL_INVALID_if platform is not a valid platform.PLATFORM 
- 
CL_INVALID_if param_name is not one of the supported values, or if the size in bytes specified by param_value_size is less than size of the return type specified in the Platform Queries table and param_value is notVALUE NULL.
- 
CL_OUT_if there is a failure to allocate resources required by the OpenCL implementation on the host.OF_ HOST_ MEMORY 
Document Notes
For more information, see the OpenCL Specification
This page is extracted from the OpenCL Specification. Fixes and changes should be made to the Specification, not directly.