Get specific information about the OpenCL platform.

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)



The platform ID returned by clGetPlatformIDs or can be NULL. If platform is NULL, the behavior is implementation-defined.


An enumeration constant that identifies the platform information being queried. It can be one of the values specified in the table below.


A pointer to memory location where appropriate values for a given param_name will be returned. Possible param_value values returned are listed in the table below. If param_value is NULL, it is ignored.


Specifies the size in bytes of memory pointed to by param_value. This size in bytes must be ≥ size of return type specified in the table below.


Returns the actual size in bytes of data being queried by param_value. If param_value_size_ret is NULL, it is ignored

OpenCL Platform Queries

cl_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 2.1 is described in section 7.


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 2.1.

CL_PLATFORM_NAME char[] Platform name string.
CL_PLATFORM_VENDOR char[] Platform vendor string.

Returns a space-separated list of extension names (the extension names themselves do not contain any spaces) supported by the platform. Extensions defined here must be supported by all devices associated with this platform.


Returns the resolution of the host timer in nanoseconds as used by clGetDeviceAndHostTimer.


If the cl_khr_icd extension is enabled, the function name suffix used to identify extension functions to be directed to this platform by the ICD Loader.


A null terminated string is returned by OpenCL query function calls if the return type of the information being queried is a char[].


Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns the following: (The OpenCL specification does not describe the order of precedence for error codes returned by API calls)

  • CL_INVALID_PLATFORM if platform is not a valid platform.
  • CL_INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is less than size of return type and param_value is not a NULL value.
  • CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.


OpenCL Specification

Also see


Copyright © 2007-2015 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.