From 9e673e577380cd21a68a721065760600f7fc4503 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Wed, 6 May 2026 23:28:11 +0200 Subject: [PATCH] include: update CL headers Part-of: --- include/CL/cl.h | 67 ++++++++++++++++++++-- include/CL/cl_d3d10.h | 2 +- include/CL/cl_d3d11.h | 2 +- include/CL/cl_dx9_media_sharing.h | 2 +- include/CL/cl_dx9_media_sharing_intel.h | 2 +- include/CL/cl_egl.h | 2 +- include/CL/cl_ext.h | 39 ++++++++++++- include/CL/cl_ext_intel.h | 2 +- include/CL/cl_function_types.h | 17 +++++- include/CL/cl_gl.h | 2 +- include/CL/cl_gl_ext.h | 2 +- include/CL/cl_half.h | 2 +- include/CL/cl_icd.h | 9 ++- include/CL/cl_layer.h | 42 +++++++++++++- include/CL/cl_platform.h | 31 +++++----- include/CL/cl_va_api_media_sharing_intel.h | 2 +- include/CL/cl_version.h | 16 ++++-- include/CL/opencl.h | 2 +- 18 files changed, 199 insertions(+), 44 deletions(-) diff --git a/include/CL/cl.h b/include/CL/cl.h index 4ec705dfc16..8a803e3b8ab 100644 --- a/include/CL/cl.h +++ b/include/CL/cl.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2020 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -121,6 +121,9 @@ typedef cl_uint cl_khronos_vendor_id; typedef cl_properties cl_mem_properties; #endif typedef cl_uint cl_version; +#ifdef CL_VERSION_3_1 +typedef cl_bitfield cl_device_integer_dot_product_capabilities; +#endif typedef struct _cl_image_format { cl_channel_order image_channel_order; @@ -171,6 +174,19 @@ typedef struct _cl_name_version { #endif +#ifdef CL_VERSION_3_1 + +typedef struct _cl_device_integer_dot_product_acceleration_properties { + cl_bool signed_accelerated; + cl_bool unsigned_accelerated; + cl_bool mixed_signedness_accelerated; + cl_bool accumulating_saturating_signed_accelerated; + cl_bool accumulating_saturating_unsigned_accelerated; + cl_bool accumulating_saturating_mixed_signedness_accelerated; +} cl_device_integer_dot_product_acceleration_properties; + +#endif + /******************************************************************************/ /* Error Codes */ @@ -290,7 +306,10 @@ typedef struct _cl_name_version { #define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002 #define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003 #define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004 -#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 +#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 /* deprecated */ +#ifdef CL_VERSION_3_1 +#define CL_DEVICE_MAX_WORK_GROUP_SIZES 0x1005 +#endif #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008 @@ -344,7 +363,7 @@ typedef struct _cl_name_version { /* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG which is already defined in "cl_ext.h" */ #ifdef CL_VERSION_1_1 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034 -#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */ +#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038 @@ -404,12 +423,28 @@ typedef struct _cl_name_version { #define CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x1067 #define CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT 0x1068 #define CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT 0x1069 -/* 0x106A to 0x106E - Reserved for upcoming KHR extension */ +#endif +#ifdef CL_VERSION_3_1 +#define CL_DEVICE_UUID 0x106A +#define CL_DRIVER_UUID 0x106B +#define CL_DEVICE_LUID_VALID 0x106C +#define CL_DEVICE_LUID 0x106D +#define CL_DEVICE_NODE_MASK 0x106E +#endif +#ifdef CL_VERSION_3_0 #define CL_DEVICE_OPENCL_C_FEATURES 0x106F #define CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES 0x1070 #define CL_DEVICE_PIPE_SUPPORT 0x1071 #define CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED 0x1072 #endif +#ifdef CL_VERSION_3_1 +#define CL_DEVICE_INTEGER_DOT_PRODUCT_CAPABILITIES 0x1073 +#define CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_8BIT 0x1074 +#define CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED 0x1075 +#define CL_DEVICE_SPIRV_EXTENDED_INSTRUCTION_SETS 0x12B9 +#define CL_DEVICE_SPIRV_EXTENSIONS 0x12BA +#define CL_DEVICE_SPIRV_CAPABILITIES 0x12BB +#endif /* cl_device_fp_config - bitfield */ #define CL_FP_DENORM (1 << 0) @@ -918,6 +953,18 @@ typedef struct _cl_name_version { (((minor) & CL_VERSION_MINOR_MASK) << CL_VERSION_PATCH_BITS) | \ ((patch) & CL_VERSION_PATCH_MASK)) +#ifdef CL_VERSION_3_1 + +/* Size Constants */ +#define CL_UUID_SIZE 16 +#define CL_LUID_SIZE 8 + +/* cl_device_integer_dot_product_capabilities - bitfield */ +#define CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_PACKED (1 << 0) +#define CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT (1 << 1) + +#endif + /********************************************************************************************************/ /* CL_NO_PROTOTYPES implies CL_NO_CORE_PROTOTYPES: */ @@ -1812,6 +1859,18 @@ clEnqueueSVMMigrateMem(cl_command_queue command_queue, #endif +#ifdef CL_VERSION_3_1 + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetKernelSuggestedLocalWorkSize(cl_command_queue command_queue, + cl_kernel kernel, + cl_uint work_dim, + const size_t * global_work_offset, + const size_t * global_work_size, + size_t * suggested_local_work_size) CL_API_SUFFIX__VERSION_3_1; + +#endif + #ifdef CL_VERSION_1_2 /* Extension function access diff --git a/include/CL/cl_d3d10.h b/include/CL/cl_d3d10.h index 6b56c775bf8..a988d35da27 100644 --- a/include/CL/cl_d3d10.h +++ b/include/CL/cl_d3d10.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2023 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/CL/cl_d3d11.h b/include/CL/cl_d3d11.h index 384c8f428fc..d7f472613af 100644 --- a/include/CL/cl_d3d11.h +++ b/include/CL/cl_d3d11.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2023 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/CL/cl_dx9_media_sharing.h b/include/CL/cl_dx9_media_sharing.h index b079379d0a7..baf72a1578a 100644 --- a/include/CL/cl_dx9_media_sharing.h +++ b/include/CL/cl_dx9_media_sharing.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2023 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/CL/cl_dx9_media_sharing_intel.h b/include/CL/cl_dx9_media_sharing_intel.h index f6518d7f632..aa3679c7a20 100644 --- a/include/CL/cl_dx9_media_sharing_intel.h +++ b/include/CL/cl_dx9_media_sharing_intel.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2020 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/CL/cl_egl.h b/include/CL/cl_egl.h index 68aefec7619..8762b26ee58 100644 --- a/include/CL/cl_egl.h +++ b/include/CL/cl_egl.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2023 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/CL/cl_ext.h b/include/CL/cl_ext.h index 8858b2b9269..21d89fbc27c 100644 --- a/include/CL/cl_ext.h +++ b/include/CL/cl_ext.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2023 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -883,7 +883,7 @@ clLogMessagesToStderrAPPLE( "cl_khr_icd" -#define CL_KHR_ICD_EXTENSION_VERSION CL_MAKE_VERSION(2, 0, 0) +#define CL_KHR_ICD_EXTENSION_VERSION CL_MAKE_VERSION(2, 0, 1) /* cl_platform_info */ #define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920 @@ -944,6 +944,19 @@ clIcdSetPlatformDispatchDataKHR( #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */ +/*************************************************************** +* cl_khr_icd_unloadable +***************************************************************/ +#define cl_khr_icd_unloadable 1 +#define CL_KHR_ICD_UNLOADABLE_EXTENSION_NAME \ + "cl_khr_icd_unloadable" + + +#define CL_KHR_ICD_UNLOADABLE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + +/* cl_platform_info */ +#define CL_PLATFORM_UNLOADABLE_KHR 0x0921 + /*************************************************************** * cl_khr_il_program ***************************************************************/ @@ -4658,6 +4671,28 @@ typedef cl_bitfield cl_context_safety_properties_img; #endif /* defined(CL_ENABLE_BETA_EXTENSIONS) */ +/*************************************************************** +* cl_intel_kernel_allocations_info +***************************************************************/ +#define cl_intel_kernel_allocations_info 1 +#define CL_INTEL_KERNEL_ALLOCATIONS_INFO_EXTENSION_NAME \ + "cl_intel_kernel_allocations_info" + + +#define CL_INTEL_KERNEL_ALLOCATIONS_INFO_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + +/* type cl_unified_shared_memory_type_intel */ + +typedef struct _cl_kernel_allocation_info_intel { + void* base; + size_t size; + cl_unified_shared_memory_type_intel type; + cl_int arg_index; +} cl_kernel_allocation_info_intel; + +/* cl_kernel_workgroup_info */ +#define CL_KERNEL_ALLOCATIONS_INFO_INTEL 0x425A + /*************************************************************** * cl_qcom_perf_hint ***************************************************************/ diff --git a/include/CL/cl_ext_intel.h b/include/CL/cl_ext_intel.h index a7ae87a3400..d7dca17afa9 100644 --- a/include/CL/cl_ext_intel.h +++ b/include/CL/cl_ext_intel.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2020 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/CL/cl_function_types.h b/include/CL/cl_function_types.h index 124f53ba7ec..86fff253484 100644 --- a/include/CL/cl_function_types.h +++ b/include/CL/cl_function_types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 The Khronos Group Inc. + * Copyright (c) 2023-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1181,4 +1181,19 @@ clCreateImageWithProperties_fn CL_API_SUFFIX__VERSION_3_0; #endif /* CL_VERSION_3_0 */ +#ifdef CL_VERSION_3_1 + +typedef cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSize_t( + cl_command_queue command_queue, + cl_kernel kernel, + cl_uint work_dim, + const size_t* global_work_offset, + const size_t* global_work_size, + size_t* suggested_local_work_size) CL_API_SUFFIX__VERSION_3_1; + +typedef clGetKernelSuggestedLocalWorkSize_t * +clGetKernelSuggestedLocalWorkSize_fn CL_API_SUFFIX__VERSION_3_1; + +#endif /* CL_VERSION_3_1 */ + #endif /* OPENCL_CL_FUNCTION_TYPES_H_ */ diff --git a/include/CL/cl_gl.h b/include/CL/cl_gl.h index 552560f71c4..e4d869c1cef 100644 --- a/include/CL/cl_gl.h +++ b/include/CL/cl_gl.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2023 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/CL/cl_gl_ext.h b/include/CL/cl_gl_ext.h index b5da13eb670..8b83f6c17fe 100644 --- a/include/CL/cl_gl_ext.h +++ b/include/CL/cl_gl_ext.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2021 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/CL/cl_half.h b/include/CL/cl_half.h index ecc42233220..538300b8458 100644 --- a/include/CL/cl_half.h +++ b/include/CL/cl_half.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019-2020 The Khronos Group Inc. + * Copyright (c) 2019-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/CL/cl_icd.h b/include/CL/cl_icd.h index 346ab5aa9a3..7970cc085b2 100644 --- a/include/CL/cl_icd.h +++ b/include/CL/cl_icd.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019-2020 The Khronos Group Inc. + * Copyright (c) 2019-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -329,6 +329,13 @@ typedef struct _cl_icd_dispatch { void *clSetContextDestructorCallback; #endif + /* OpenCL 3.1 */ +#ifdef CL_VERSION_3_1 + clGetKernelSuggestedLocalWorkSize_t *clGetKernelSuggestedLocalWorkSize; +#else + void *clGetKernelSuggestedLocalWorkSize; +#endif + } cl_icd_dispatch; #ifdef __cplusplus diff --git a/include/CL/cl_layer.h b/include/CL/cl_layer.h index 245f7b53295..aa5768c3170 100644 --- a/include/CL/cl_layer.h +++ b/include/CL/cl_layer.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2023 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,10 +54,11 @@ extern "C" { "cl_loader_layers" -#define CL_LOADER_LAYERS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_LOADER_LAYERS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 1) typedef cl_uint cl_layer_info; typedef cl_uint cl_layer_api_version; +typedef cl_properties cl_layer_properties; /* cl_layer_info */ #define CL_LAYER_API_VERSION 0x4240 @@ -65,6 +66,7 @@ typedef cl_uint cl_layer_api_version; /* Misc API enums */ #define CL_LAYER_API_VERSION_100 100 +#define CL_LAYER_PROPERTIES_LIST_END ((cl_layer_properties)0) typedef cl_int CL_API_CALL @@ -87,6 +89,24 @@ clInitLayer_t( typedef clInitLayer_t * clInitLayer_fn ; +typedef cl_int CL_API_CALL +clInitLayerWithProperties_t( + cl_uint num_entries, + const cl_icd_dispatch* target_dispatch, + cl_uint* num_entries_ret, + const cl_icd_dispatch** layer_dispatch_ret, + const cl_layer_properties* properties); + +typedef clInitLayerWithProperties_t * +clInitLayerWithProperties_fn ; + +typedef cl_int CL_API_CALL +clDeinitLayer_t( + void ); + +typedef clDeinitLayer_t * +clDeinitLayer_fn ; + /* ** The function pointer typedefs prefixed with "pfn_" are provided for ** compatibility with earlier versions of the headers. New code is @@ -100,6 +120,12 @@ pfn_clGetLayerInfo ; typedef clInitLayer_t * pfn_clInitLayer ; +typedef clInitLayerWithProperties_t * +pfn_clInitLayerWithProperties ; + +typedef clDeinitLayer_t * +pfn_clDeinitLayer ; + #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) extern CL_API_ENTRY cl_int CL_API_CALL @@ -116,6 +142,18 @@ clInitLayer( cl_uint* num_entries_ret, const cl_icd_dispatch** layer_dispatch_ret) ; +extern CL_API_ENTRY cl_int CL_API_CALL +clInitLayerWithProperties( + cl_uint num_entries, + const cl_icd_dispatch* target_dispatch, + cl_uint* num_entries_ret, + const cl_icd_dispatch** layer_dispatch_ret, + const cl_layer_properties* properties) ; + +extern CL_API_ENTRY cl_int CL_API_CALL +clDeinitLayer( + void ) ; + #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */ #ifdef __cplusplus diff --git a/include/CL/cl_platform.h b/include/CL/cl_platform.h index caf0ad04fa9..df3434ea19d 100644 --- a/include/CL/cl_platform.h +++ b/include/CL/cl_platform.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2020 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,24 +23,20 @@ extern "C" { #endif -#if defined(_WIN32) - #if !defined(CL_API_ENTRY) - #define CL_API_ENTRY - #endif - #if !defined(CL_API_CALL) - #define CL_API_CALL __stdcall - #endif - #if !defined(CL_CALLBACK) - #define CL_CALLBACK __stdcall - #endif -#else - #if !defined(CL_API_ENTRY) - #define CL_API_ENTRY - #endif - #if !defined(CL_API_CALL) +#if !defined(CL_API_ENTRY) + #define CL_API_ENTRY +#endif +#if !defined(CL_API_CALL) + #if defined(_WIN32) && !defined(__aarch64__) && !defined(__arm64__) + #define CL_API_CALL __stdcall + #else #define CL_API_CALL #endif - #if !defined(CL_CALLBACK) +#endif +#if !defined(CL_CALLBACK) + #if defined(_WIN32) && !defined(__aarch64__) && !defined(__arm64__) + #define CL_CALLBACK __stdcall + #else #define CL_CALLBACK #endif #endif @@ -71,6 +67,7 @@ extern "C" { #define CL_API_SUFFIX__VERSION_2_1 CL_API_SUFFIX_COMMON #define CL_API_SUFFIX__VERSION_2_2 CL_API_SUFFIX_COMMON #define CL_API_SUFFIX__VERSION_3_0 CL_API_SUFFIX_COMMON +#define CL_API_SUFFIX__VERSION_3_1 CL_API_SUFFIX_COMMON #define CL_API_SUFFIX__EXPERIMENTAL CL_API_SUFFIX_COMMON diff --git a/include/CL/cl_va_api_media_sharing_intel.h b/include/CL/cl_va_api_media_sharing_intel.h index 9fb8863f24d..2b869472e4f 100644 --- a/include/CL/cl_va_api_media_sharing_intel.h +++ b/include/CL/cl_va_api_media_sharing_intel.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2023 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/CL/cl_version.h b/include/CL/cl_version.h index 3844938d548..5d18e7f2269 100644 --- a/include/CL/cl_version.h +++ b/include/CL/cl_version.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018-2020 The Khronos Group Inc. + * Copyright (c) 2018-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ /* Detect which version to target */ #if !defined(CL_TARGET_OPENCL_VERSION) -#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)") -#define CL_TARGET_OPENCL_VERSION 300 +#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 310 (OpenCL 3.1)") +#define CL_TARGET_OPENCL_VERSION 310 #endif #if CL_TARGET_OPENCL_VERSION != 100 && \ CL_TARGET_OPENCL_VERSION != 110 && \ @@ -28,14 +28,18 @@ CL_TARGET_OPENCL_VERSION != 200 && \ CL_TARGET_OPENCL_VERSION != 210 && \ CL_TARGET_OPENCL_VERSION != 220 && \ - CL_TARGET_OPENCL_VERSION != 300 -#pragma message("cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220, 300). Defaulting to 300 (OpenCL 3.0)") + CL_TARGET_OPENCL_VERSION != 300 && \ + CL_TARGET_OPENCL_VERSION != 310 +#pragma message("cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220, 300, 310). Defaulting to 310 (OpenCL 3.1)") #undef CL_TARGET_OPENCL_VERSION -#define CL_TARGET_OPENCL_VERSION 300 +#define CL_TARGET_OPENCL_VERSION 310 #endif /* OpenCL Version */ +#if CL_TARGET_OPENCL_VERSION >= 310 && !defined(CL_VERSION_3_1) +#define CL_VERSION_3_1 1 +#endif #if CL_TARGET_OPENCL_VERSION >= 300 && !defined(CL_VERSION_3_0) #define CL_VERSION_3_0 1 #endif diff --git a/include/CL/opencl.h b/include/CL/opencl.h index ef8dd1e032a..c700b7c4da5 100644 --- a/include/CL/opencl.h +++ b/include/CL/opencl.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2021 The Khronos Group Inc. + * Copyright (c) 2008-2026 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.