From 22d29fb1633b27a97e4d02601b57f5c37b1e40b1 Mon Sep 17 00:00:00 2001 From: Alastair Murray Date: Mon, 6 Sep 2021 01:05:14 +0100 Subject: [PATCH] Test two additional defines and update descriptions in header Newly tested defines: * `CL_HPP_USE_CL_DEVICE_FISSION` (corrected from `CL_HPP_ENABLE_DEVICE_FISSION`) * `CL_HPP_USE_CL_IMAGE2D_FROM_BUFFER_KHR` The `CL_HPP_NO_STD_FOO` defines are not tested, because the header won't build unless an alternative implementation is provided. `The CL_HPP_USE_DX_INTEROP` define is not tested because it does not work on platforms without DirectX headers. Issue #146 could make this irrelevant, but easy to test these defines in the meantime. --- include/CL/opencl.hpp | 16 ++++++++++++---- tests/CMakeLists.txt | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/include/CL/opencl.hpp b/include/CL/opencl.hpp index b7d4b9ec..5abcc5fa 100644 --- a/include/CL/opencl.hpp +++ b/include/CL/opencl.hpp @@ -165,10 +165,6 @@ * the cl::allocate_pointer functions are not defined and may be * defined by the user before opencl.hpp is included. * - * - CL_HPP_ENABLE_DEVICE_FISSION - * - * Enables device fission for OpenCL 1.2 platforms. - * * - CL_HPP_ENABLE_EXCEPTIONS * * Enable exceptions for use in the C++ bindings header. This is the @@ -194,10 +190,22 @@ * applies to use of cl::Program construction and other program * build variants. * + * - CL_HPP_USE_CL_DEVICE_FISSION + * + * Enable the cl_ext_device_fission extension. + * + * - CL_HPP_USE_CL_IMAGE2D_FROM_BUFFER_KHR + * + * Enable the cl_khr_image2d_from_buffer extension. + * * - CL_HPP_USE_CL_SUB_GROUPS_KHR * * Enable the cl_khr_subgroups extension. * + * - CL_HPP_USE_DX_INTEROP + * + * Enable the cl_khr_d3d10_sharing extension. + * * - CL_HPP_USE_IL_KHR * * Enable the cl_khr_il_program extension. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c1513e17..560a8bd1 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -58,7 +58,7 @@ set(TEST_SOURCES # TODO enable testing for OpenCL 1.0 and 1.1 foreach(VERSION 120 200 210 220 300) - foreach(OPTION "" CL_HPP_ENABLE_DEVICE_FISSION CL_HPP_ENABLE_EXCEPTIONS CL_HPP_ENABLE_SIZE_T_COMPATIBILITY CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY CL_HPP_CL_1_2_DEFAULT_BUILD CL_HPP_USE_CL_SUB_GROUPS_KHR CL_HPP_USE_IL_KHR) + foreach(OPTION "" CL_HPP_ENABLE_EXCEPTIONS CL_HPP_ENABLE_SIZE_T_COMPATIBILITY CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY CL_HPP_CL_1_2_DEFAULT_BUILD CL_HPP_USE_CL_DEVICE_FISSION CL_HPP_USE_CL_IMAGE2D_FROM_BUFFER_KHR CL_HPP_USE_CL_SUB_GROUPS_KHR CL_HPP_USE_IL_KHR) if(OPTION STREQUAL "") # The empty string means we're not setting any special option. set(UNDERSCORE_OPTION "${OPTION}")