Name Strings

cl_ext_cxx_for_opencl

Contact

Please see the Issues list in the Khronos OpenCL-Docs repository:
https://github.com/KhronosGroup/OpenCL-Docs

Contributors

Kevin Petit, Arm Ltd.
Sven Van Haastregt, Arm Ltd.
Anastasia Stulova, Arm Ltd.
Marco Antognini, Arm Ltd.
Neil Hickey, Arm Ltd.
Alastair Murray, Codeplay

Notice

Copyright 2008-2020 The Khronos Group.

This specification is protected by copyright laws and contains material proprietary to the Khronos Group, Inc. Except as described by these terms, it or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast or otherwise exploited in any manner without the express prior written permission of Khronos Group.

Khronos Group grants a conditional copyright license to use and reproduce the unmodified specification for any purpose, without fee or royalty, EXCEPT no licenses to any patent, trademark or other intellectual property rights are granted under these terms. Parties desiring to implement the specification and make use of Khronos trademarks in relation to that implementation, and receive reciprocal patent license protection under the Khronos IP Policy must become Adopters and confirm the implementation as conformant under the process defined by Khronos for this specification; see https://www.khronos.org/adopters.

Khronos Group makes no, and expressly disclaims any, representations or warranties, express or implied, regarding this specification, including, without limitation: merchantability, fitness for a particular purpose, non-infringement of any intellectual property, correctness, accuracy, completeness, timeliness, and reliability. Under no circumstances will the Khronos Group, or any of its Promoters, Contributors or Members, or their respective partners, officers, directors, employees, agents or representatives be liable for any damages, whether direct, indirect, special or consequential damages for lost revenues, lost profits, or otherwise, arising from or in connection with these materials.

Vulkan and Khronos are registered trademarks, and OpenXR, SPIR, SPIR-V, SYCL, WebGL, WebCL, OpenVX, OpenVG, EGL, COLLADA, glTF, NNEF, OpenKODE, OpenKCAM, StreamInput, OpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL, OpenMAX DL, OpenML and DevU are trademarks of the Khronos Group Inc. ASTC is a trademark of ARM Holdings PLC, OpenCL is a trademark of Apple Inc. and OpenGL and OpenML are registered trademarks and the OpenGL ES and OpenGL SC logos are trademarks of Silicon Graphics International used under license by Khronos. All other product names, trademarks, and/or company names are used solely for identification and belong to their respective owners.

Version

Built On: 2020-09-02
Version: 1.0.0

Dependencies

This extension is written against the OpenCL Specification Version 3.0.3.

This extension requires OpenCL 3.0 with OpenCL C 2.0 support or OpenCL 2.x and cl_khr_extended_versioning.

Overview

This extension adds support for building programs written using the C++ for OpenCL kernel language. It also enables applications to query the version of the language supported by the device compiler.

New build option

This extension adds support for a new CLC++ value to be passed to the -cl-std build option accepted by clBuildProgram and clCompileProgram.

New API Enums

Accepted value for the param_name parameter to clGetDeviceInfo:

CL_DEVICE_CXX_FOR_OPENCL_NUMERIC_VERSION_EXT       0x4230

Modifications to the OpenCL API Specification

(Modify Section 4.2, Querying Devices)
(Add the following to Table 4.3, Device Queries)
cl_device_info Return Type Description

CL_DEVICE_CXX_FOR_OPENCL_NUMERIC_VERSION_EXT

cl_version

Returns the version of the C++ for OpenCL language supported by the device compiler.

(Modify Section 5.8.1, Creating Program Objects)

Add the following text to the description for clCreateProgramWithSource:

The source code specified by strings may also be a C++ for OpenCL program source or header.

(Modify section to 5.8.6, Compiler Options)
(Add subsection, C++ for OpenCL)

Applications may pass -cl-std=CLC++ to clCompileProgram and clBuildProgram for programs created using clCreateProgramFromSource to request the program be built as C++ for OpenCL.

Conformance tests

  1. Test that a program can successfully be compiled with -cl-std=CLC++.

  2. Test with a program compiled with -cl-std=CLC++ that the value of the __OPENCL_CPP_VERSION__ macro agrees with the version returned by CL_DEVICE_CXX_FOR_OPENCL_NUMERIC_VERSION_EXT.

Issues

None.

Version History

Version Date Author Changes

1.0.0

2020-08-25

Kevin Petit

Initial revision