logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

clGetPlatformInfo - Get specific information about the OpenCL platform.

Authors

TheKhronosGroup

Errors

       Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns the following:

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

Name

       clGetPlatformInfo - Get specific information about the OpenCL platform.

       cl_intclGetPlatformInfo(cl_platform_idplatform,cl_platform_infoparam_name,size_tparam_value_size,void*param_value,size_t*param_value_size_ret);

Notes

        1. OpenCL Specification
           page 33, section 4.1 - Querying Platform Info

The Khronos Group                                  11/18/2024                            CLGETPLATFORMINFO(3clc)

Parameters

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

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

       param_value
           A pointer to memory location where appropriate values for a given param_value will be returned.
           Possible param_value values returned are listed in the table below. 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 in bytes must be ≥ size of
           return type specified in the table below.

       param_value_size_ret
           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_infoReturnTypeDescription                                                         │
           ├────────────────────────┼─────────────┼─────────────────────────────────────────────────────────────────────┤
           │ CL_PLATFORM_PROFILE    │ char[]      │ 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.                                                  │
           ├────────────────────────┼─────────────┼─────────────────────────────────────────────────────────────────────┤
           │ CL_PLATFORM_VERSION    │ char[]      │ 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 1.2.                                         │
           ├────────────────────────┼─────────────┼─────────────────────────────────────────────────────────────────────┤
           │ CL_PLATFORM_NAME       │ char[]      │ Platform name string.                                               │
           ├────────────────────────┼─────────────┼─────────────────────────────────────────────────────────────────────┤
           │ CL_PLATFORM_VENDOR     │ char[]      │ Platform vendor string.                                             │
           ├────────────────────────┼─────────────┼─────────────────────────────────────────────────────────────────────┤
           │ CL_PLATFORM_EXTENSIONS │ char[]      │ 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.                                      │
           └────────────────────────┴─────────────┴─────────────────────────────────────────────────────────────────────┘

See Also

clGetPlatformIDs(3clc)

Specification

OpenCLSpecification[1]

See Also