| 1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2008-2020 The Khronos Group Inc. |
| 3 |
* |
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
* you may not use this file except in compliance with the License. |
| 6 |
* You may obtain a copy of the License at |
| 7 |
* |
| 8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
* |
| 10 |
* Unless required by applicable law or agreed to in writing, software |
| 11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
* See the License for the specific language governing permissions and |
| 14 |
* limitations under the License. |
| 15 |
******************************************************************************/ |
| 16 |
|
| 17 |
#ifndef __OPENCL_CL_H |
| 18 |
#define __OPENCL_CL_H |
| 19 |
|
| 20 |
#include <CL/cl_version.h> |
| 21 |
#include <CL/cl_platform.h> |
| 22 |
|
| 23 |
#ifdef __cplusplus |
| 24 |
extern "C" { |
| 25 |
#endif |
| 26 |
|
| 27 |
#if defined(_WIN32) && defined(_MSC_VER) && __CL_HAS_ANON_STRUCT__ |
| 28 |
/* Disable warning C4201: nonstandard extension used : nameless struct/union */ |
| 29 |
#pragma warning( push ) |
| 30 |
#pragma warning( disable : 4201 ) |
| 31 |
#endif |
| 32 |
|
| 33 |
/******************************************************************************/ |
| 34 |
|
| 35 |
typedef struct _cl_platform_id * cl_platform_id; |
| 36 |
typedef struct _cl_device_id * cl_device_id; |
| 37 |
typedef struct _cl_context * cl_context; |
| 38 |
typedef struct _cl_command_queue * cl_command_queue; |
| 39 |
typedef struct _cl_mem * cl_mem; |
| 40 |
typedef struct _cl_program * cl_program; |
| 41 |
typedef struct _cl_kernel * cl_kernel; |
| 42 |
typedef struct _cl_event * cl_event; |
| 43 |
typedef struct _cl_sampler * cl_sampler; |
| 44 |
|
| 45 |
typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */ |
| 46 |
typedef cl_ulong cl_bitfield; |
| 47 |
typedef cl_ulong cl_properties; |
| 48 |
typedef cl_bitfield cl_device_type; |
| 49 |
typedef cl_uint cl_platform_info; |
| 50 |
typedef cl_uint cl_device_info; |
| 51 |
typedef cl_bitfield cl_device_fp_config; |
| 52 |
typedef cl_uint cl_device_mem_cache_type; |
| 53 |
typedef cl_uint cl_device_local_mem_type; |
| 54 |
typedef cl_bitfield cl_device_exec_capabilities; |
| 55 |
#ifdef CL_VERSION_2_0 |
| 56 |
typedef cl_bitfield cl_device_svm_capabilities; |
| 57 |
#endif |
| 58 |
typedef cl_bitfield cl_command_queue_properties; |
| 59 |
#ifdef CL_VERSION_1_2 |
| 60 |
typedef intptr_t cl_device_partition_property; |
| 61 |
typedef cl_bitfield cl_device_affinity_domain; |
| 62 |
#endif |
| 63 |
|
| 64 |
typedef intptr_t cl_context_properties; |
| 65 |
typedef cl_uint cl_context_info; |
| 66 |
#ifdef CL_VERSION_2_0 |
| 67 |
typedef cl_properties cl_queue_properties; |
| 68 |
#endif |
| 69 |
typedef cl_uint cl_command_queue_info; |
| 70 |
typedef cl_uint cl_channel_order; |
| 71 |
typedef cl_uint cl_channel_type; |
| 72 |
typedef cl_bitfield cl_mem_flags; |
| 73 |
#ifdef CL_VERSION_2_0 |
| 74 |
typedef cl_bitfield cl_svm_mem_flags; |
| 75 |
#endif |
| 76 |
typedef cl_uint cl_mem_object_type; |
| 77 |
typedef cl_uint cl_mem_info; |
| 78 |
#ifdef CL_VERSION_1_2 |
| 79 |
typedef cl_bitfield cl_mem_migration_flags; |
| 80 |
#endif |
| 81 |
typedef cl_uint cl_image_info; |
| 82 |
#ifdef CL_VERSION_1_1 |
| 83 |
typedef cl_uint cl_buffer_create_type; |
| 84 |
#endif |
| 85 |
typedef cl_uint cl_addressing_mode; |
| 86 |
typedef cl_uint cl_filter_mode; |
| 87 |
typedef cl_uint cl_sampler_info; |
| 88 |
typedef cl_bitfield cl_map_flags; |
| 89 |
#ifdef CL_VERSION_2_0 |
| 90 |
typedef intptr_t cl_pipe_properties; |
| 91 |
typedef cl_uint cl_pipe_info; |
| 92 |
#endif |
| 93 |
typedef cl_uint cl_program_info; |
| 94 |
typedef cl_uint cl_program_build_info; |
| 95 |
#ifdef CL_VERSION_1_2 |
| 96 |
typedef cl_uint cl_program_binary_type; |
| 97 |
#endif |
| 98 |
typedef cl_int cl_build_status; |
| 99 |
typedef cl_uint cl_kernel_info; |
| 100 |
#ifdef CL_VERSION_1_2 |
| 101 |
typedef cl_uint cl_kernel_arg_info; |
| 102 |
typedef cl_uint cl_kernel_arg_address_qualifier; |
| 103 |
typedef cl_uint cl_kernel_arg_access_qualifier; |
| 104 |
typedef cl_bitfield cl_kernel_arg_type_qualifier; |
| 105 |
#endif |
| 106 |
typedef cl_uint cl_kernel_work_group_info; |
| 107 |
#ifdef CL_VERSION_2_1 |
| 108 |
typedef cl_uint cl_kernel_sub_group_info; |
| 109 |
#endif |
| 110 |
typedef cl_uint cl_event_info; |
| 111 |
typedef cl_uint cl_command_type; |
| 112 |
typedef cl_uint cl_profiling_info; |
| 113 |
#ifdef CL_VERSION_2_0 |
| 114 |
typedef cl_properties cl_sampler_properties; |
| 115 |
typedef cl_uint cl_kernel_exec_info; |
| 116 |
#endif |
| 117 |
#ifdef CL_VERSION_3_0 |
| 118 |
typedef cl_bitfield cl_device_atomic_capabilities; |
| 119 |
typedef cl_bitfield cl_device_device_enqueue_capabilities; |
| 120 |
typedef cl_uint cl_khronos_vendor_id; |
| 121 |
typedef cl_properties cl_mem_properties; |
| 122 |
#endif |
| 123 |
typedef cl_uint cl_version; |
| 124 |
|
| 125 |
typedef struct _cl_image_format { |
| 126 |
cl_channel_order image_channel_order; |
| 127 |
cl_channel_type image_channel_data_type; |
| 128 |
} cl_image_format; |
| 129 |
|
| 130 |
#ifdef CL_VERSION_1_2 |
| 131 |
|
| 132 |
typedef struct _cl_image_desc { |
| 133 |
cl_mem_object_type image_type; |
| 134 |
size_t image_width; |
| 135 |
size_t image_height; |
| 136 |
size_t image_depth; |
| 137 |
size_t image_array_size; |
| 138 |
size_t image_row_pitch; |
| 139 |
size_t image_slice_pitch; |
| 140 |
cl_uint num_mip_levels; |
| 141 |
cl_uint num_samples; |
| 142 |
#if defined(CL_VERSION_2_0) && __CL_HAS_ANON_UNION__ |
| 143 |
__CL_ANON_UNION__ union { |
| 144 |
#endif |
| 145 |
cl_mem buffer; |
| 146 |
#if defined(CL_VERSION_2_0) && __CL_HAS_ANON_UNION__ |
| 147 |
cl_mem mem_object; |
| 148 |
}; |
| 149 |
#endif |
| 150 |
} cl_image_desc; |
| 151 |
|
| 152 |
#endif |
| 153 |
|
| 154 |
#ifdef CL_VERSION_1_1 |
| 155 |
|
| 156 |
typedef struct _cl_buffer_region { |
| 157 |
size_t origin; |
| 158 |
size_t size; |
| 159 |
} cl_buffer_region; |
| 160 |
|
| 161 |
#endif |
| 162 |
|
| 163 |
#ifdef CL_VERSION_3_0 |
| 164 |
|
| 165 |
#define CL_NAME_VERSION_MAX_NAME_SIZE 64 |
| 166 |
|
| 167 |
typedef struct _cl_name_version { |
| 168 |
cl_version version; |
| 169 |
char name[CL_NAME_VERSION_MAX_NAME_SIZE]; |
| 170 |
} cl_name_version; |
| 171 |
|
| 172 |
#endif |
| 173 |
|
| 174 |
/******************************************************************************/ |
| 175 |
|
| 176 |
/* Error Codes */ |
| 177 |
#define CL_SUCCESS 0 |
| 178 |
#define CL_DEVICE_NOT_FOUND -1 |
| 179 |
#define CL_DEVICE_NOT_AVAILABLE -2 |
| 180 |
#define CL_COMPILER_NOT_AVAILABLE -3 |
| 181 |
#define CL_MEM_OBJECT_ALLOCATION_FAILURE -4 |
| 182 |
#define CL_OUT_OF_RESOURCES -5 |
| 183 |
#define CL_OUT_OF_HOST_MEMORY -6 |
| 184 |
#define CL_PROFILING_INFO_NOT_AVAILABLE -7 |
| 185 |
#define CL_MEM_COPY_OVERLAP -8 |
| 186 |
#define CL_IMAGE_FORMAT_MISMATCH -9 |
| 187 |
#define CL_IMAGE_FORMAT_NOT_SUPPORTED -10 |
| 188 |
#define CL_BUILD_PROGRAM_FAILURE -11 |
| 189 |
#define CL_MAP_FAILURE -12 |
| 190 |
#ifdef CL_VERSION_1_1 |
| 191 |
#define CL_MISALIGNED_SUB_BUFFER_OFFSET -13 |
| 192 |
#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14 |
| 193 |
#endif |
| 194 |
#ifdef CL_VERSION_1_2 |
| 195 |
#define CL_COMPILE_PROGRAM_FAILURE -15 |
| 196 |
#define CL_LINKER_NOT_AVAILABLE -16 |
| 197 |
#define CL_LINK_PROGRAM_FAILURE -17 |
| 198 |
#define CL_DEVICE_PARTITION_FAILED -18 |
| 199 |
#define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19 |
| 200 |
#endif |
| 201 |
|
| 202 |
#define CL_INVALID_VALUE -30 |
| 203 |
#define CL_INVALID_DEVICE_TYPE -31 |
| 204 |
#define CL_INVALID_PLATFORM -32 |
| 205 |
#define CL_INVALID_DEVICE -33 |
| 206 |
#define CL_INVALID_CONTEXT -34 |
| 207 |
#define CL_INVALID_QUEUE_PROPERTIES -35 |
| 208 |
#define CL_INVALID_COMMAND_QUEUE -36 |
| 209 |
#define CL_INVALID_HOST_PTR -37 |
| 210 |
#define CL_INVALID_MEM_OBJECT -38 |
| 211 |
#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39 |
| 212 |
#define CL_INVALID_IMAGE_SIZE -40 |
| 213 |
#define CL_INVALID_SAMPLER -41 |
| 214 |
#define CL_INVALID_BINARY -42 |
| 215 |
#define CL_INVALID_BUILD_OPTIONS -43 |
| 216 |
#define CL_INVALID_PROGRAM -44 |
| 217 |
#define CL_INVALID_PROGRAM_EXECUTABLE -45 |
| 218 |
#define CL_INVALID_KERNEL_NAME -46 |
| 219 |
#define CL_INVALID_KERNEL_DEFINITION -47 |
| 220 |
#define CL_INVALID_KERNEL -48 |
| 221 |
#define CL_INVALID_ARG_INDEX -49 |
| 222 |
#define CL_INVALID_ARG_VALUE -50 |
| 223 |
#define CL_INVALID_ARG_SIZE -51 |
| 224 |
#define CL_INVALID_KERNEL_ARGS -52 |
| 225 |
#define CL_INVALID_WORK_DIMENSION -53 |
| 226 |
#define CL_INVALID_WORK_GROUP_SIZE -54 |
| 227 |
#define CL_INVALID_WORK_ITEM_SIZE -55 |
| 228 |
#define CL_INVALID_GLOBAL_OFFSET -56 |
| 229 |
#define CL_INVALID_EVENT_WAIT_LIST -57 |
| 230 |
#define CL_INVALID_EVENT -58 |
| 231 |
#define CL_INVALID_OPERATION -59 |
| 232 |
#define CL_INVALID_GL_OBJECT -60 |
| 233 |
#define CL_INVALID_BUFFER_SIZE -61 |
| 234 |
#define CL_INVALID_MIP_LEVEL -62 |
| 235 |
#define CL_INVALID_GLOBAL_WORK_SIZE -63 |
| 236 |
#ifdef CL_VERSION_1_1 |
| 237 |
#define CL_INVALID_PROPERTY -64 |
| 238 |
#endif |
| 239 |
#ifdef CL_VERSION_1_2 |
| 240 |
#define CL_INVALID_IMAGE_DESCRIPTOR -65 |
| 241 |
#define CL_INVALID_COMPILER_OPTIONS -66 |
| 242 |
#define CL_INVALID_LINKER_OPTIONS -67 |
| 243 |
#define CL_INVALID_DEVICE_PARTITION_COUNT -68 |
| 244 |
#endif |
| 245 |
#ifdef CL_VERSION_2_0 |
| 246 |
#define CL_INVALID_PIPE_SIZE -69 |
| 247 |
#define CL_INVALID_DEVICE_QUEUE -70 |
| 248 |
#endif |
| 249 |
#ifdef CL_VERSION_2_2 |
| 250 |
#define CL_INVALID_SPEC_ID -71 |
| 251 |
#define CL_MAX_SIZE_RESTRICTION_EXCEEDED -72 |
| 252 |
#endif |
| 253 |
|
| 254 |
|
| 255 |
/* cl_bool */ |
| 256 |
#define CL_FALSE 0 |
| 257 |
#define CL_TRUE 1 |
| 258 |
#ifdef CL_VERSION_1_2 |
| 259 |
#define CL_BLOCKING CL_TRUE |
| 260 |
#define CL_NON_BLOCKING CL_FALSE |
| 261 |
#endif |
| 262 |
|
| 263 |
/* cl_platform_info */ |
| 264 |
#define CL_PLATFORM_PROFILE 0x0900 |
| 265 |
#define CL_PLATFORM_VERSION 0x0901 |
| 266 |
#define CL_PLATFORM_NAME 0x0902 |
| 267 |
#define CL_PLATFORM_VENDOR 0x0903 |
| 268 |
#define CL_PLATFORM_EXTENSIONS 0x0904 |
| 269 |
#ifdef CL_VERSION_2_1 |
| 270 |
#define CL_PLATFORM_HOST_TIMER_RESOLUTION 0x0905 |
| 271 |
#endif |
| 272 |
#ifdef CL_VERSION_3_0 |
| 273 |
#define CL_PLATFORM_NUMERIC_VERSION 0x0906 |
| 274 |
#define CL_PLATFORM_EXTENSIONS_WITH_VERSION 0x0907 |
| 275 |
#endif |
| 276 |
|
| 277 |
/* cl_device_type - bitfield */ |
| 278 |
#define CL_DEVICE_TYPE_DEFAULT (1 << 0) |
| 279 |
#define CL_DEVICE_TYPE_CPU (1 << 1) |
| 280 |
#define CL_DEVICE_TYPE_GPU (1 << 2) |
| 281 |
#define CL_DEVICE_TYPE_ACCELERATOR (1 << 3) |
| 282 |
#ifdef CL_VERSION_1_2 |
| 283 |
#define CL_DEVICE_TYPE_CUSTOM (1 << 4) |
| 284 |
#endif |
| 285 |
#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF |
| 286 |
|
| 287 |
/* cl_device_info */ |
| 288 |
#define CL_DEVICE_TYPE 0x1000 |
| 289 |
#define CL_DEVICE_VENDOR_ID 0x1001 |
| 290 |
#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002 |
| 291 |
#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003 |
| 292 |
#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004 |
| 293 |
#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 |
| 294 |
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006 |
| 295 |
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007 |
| 296 |
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008 |
| 297 |
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009 |
| 298 |
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A |
| 299 |
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B |
| 300 |
#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C |
| 301 |
#define CL_DEVICE_ADDRESS_BITS 0x100D |
| 302 |
#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E |
| 303 |
#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F |
| 304 |
#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010 |
| 305 |
#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011 |
| 306 |
#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012 |
| 307 |
#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013 |
| 308 |
#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014 |
| 309 |
#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015 |
| 310 |
#define CL_DEVICE_IMAGE_SUPPORT 0x1016 |
| 311 |
#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017 |
| 312 |
#define CL_DEVICE_MAX_SAMPLERS 0x1018 |
| 313 |
#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019 |
| 314 |
#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A |
| 315 |
#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B |
| 316 |
#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C |
| 317 |
#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D |
| 318 |
#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E |
| 319 |
#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F |
| 320 |
#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020 |
| 321 |
#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021 |
| 322 |
#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022 |
| 323 |
#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023 |
| 324 |
#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024 |
| 325 |
#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025 |
| 326 |
#define CL_DEVICE_ENDIAN_LITTLE 0x1026 |
| 327 |
#define CL_DEVICE_AVAILABLE 0x1027 |
| 328 |
#define CL_DEVICE_COMPILER_AVAILABLE 0x1028 |
| 329 |
#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029 |
| 330 |
#define CL_DEVICE_QUEUE_PROPERTIES 0x102A /* deprecated */ |
| 331 |
#ifdef CL_VERSION_2_0 |
| 332 |
#define CL_DEVICE_QUEUE_ON_HOST_PROPERTIES 0x102A |
| 333 |
#endif |
| 334 |
#define CL_DEVICE_NAME 0x102B |
| 335 |
#define CL_DEVICE_VENDOR 0x102C |
| 336 |
#define CL_DRIVER_VERSION 0x102D |
| 337 |
#define CL_DEVICE_PROFILE 0x102E |
| 338 |
#define CL_DEVICE_VERSION 0x102F |
| 339 |
#define CL_DEVICE_EXTENSIONS 0x1030 |
| 340 |
#define CL_DEVICE_PLATFORM 0x1031 |
| 341 |
#ifdef CL_VERSION_1_2 |
| 342 |
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032 |
| 343 |
#endif |
| 344 |
/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG which is already defined in "cl_ext.h" */ |
| 345 |
#ifdef CL_VERSION_1_1 |
| 346 |
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034 |
| 347 |
#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */ |
| 348 |
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036 |
| 349 |
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037 |
| 350 |
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038 |
| 351 |
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039 |
| 352 |
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A |
| 353 |
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B |
| 354 |
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C |
| 355 |
#define CL_DEVICE_OPENCL_C_VERSION 0x103D |
| 356 |
#endif |
| 357 |
#ifdef CL_VERSION_1_2 |
| 358 |
#define CL_DEVICE_LINKER_AVAILABLE 0x103E |
| 359 |
#define CL_DEVICE_BUILT_IN_KERNELS 0x103F |
| 360 |
#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040 |
| 361 |
#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041 |
| 362 |
#define CL_DEVICE_PARENT_DEVICE 0x1042 |
| 363 |
#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043 |
| 364 |
#define CL_DEVICE_PARTITION_PROPERTIES 0x1044 |
| 365 |
#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045 |
| 366 |
#define CL_DEVICE_PARTITION_TYPE 0x1046 |
| 367 |
#define CL_DEVICE_REFERENCE_COUNT 0x1047 |
| 368 |
#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048 |
| 369 |
#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049 |
| 370 |
#endif |
| 371 |
#ifdef CL_VERSION_2_0 |
| 372 |
#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A |
| 373 |
#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B |
| 374 |
#define CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS 0x104C |
| 375 |
#define CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE 0x104D |
| 376 |
#define CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES 0x104E |
| 377 |
#define CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE 0x104F |
| 378 |
#define CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE 0x1050 |
| 379 |
#define CL_DEVICE_MAX_ON_DEVICE_QUEUES 0x1051 |
| 380 |
#define CL_DEVICE_MAX_ON_DEVICE_EVENTS 0x1052 |
| 381 |
#define CL_DEVICE_SVM_CAPABILITIES 0x1053 |
| 382 |
#define CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE 0x1054 |
| 383 |
#define CL_DEVICE_MAX_PIPE_ARGS 0x1055 |
| 384 |
#define CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS 0x1056 |
| 385 |
#define CL_DEVICE_PIPE_MAX_PACKET_SIZE 0x1057 |
| 386 |
#define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT 0x1058 |
| 387 |
#define CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT 0x1059 |
| 388 |
#define CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT 0x105A |
| 389 |
#endif |
| 390 |
#ifdef CL_VERSION_2_1 |
| 391 |
#define CL_DEVICE_IL_VERSION 0x105B |
| 392 |
#define CL_DEVICE_MAX_NUM_SUB_GROUPS 0x105C |
| 393 |
#define CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS 0x105D |
| 394 |
#endif |
| 395 |
#ifdef CL_VERSION_3_0 |
| 396 |
#define CL_DEVICE_NUMERIC_VERSION 0x105E |
| 397 |
#define CL_DEVICE_EXTENSIONS_WITH_VERSION 0x1060 |
| 398 |
#define CL_DEVICE_ILS_WITH_VERSION 0x1061 |
| 399 |
#define CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION 0x1062 |
| 400 |
#define CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES 0x1063 |
| 401 |
#define CL_DEVICE_ATOMIC_FENCE_CAPABILITIES 0x1064 |
| 402 |
#define CL_DEVICE_NON_UNIFORM_WORK_GROUP_SUPPORT 0x1065 |
| 403 |
#define CL_DEVICE_OPENCL_C_ALL_VERSIONS 0x1066 |
| 404 |
#define CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x1067 |
| 405 |
#define CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT 0x1068 |
| 406 |
#define CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT 0x1069 |
| 407 |
/* 0x106A to 0x106E - Reserved for upcoming KHR extension */ |
| 408 |
#define CL_DEVICE_OPENCL_C_FEATURES 0x106F |
| 409 |
#define CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES 0x1070 |
| 410 |
#define CL_DEVICE_PIPE_SUPPORT 0x1071 |
| 411 |
#define CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED 0x1072 |
| 412 |
#endif |
| 413 |
|
| 414 |
/* cl_device_fp_config - bitfield */ |
| 415 |
#define CL_FP_DENORM (1 << 0) |
| 416 |
#define CL_FP_INF_NAN (1 << 1) |
| 417 |
#define CL_FP_ROUND_TO_NEAREST (1 << 2) |
| 418 |
#define CL_FP_ROUND_TO_ZERO (1 << 3) |
| 419 |
#define CL_FP_ROUND_TO_INF (1 << 4) |
| 420 |
#define CL_FP_FMA (1 << 5) |
| 421 |
#ifdef CL_VERSION_1_1 |
| 422 |
#define CL_FP_SOFT_FLOAT (1 << 6) |
| 423 |
#endif |
| 424 |
#ifdef CL_VERSION_1_2 |
| 425 |
#define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7) |
| 426 |
#endif |
| 427 |
|
| 428 |
/* cl_device_mem_cache_type */ |
| 429 |
#define CL_NONE 0x0 |
| 430 |
#define CL_READ_ONLY_CACHE 0x1 |
| 431 |
#define CL_READ_WRITE_CACHE 0x2 |
| 432 |
|
| 433 |
/* cl_device_local_mem_type */ |
| 434 |
#define CL_LOCAL 0x1 |
| 435 |
#define CL_GLOBAL 0x2 |
| 436 |
|
| 437 |
/* cl_device_exec_capabilities - bitfield */ |
| 438 |
#define CL_EXEC_KERNEL (1 << 0) |
| 439 |
#define CL_EXEC_NATIVE_KERNEL (1 << 1) |
| 440 |
|
| 441 |
/* cl_command_queue_properties - bitfield */ |
| 442 |
#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0) |
| 443 |
#define CL_QUEUE_PROFILING_ENABLE (1 << 1) |
| 444 |
#ifdef CL_VERSION_2_0 |
| 445 |
#define CL_QUEUE_ON_DEVICE (1 << 2) |
| 446 |
#define CL_QUEUE_ON_DEVICE_DEFAULT (1 << 3) |
| 447 |
#endif |
| 448 |
|
| 449 |
/* cl_context_info */ |
| 450 |
#define CL_CONTEXT_REFERENCE_COUNT 0x1080 |
| 451 |
#define CL_CONTEXT_DEVICES 0x1081 |
| 452 |
#define CL_CONTEXT_PROPERTIES 0x1082 |
| 453 |
#ifdef CL_VERSION_1_1 |
| 454 |
#define CL_CONTEXT_NUM_DEVICES 0x1083 |
| 455 |
#endif |
| 456 |
|
| 457 |
/* cl_context_properties */ |
| 458 |
#define CL_CONTEXT_PLATFORM 0x1084 |
| 459 |
#ifdef CL_VERSION_1_2 |
| 460 |
#define CL_CONTEXT_INTEROP_USER_SYNC 0x1085 |
| 461 |
#endif |
| 462 |
|
| 463 |
#ifdef CL_VERSION_1_2 |
| 464 |
|
| 465 |
/* cl_device_partition_property */ |
| 466 |
#define CL_DEVICE_PARTITION_EQUALLY 0x1086 |
| 467 |
#define CL_DEVICE_PARTITION_BY_COUNTS 0x1087 |
| 468 |
#define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0 |
| 469 |
#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088 |
| 470 |
|
| 471 |
#endif |
| 472 |
|
| 473 |
#ifdef CL_VERSION_1_2 |
| 474 |
|
| 475 |
/* cl_device_affinity_domain */ |
| 476 |
#define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0) |
| 477 |
#define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1) |
| 478 |
#define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2) |
| 479 |
#define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3) |
| 480 |
#define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4) |
| 481 |
#define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5) |
| 482 |
|
| 483 |
#endif |
| 484 |
|
| 485 |
#ifdef CL_VERSION_2_0 |
| 486 |
|
| 487 |
/* cl_device_svm_capabilities */ |
| 488 |
#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0) |
| 489 |
#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1) |
| 490 |
#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2) |
| 491 |
#define CL_DEVICE_SVM_ATOMICS (1 << 3) |
| 492 |
|
| 493 |
#endif |
| 494 |
|
| 495 |
/* cl_command_queue_info */ |
| 496 |
#define CL_QUEUE_CONTEXT 0x1090 |
| 497 |
#define CL_QUEUE_DEVICE 0x1091 |
| 498 |
#define CL_QUEUE_REFERENCE_COUNT 0x1092 |
| 499 |
#define CL_QUEUE_PROPERTIES 0x1093 |
| 500 |
#ifdef CL_VERSION_2_0 |
| 501 |
#define CL_QUEUE_SIZE 0x1094 |
| 502 |
#endif |
| 503 |
#ifdef CL_VERSION_2_1 |
| 504 |
#define CL_QUEUE_DEVICE_DEFAULT 0x1095 |
| 505 |
#endif |
| 506 |
#ifdef CL_VERSION_3_0 |
| 507 |
#define CL_QUEUE_PROPERTIES_ARRAY 0x1098 |
| 508 |
#endif |
| 509 |
|
| 510 |
/* cl_mem_flags and cl_svm_mem_flags - bitfield */ |
| 511 |
#define CL_MEM_READ_WRITE (1 << 0) |
| 512 |
#define CL_MEM_WRITE_ONLY (1 << 1) |
| 513 |
#define CL_MEM_READ_ONLY (1 << 2) |
| 514 |
#define CL_MEM_USE_HOST_PTR (1 << 3) |
| 515 |
#define CL_MEM_ALLOC_HOST_PTR (1 << 4) |
| 516 |
#define CL_MEM_COPY_HOST_PTR (1 << 5) |
| 517 |
/* reserved (1 << 6) */ |
| 518 |
#ifdef CL_VERSION_1_2 |
| 519 |
#define CL_MEM_HOST_WRITE_ONLY (1 << 7) |
| 520 |
#define CL_MEM_HOST_READ_ONLY (1 << 8) |
| 521 |
#define CL_MEM_HOST_NO_ACCESS (1 << 9) |
| 522 |
#endif |
| 523 |
#ifdef CL_VERSION_2_0 |
| 524 |
#define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10) /* used by cl_svm_mem_flags only */ |
| 525 |
#define CL_MEM_SVM_ATOMICS (1 << 11) /* used by cl_svm_mem_flags only */ |
| 526 |
#define CL_MEM_KERNEL_READ_AND_WRITE (1 << 12) |
| 527 |
#endif |
| 528 |
|
| 529 |
#ifdef CL_VERSION_1_2 |
| 530 |
|
| 531 |
/* cl_mem_migration_flags - bitfield */ |
| 532 |
#define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0) |
| 533 |
#define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1) |
| 534 |
|
| 535 |
#endif |
| 536 |
|
| 537 |
/* cl_channel_order */ |
| 538 |
#define CL_R 0x10B0 |
| 539 |
#define CL_A 0x10B1 |
| 540 |
#define CL_RG 0x10B2 |
| 541 |
#define CL_RA 0x10B3 |
| 542 |
#define CL_RGB 0x10B4 |
| 543 |
#define CL_RGBA 0x10B5 |
| 544 |
#define CL_BGRA 0x10B6 |
| 545 |
#define CL_ARGB 0x10B7 |
| 546 |
#define CL_INTENSITY 0x10B8 |
| 547 |
#define CL_LUMINANCE 0x10B9 |
| 548 |
#ifdef CL_VERSION_1_1 |
| 549 |
#define CL_Rx 0x10BA |
| 550 |
#define CL_RGx 0x10BB |
| 551 |
#define CL_RGBx 0x10BC |
| 552 |
#endif |
| 553 |
#ifdef CL_VERSION_2_0 |
| 554 |
#define CL_DEPTH 0x10BD |
| 555 |
#define CL_sRGB 0x10BF |
| 556 |
#define CL_sRGBx 0x10C0 |
| 557 |
#define CL_sRGBA 0x10C1 |
| 558 |
#define CL_sBGRA 0x10C2 |
| 559 |
#define CL_ABGR 0x10C3 |
| 560 |
#endif |
| 561 |
|
| 562 |
/* cl_channel_type */ |
| 563 |
#define CL_SNORM_INT8 0x10D0 |
| 564 |
#define CL_SNORM_INT16 0x10D1 |
| 565 |
#define CL_UNORM_INT8 0x10D2 |
| 566 |
#define CL_UNORM_INT16 0x10D3 |
| 567 |
#define CL_UNORM_SHORT_565 0x10D4 |
| 568 |
#define CL_UNORM_SHORT_555 0x10D5 |
| 569 |
#define CL_UNORM_INT_101010 0x10D6 |
| 570 |
#define CL_SIGNED_INT8 0x10D7 |
| 571 |
#define CL_SIGNED_INT16 0x10D8 |
| 572 |
#define CL_SIGNED_INT32 0x10D9 |
| 573 |
#define CL_UNSIGNED_INT8 0x10DA |
| 574 |
#define CL_UNSIGNED_INT16 0x10DB |
| 575 |
#define CL_UNSIGNED_INT32 0x10DC |
| 576 |
#define CL_HALF_FLOAT 0x10DD |
| 577 |
#define CL_FLOAT 0x10DE |
| 578 |
#ifdef CL_VERSION_2_1 |
| 579 |
#define CL_UNORM_INT_101010_2 0x10E0 |
| 580 |
#endif |
| 581 |
|
| 582 |
/* cl_mem_object_type */ |
| 583 |
#define CL_MEM_OBJECT_BUFFER 0x10F0 |
| 584 |
#define CL_MEM_OBJECT_IMAGE2D 0x10F1 |
| 585 |
#define CL_MEM_OBJECT_IMAGE3D 0x10F2 |
| 586 |
#ifdef CL_VERSION_1_2 |
| 587 |
#define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3 |
| 588 |
#define CL_MEM_OBJECT_IMAGE1D 0x10F4 |
| 589 |
#define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5 |
| 590 |
#define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6 |
| 591 |
#endif |
| 592 |
#ifdef CL_VERSION_2_0 |
| 593 |
#define CL_MEM_OBJECT_PIPE 0x10F7 |
| 594 |
#endif |
| 595 |
|
| 596 |
/* cl_mem_info */ |
| 597 |
#define CL_MEM_TYPE 0x1100 |
| 598 |
#define CL_MEM_FLAGS 0x1101 |
| 599 |
#define CL_MEM_SIZE 0x1102 |
| 600 |
#define CL_MEM_HOST_PTR 0x1103 |
| 601 |
#define CL_MEM_MAP_COUNT 0x1104 |
| 602 |
#define CL_MEM_REFERENCE_COUNT 0x1105 |
| 603 |
#define CL_MEM_CONTEXT 0x1106 |
| 604 |
#ifdef CL_VERSION_1_1 |
| 605 |
#define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107 |
| 606 |
#define CL_MEM_OFFSET 0x1108 |
| 607 |
#endif |
| 608 |
#ifdef CL_VERSION_2_0 |
| 609 |
#define CL_MEM_USES_SVM_POINTER 0x1109 |
| 610 |
#endif |
| 611 |
#ifdef CL_VERSION_3_0 |
| 612 |
#define CL_MEM_PROPERTIES 0x110A |
| 613 |
#endif |
| 614 |
|
| 615 |
/* cl_image_info */ |
| 616 |
#define CL_IMAGE_FORMAT 0x1110 |
| 617 |
#define CL_IMAGE_ELEMENT_SIZE 0x1111 |
| 618 |
#define CL_IMAGE_ROW_PITCH 0x1112 |
| 619 |
#define CL_IMAGE_SLICE_PITCH 0x1113 |
| 620 |
#define CL_IMAGE_WIDTH 0x1114 |
| 621 |
#define CL_IMAGE_HEIGHT 0x1115 |
| 622 |
#define CL_IMAGE_DEPTH 0x1116 |
| 623 |
#ifdef CL_VERSION_1_2 |
| 624 |
#define CL_IMAGE_ARRAY_SIZE 0x1117 |
| 625 |
#define CL_IMAGE_BUFFER 0x1118 |
| 626 |
#define CL_IMAGE_NUM_MIP_LEVELS 0x1119 |
| 627 |
#define CL_IMAGE_NUM_SAMPLES 0x111A |
| 628 |
#endif |
| 629 |
|
| 630 |
|
| 631 |
/* cl_pipe_info */ |
| 632 |
#ifdef CL_VERSION_2_0 |
| 633 |
#define CL_PIPE_PACKET_SIZE 0x1120 |
| 634 |
#define CL_PIPE_MAX_PACKETS 0x1121 |
| 635 |
#endif |
| 636 |
#ifdef CL_VERSION_3_0 |
| 637 |
#define CL_PIPE_PROPERTIES 0x1122 |
| 638 |
#endif |
| 639 |
|
| 640 |
/* cl_addressing_mode */ |
| 641 |
#define CL_ADDRESS_NONE 0x1130 |
| 642 |
#define CL_ADDRESS_CLAMP_TO_EDGE 0x1131 |
| 643 |
#define CL_ADDRESS_CLAMP 0x1132 |
| 644 |
#define CL_ADDRESS_REPEAT 0x1133 |
| 645 |
#ifdef CL_VERSION_1_1 |
| 646 |
#define CL_ADDRESS_MIRRORED_REPEAT 0x1134 |
| 647 |
#endif |
| 648 |
|
| 649 |
/* cl_filter_mode */ |
| 650 |
#define CL_FILTER_NEAREST 0x1140 |
| 651 |
#define CL_FILTER_LINEAR 0x1141 |
| 652 |
|
| 653 |
/* cl_sampler_info */ |
| 654 |
#define CL_SAMPLER_REFERENCE_COUNT 0x1150 |
| 655 |
#define CL_SAMPLER_CONTEXT 0x1151 |
| 656 |
#define CL_SAMPLER_NORMALIZED_COORDS 0x1152 |
| 657 |
#define CL_SAMPLER_ADDRESSING_MODE 0x1153 |
| 658 |
#define CL_SAMPLER_FILTER_MODE 0x1154 |
| 659 |
#ifdef CL_VERSION_2_0 |
| 660 |
/* These enumerants are for the cl_khr_mipmap_image extension. |
| 661 |
They have since been added to cl_ext.h with an appropriate |
| 662 |
KHR suffix, but are left here for backwards compatibility. */ |
| 663 |
#define CL_SAMPLER_MIP_FILTER_MODE 0x1155 |
| 664 |
#define CL_SAMPLER_LOD_MIN 0x1156 |
| 665 |
#define CL_SAMPLER_LOD_MAX 0x1157 |
| 666 |
#endif |
| 667 |
#ifdef CL_VERSION_3_0 |
| 668 |
#define CL_SAMPLER_PROPERTIES 0x1158 |
| 669 |
#endif |
| 670 |
|
| 671 |
/* cl_map_flags - bitfield */ |
| 672 |
#define CL_MAP_READ (1 << 0) |
| 673 |
#define CL_MAP_WRITE (1 << 1) |
| 674 |
#ifdef CL_VERSION_1_2 |
| 675 |
#define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2) |
| 676 |
#endif |
| 677 |
|
| 678 |
/* cl_program_info */ |
| 679 |
#define CL_PROGRAM_REFERENCE_COUNT 0x1160 |
| 680 |
#define CL_PROGRAM_CONTEXT 0x1161 |
| 681 |
#define CL_PROGRAM_NUM_DEVICES 0x1162 |
| 682 |
#define CL_PROGRAM_DEVICES 0x1163 |
| 683 |
#define CL_PROGRAM_SOURCE 0x1164 |
| 684 |
#define CL_PROGRAM_BINARY_SIZES 0x1165 |
| 685 |
#define CL_PROGRAM_BINARIES 0x1166 |
| 686 |
#ifdef CL_VERSION_1_2 |
| 687 |
#define CL_PROGRAM_NUM_KERNELS 0x1167 |
| 688 |
#define CL_PROGRAM_KERNEL_NAMES 0x1168 |
| 689 |
#endif |
| 690 |
#ifdef CL_VERSION_2_1 |
| 691 |
#define CL_PROGRAM_IL 0x1169 |
| 692 |
#endif |
| 693 |
#ifdef CL_VERSION_2_2 |
| 694 |
#define CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT 0x116A |
| 695 |
#define CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT 0x116B |
| 696 |
#endif |
| 697 |
|
| 698 |
/* cl_program_build_info */ |
| 699 |
#define CL_PROGRAM_BUILD_STATUS 0x1181 |
| 700 |
#define CL_PROGRAM_BUILD_OPTIONS 0x1182 |
| 701 |
#define CL_PROGRAM_BUILD_LOG 0x1183 |
| 702 |
#ifdef CL_VERSION_1_2 |
| 703 |
#define CL_PROGRAM_BINARY_TYPE 0x1184 |
| 704 |
#endif |
| 705 |
#ifdef CL_VERSION_2_0 |
| 706 |
#define CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE 0x1185 |
| 707 |
#endif |
| 708 |
|
| 709 |
#ifdef CL_VERSION_1_2 |
| 710 |
|
| 711 |
/* cl_program_binary_type */ |
| 712 |
#define CL_PROGRAM_BINARY_TYPE_NONE 0x0 |
| 713 |
#define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1 |
| 714 |
#define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2 |
| 715 |
#define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4 |
| 716 |
|
| 717 |
#endif |
| 718 |
|
| 719 |
/* cl_build_status */ |
| 720 |
#define CL_BUILD_SUCCESS 0 |
| 721 |
#define CL_BUILD_NONE -1 |
| 722 |
#define CL_BUILD_ERROR -2 |
| 723 |
#define CL_BUILD_IN_PROGRESS -3 |
| 724 |
|
| 725 |
/* cl_kernel_info */ |
| 726 |
#define CL_KERNEL_FUNCTION_NAME 0x1190 |
| 727 |
#define CL_KERNEL_NUM_ARGS 0x1191 |
| 728 |
#define CL_KERNEL_REFERENCE_COUNT 0x1192 |
| 729 |
#define CL_KERNEL_CONTEXT 0x1193 |
| 730 |
#define CL_KERNEL_PROGRAM 0x1194 |
| 731 |
#ifdef CL_VERSION_1_2 |
| 732 |
#define CL_KERNEL_ATTRIBUTES 0x1195 |
| 733 |
#endif |
| 734 |
|
| 735 |
#ifdef CL_VERSION_1_2 |
| 736 |
|
| 737 |
/* cl_kernel_arg_info */ |
| 738 |
#define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196 |
| 739 |
#define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197 |
| 740 |
#define CL_KERNEL_ARG_TYPE_NAME 0x1198 |
| 741 |
#define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199 |
| 742 |
#define CL_KERNEL_ARG_NAME 0x119A |
| 743 |
|
| 744 |
#endif |
| 745 |
|
| 746 |
#ifdef CL_VERSION_1_2 |
| 747 |
|
| 748 |
/* cl_kernel_arg_address_qualifier */ |
| 749 |
#define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B |
| 750 |
#define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C |
| 751 |
#define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D |
| 752 |
#define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E |
| 753 |
|
| 754 |
#endif |
| 755 |
|
| 756 |
#ifdef CL_VERSION_1_2 |
| 757 |
|
| 758 |
/* cl_kernel_arg_access_qualifier */ |
| 759 |
#define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0 |
| 760 |
#define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1 |
| 761 |
#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2 |
| 762 |
#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3 |
| 763 |
|
| 764 |
#endif |
| 765 |
|
| 766 |
#ifdef CL_VERSION_1_2 |
| 767 |
|
| 768 |
/* cl_kernel_arg_type_qualifier */ |
| 769 |
#define CL_KERNEL_ARG_TYPE_NONE 0 |
| 770 |
#define CL_KERNEL_ARG_TYPE_CONST (1 << 0) |
| 771 |
#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1) |
| 772 |
#define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2) |
| 773 |
#ifdef CL_VERSION_2_0 |
| 774 |
#define CL_KERNEL_ARG_TYPE_PIPE (1 << 3) |
| 775 |
#endif |
| 776 |
|
| 777 |
#endif |
| 778 |
|
| 779 |
/* cl_kernel_work_group_info */ |
| 780 |
#define CL_KERNEL_WORK_GROUP_SIZE 0x11B0 |
| 781 |
#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1 |
| 782 |
#define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2 |
| 783 |
#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3 |
| 784 |
#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4 |
| 785 |
#ifdef CL_VERSION_1_2 |
| 786 |
#define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5 |
| 787 |
#endif |
| 788 |
|
| 789 |
#ifdef CL_VERSION_2_1 |
| 790 |
|
| 791 |
/* cl_kernel_sub_group_info */ |
| 792 |
#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE 0x2033 |
| 793 |
#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE 0x2034 |
| 794 |
#define CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT 0x11B8 |
| 795 |
#define CL_KERNEL_MAX_NUM_SUB_GROUPS 0x11B9 |
| 796 |
#define CL_KERNEL_COMPILE_NUM_SUB_GROUPS 0x11BA |
| 797 |
|
| 798 |
#endif |
| 799 |
|
| 800 |
#ifdef CL_VERSION_2_0 |
| 801 |
|
| 802 |
/* cl_kernel_exec_info */ |
| 803 |
#define CL_KERNEL_EXEC_INFO_SVM_PTRS 0x11B6 |
| 804 |
#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM 0x11B7 |
| 805 |
|
| 806 |
#endif |
| 807 |
|
| 808 |
/* cl_event_info */ |
| 809 |
#define CL_EVENT_COMMAND_QUEUE 0x11D0 |
| 810 |
#define CL_EVENT_COMMAND_TYPE 0x11D1 |
| 811 |
#define CL_EVENT_REFERENCE_COUNT 0x11D2 |
| 812 |
#define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3 |
| 813 |
#ifdef CL_VERSION_1_1 |
| 814 |
#define CL_EVENT_CONTEXT 0x11D4 |
| 815 |
#endif |
| 816 |
|
| 817 |
/* cl_command_type */ |
| 818 |
#define CL_COMMAND_NDRANGE_KERNEL 0x11F0 |
| 819 |
#define CL_COMMAND_TASK 0x11F1 |
| 820 |
#define CL_COMMAND_NATIVE_KERNEL 0x11F2 |
| 821 |
#define CL_COMMAND_READ_BUFFER 0x11F3 |
| 822 |
#define CL_COMMAND_WRITE_BUFFER 0x11F4 |
| 823 |
#define CL_COMMAND_COPY_BUFFER 0x11F5 |
| 824 |
#define CL_COMMAND_READ_IMAGE 0x11F6 |
| 825 |
#define CL_COMMAND_WRITE_IMAGE 0x11F7 |
| 826 |
#define CL_COMMAND_COPY_IMAGE 0x11F8 |
| 827 |
#define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9 |
| 828 |
#define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA |
| 829 |
#define CL_COMMAND_MAP_BUFFER 0x11FB |
| 830 |
#define CL_COMMAND_MAP_IMAGE 0x11FC |
| 831 |
#define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD |
| 832 |
#define CL_COMMAND_MARKER 0x11FE |
| 833 |
#define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF |
| 834 |
#define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200 |
| 835 |
#ifdef CL_VERSION_1_1 |
| 836 |
#define CL_COMMAND_READ_BUFFER_RECT 0x1201 |
| 837 |
#define CL_COMMAND_WRITE_BUFFER_RECT 0x1202 |
| 838 |
#define CL_COMMAND_COPY_BUFFER_RECT 0x1203 |
| 839 |
#define CL_COMMAND_USER 0x1204 |
| 840 |
#endif |
| 841 |
#ifdef CL_VERSION_1_2 |
| 842 |
#define CL_COMMAND_BARRIER 0x1205 |
| 843 |
#define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206 |
| 844 |
#define CL_COMMAND_FILL_BUFFER 0x1207 |
| 845 |
#define CL_COMMAND_FILL_IMAGE 0x1208 |
| 846 |
#endif |
| 847 |
#ifdef CL_VERSION_2_0 |
| 848 |
#define CL_COMMAND_SVM_FREE 0x1209 |
| 849 |
#define CL_COMMAND_SVM_MEMCPY 0x120A |
| 850 |
#define CL_COMMAND_SVM_MEMFILL 0x120B |
| 851 |
#define CL_COMMAND_SVM_MAP 0x120C |
| 852 |
#define CL_COMMAND_SVM_UNMAP 0x120D |
| 853 |
#endif |
| 854 |
#ifdef CL_VERSION_3_0 |
| 855 |
#define CL_COMMAND_SVM_MIGRATE_MEM 0x120E |
| 856 |
#endif |
| 857 |
|
| 858 |
/* command execution status */ |
| 859 |
#define CL_COMPLETE 0x0 |
| 860 |
#define CL_RUNNING 0x1 |
| 861 |
#define CL_SUBMITTED 0x2 |
| 862 |
#define CL_QUEUED 0x3 |
| 863 |
|
| 864 |
/* cl_buffer_create_type */ |
| 865 |
#ifdef CL_VERSION_1_1 |
| 866 |
#define CL_BUFFER_CREATE_TYPE_REGION 0x1220 |
| 867 |
#endif |
| 868 |
|
| 869 |
/* cl_profiling_info */ |
| 870 |
#define CL_PROFILING_COMMAND_QUEUED 0x1280 |
| 871 |
#define CL_PROFILING_COMMAND_SUBMIT 0x1281 |
| 872 |
#define CL_PROFILING_COMMAND_START 0x1282 |
| 873 |
#define CL_PROFILING_COMMAND_END 0x1283 |
| 874 |
#ifdef CL_VERSION_2_0 |
| 875 |
#define CL_PROFILING_COMMAND_COMPLETE 0x1284 |
| 876 |
#endif |
| 877 |
|
| 878 |
/* cl_device_atomic_capabilities - bitfield */ |
| 879 |
#ifdef CL_VERSION_3_0 |
| 880 |
#define CL_DEVICE_ATOMIC_ORDER_RELAXED (1 << 0) |
| 881 |
#define CL_DEVICE_ATOMIC_ORDER_ACQ_REL (1 << 1) |
| 882 |
#define CL_DEVICE_ATOMIC_ORDER_SEQ_CST (1 << 2) |
| 883 |
#define CL_DEVICE_ATOMIC_SCOPE_WORK_ITEM (1 << 3) |
| 884 |
#define CL_DEVICE_ATOMIC_SCOPE_WORK_GROUP (1 << 4) |
| 885 |
#define CL_DEVICE_ATOMIC_SCOPE_DEVICE (1 << 5) |
| 886 |
#define CL_DEVICE_ATOMIC_SCOPE_ALL_DEVICES (1 << 6) |
| 887 |
#endif |
| 888 |
|
| 889 |
/* cl_device_device_enqueue_capabilities - bitfield */ |
| 890 |
#ifdef CL_VERSION_3_0 |
| 891 |
#define CL_DEVICE_QUEUE_SUPPORTED (1 << 0) |
| 892 |
#define CL_DEVICE_QUEUE_REPLACEABLE_DEFAULT (1 << 1) |
| 893 |
#endif |
| 894 |
|
| 895 |
/* cl_khronos_vendor_id */ |
| 896 |
#define CL_KHRONOS_VENDOR_ID_CODEPLAY 0x10004 |
| 897 |
|
| 898 |
/* cl_version */ |
| 899 |
#define CL_VERSION_MAJOR_BITS (10) |
| 900 |
#define CL_VERSION_MINOR_BITS (10) |
| 901 |
#define CL_VERSION_PATCH_BITS (12) |
| 902 |
|
| 903 |
#define CL_VERSION_MAJOR_MASK ((1 << CL_VERSION_MAJOR_BITS) - 1) |
| 904 |
#define CL_VERSION_MINOR_MASK ((1 << CL_VERSION_MINOR_BITS) - 1) |
| 905 |
#define CL_VERSION_PATCH_MASK ((1 << CL_VERSION_PATCH_BITS) - 1) |
| 906 |
|
| 907 |
#define CL_VERSION_MAJOR(version) \ |
| 908 |
((version) >> (CL_VERSION_MINOR_BITS + CL_VERSION_PATCH_BITS)) |
| 909 |
|
| 910 |
#define CL_VERSION_MINOR(version) \ |
| 911 |
(((version) >> CL_VERSION_PATCH_BITS) & CL_VERSION_MINOR_MASK) |
| 912 |
|
| 913 |
#define CL_VERSION_PATCH(version) ((version) & CL_VERSION_PATCH_MASK) |
| 914 |
|
| 915 |
#define CL_MAKE_VERSION(major, minor, patch) \ |
| 916 |
((((major) & CL_VERSION_MAJOR_MASK) \ |
| 917 |
<< (CL_VERSION_MINOR_BITS + CL_VERSION_PATCH_BITS)) | \ |
| 918 |
(((minor) & CL_VERSION_MINOR_MASK) << CL_VERSION_PATCH_BITS) | \ |
| 919 |
((patch) & CL_VERSION_PATCH_MASK)) |
| 920 |
|
| 921 |
/********************************************************************************************************/ |
| 922 |
|
| 923 |
/* CL_NO_PROTOTYPES implies CL_NO_CORE_PROTOTYPES: */ |
| 924 |
#if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_CORE_PROTOTYPES) |
| 925 |
#define CL_NO_CORE_PROTOTYPES |
| 926 |
#endif |
| 927 |
|
| 928 |
#if !defined(CL_NO_CORE_PROTOTYPES) |
| 929 |
|
| 930 |
/* Platform API */ |
| 931 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 932 |
clGetPlatformIDs(cl_uint num_entries, |
| 933 |
cl_platform_id * platforms, |
| 934 |
cl_uint * num_platforms) CL_API_SUFFIX__VERSION_1_0; |
| 935 |
|
| 936 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 937 |
clGetPlatformInfo(cl_platform_id platform, |
| 938 |
cl_platform_info param_name, |
| 939 |
size_t param_value_size, |
| 940 |
void * param_value, |
| 941 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
| 942 |
|
| 943 |
/* Device APIs */ |
| 944 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 945 |
clGetDeviceIDs(cl_platform_id platform, |
| 946 |
cl_device_type device_type, |
| 947 |
cl_uint num_entries, |
| 948 |
cl_device_id * devices, |
| 949 |
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0; |
| 950 |
|
| 951 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 952 |
clGetDeviceInfo(cl_device_id device, |
| 953 |
cl_device_info param_name, |
| 954 |
size_t param_value_size, |
| 955 |
void * param_value, |
| 956 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
| 957 |
|
| 958 |
#ifdef CL_VERSION_1_2 |
| 959 |
|
| 960 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 961 |
clCreateSubDevices(cl_device_id in_device, |
| 962 |
const cl_device_partition_property * properties, |
| 963 |
cl_uint num_devices, |
| 964 |
cl_device_id * out_devices, |
| 965 |
cl_uint * num_devices_ret) CL_API_SUFFIX__VERSION_1_2; |
| 966 |
|
| 967 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 968 |
clRetainDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2; |
| 969 |
|
| 970 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 971 |
clReleaseDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2; |
| 972 |
|
| 973 |
#endif |
| 974 |
|
| 975 |
#ifdef CL_VERSION_2_1 |
| 976 |
|
| 977 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 978 |
clSetDefaultDeviceCommandQueue(cl_context context, |
| 979 |
cl_device_id device, |
| 980 |
cl_command_queue command_queue) CL_API_SUFFIX__VERSION_2_1; |
| 981 |
|
| 982 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 983 |
clGetDeviceAndHostTimer(cl_device_id device, |
| 984 |
cl_ulong* device_timestamp, |
| 985 |
cl_ulong* host_timestamp) CL_API_SUFFIX__VERSION_2_1; |
| 986 |
|
| 987 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 988 |
clGetHostTimer(cl_device_id device, |
| 989 |
cl_ulong * host_timestamp) CL_API_SUFFIX__VERSION_2_1; |
| 990 |
|
| 991 |
#endif |
| 992 |
|
| 993 |
/* Context APIs */ |
| 994 |
extern CL_API_ENTRY cl_context CL_API_CALL |
| 995 |
clCreateContext(const cl_context_properties * properties, |
| 996 |
cl_uint num_devices, |
| 997 |
const cl_device_id * devices, |
| 998 |
void (CL_CALLBACK * pfn_notify)(const char * errinfo, |
| 999 |
const void * private_info, |
| 1000 |
size_t cb, |
| 1001 |
void * user_data), |
| 1002 |
void * user_data, |
| 1003 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1004 |
|
| 1005 |
extern CL_API_ENTRY cl_context CL_API_CALL |
| 1006 |
clCreateContextFromType(const cl_context_properties * properties, |
| 1007 |
cl_device_type device_type, |
| 1008 |
void (CL_CALLBACK * pfn_notify)(const char * errinfo, |
| 1009 |
const void * private_info, |
| 1010 |
size_t cb, |
| 1011 |
void * user_data), |
| 1012 |
void * user_data, |
| 1013 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1014 |
|
| 1015 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1016 |
clRetainContext(cl_context context) CL_API_SUFFIX__VERSION_1_0; |
| 1017 |
|
| 1018 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1019 |
clReleaseContext(cl_context context) CL_API_SUFFIX__VERSION_1_0; |
| 1020 |
|
| 1021 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1022 |
clGetContextInfo(cl_context context, |
| 1023 |
cl_context_info param_name, |
| 1024 |
size_t param_value_size, |
| 1025 |
void * param_value, |
| 1026 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1027 |
|
| 1028 |
#ifdef CL_VERSION_3_0 |
| 1029 |
|
| 1030 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1031 |
clSetContextDestructorCallback(cl_context context, |
| 1032 |
void (CL_CALLBACK* pfn_notify)(cl_context context, |
| 1033 |
void* user_data), |
| 1034 |
void* user_data) CL_API_SUFFIX__VERSION_3_0; |
| 1035 |
|
| 1036 |
#endif |
| 1037 |
|
| 1038 |
/* Command Queue APIs */ |
| 1039 |
|
| 1040 |
#ifdef CL_VERSION_2_0 |
| 1041 |
|
| 1042 |
extern CL_API_ENTRY cl_command_queue CL_API_CALL |
| 1043 |
clCreateCommandQueueWithProperties(cl_context context, |
| 1044 |
cl_device_id device, |
| 1045 |
const cl_queue_properties * properties, |
| 1046 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0; |
| 1047 |
|
| 1048 |
#endif |
| 1049 |
|
| 1050 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1051 |
clRetainCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; |
| 1052 |
|
| 1053 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1054 |
clReleaseCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; |
| 1055 |
|
| 1056 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1057 |
clGetCommandQueueInfo(cl_command_queue command_queue, |
| 1058 |
cl_command_queue_info param_name, |
| 1059 |
size_t param_value_size, |
| 1060 |
void * param_value, |
| 1061 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1062 |
|
| 1063 |
/* Memory Object APIs */ |
| 1064 |
extern CL_API_ENTRY cl_mem CL_API_CALL |
| 1065 |
clCreateBuffer(cl_context context, |
| 1066 |
cl_mem_flags flags, |
| 1067 |
size_t size, |
| 1068 |
void * host_ptr, |
| 1069 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1070 |
|
| 1071 |
#ifdef CL_VERSION_1_1 |
| 1072 |
|
| 1073 |
extern CL_API_ENTRY cl_mem CL_API_CALL |
| 1074 |
clCreateSubBuffer(cl_mem buffer, |
| 1075 |
cl_mem_flags flags, |
| 1076 |
cl_buffer_create_type buffer_create_type, |
| 1077 |
const void * buffer_create_info, |
| 1078 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1; |
| 1079 |
|
| 1080 |
#endif |
| 1081 |
|
| 1082 |
#ifdef CL_VERSION_1_2 |
| 1083 |
|
| 1084 |
extern CL_API_ENTRY cl_mem CL_API_CALL |
| 1085 |
clCreateImage(cl_context context, |
| 1086 |
cl_mem_flags flags, |
| 1087 |
const cl_image_format * image_format, |
| 1088 |
const cl_image_desc * image_desc, |
| 1089 |
void * host_ptr, |
| 1090 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; |
| 1091 |
|
| 1092 |
#endif |
| 1093 |
|
| 1094 |
#ifdef CL_VERSION_2_0 |
| 1095 |
|
| 1096 |
extern CL_API_ENTRY cl_mem CL_API_CALL |
| 1097 |
clCreatePipe(cl_context context, |
| 1098 |
cl_mem_flags flags, |
| 1099 |
cl_uint pipe_packet_size, |
| 1100 |
cl_uint pipe_max_packets, |
| 1101 |
const cl_pipe_properties * properties, |
| 1102 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0; |
| 1103 |
|
| 1104 |
#endif |
| 1105 |
|
| 1106 |
#ifdef CL_VERSION_3_0 |
| 1107 |
|
| 1108 |
extern CL_API_ENTRY cl_mem CL_API_CALL |
| 1109 |
clCreateBufferWithProperties(cl_context context, |
| 1110 |
const cl_mem_properties * properties, |
| 1111 |
cl_mem_flags flags, |
| 1112 |
size_t size, |
| 1113 |
void * host_ptr, |
| 1114 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_3_0; |
| 1115 |
|
| 1116 |
extern CL_API_ENTRY cl_mem CL_API_CALL |
| 1117 |
clCreateImageWithProperties(cl_context context, |
| 1118 |
const cl_mem_properties * properties, |
| 1119 |
cl_mem_flags flags, |
| 1120 |
const cl_image_format * image_format, |
| 1121 |
const cl_image_desc * image_desc, |
| 1122 |
void * host_ptr, |
| 1123 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_3_0; |
| 1124 |
|
| 1125 |
#endif |
| 1126 |
|
| 1127 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1128 |
clRetainMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0; |
| 1129 |
|
| 1130 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1131 |
clReleaseMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0; |
| 1132 |
|
| 1133 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1134 |
clGetSupportedImageFormats(cl_context context, |
| 1135 |
cl_mem_flags flags, |
| 1136 |
cl_mem_object_type image_type, |
| 1137 |
cl_uint num_entries, |
| 1138 |
cl_image_format * image_formats, |
| 1139 |
cl_uint * num_image_formats) CL_API_SUFFIX__VERSION_1_0; |
| 1140 |
|
| 1141 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1142 |
clGetMemObjectInfo(cl_mem memobj, |
| 1143 |
cl_mem_info param_name, |
| 1144 |
size_t param_value_size, |
| 1145 |
void * param_value, |
| 1146 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1147 |
|
| 1148 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1149 |
clGetImageInfo(cl_mem image, |
| 1150 |
cl_image_info param_name, |
| 1151 |
size_t param_value_size, |
| 1152 |
void * param_value, |
| 1153 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1154 |
|
| 1155 |
#ifdef CL_VERSION_2_0 |
| 1156 |
|
| 1157 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1158 |
clGetPipeInfo(cl_mem pipe, |
| 1159 |
cl_pipe_info param_name, |
| 1160 |
size_t param_value_size, |
| 1161 |
void * param_value, |
| 1162 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_2_0; |
| 1163 |
|
| 1164 |
#endif |
| 1165 |
|
| 1166 |
#ifdef CL_VERSION_1_1 |
| 1167 |
|
| 1168 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1169 |
clSetMemObjectDestructorCallback(cl_mem memobj, |
| 1170 |
void (CL_CALLBACK * pfn_notify)(cl_mem memobj, |
| 1171 |
void * user_data), |
| 1172 |
void * user_data) CL_API_SUFFIX__VERSION_1_1; |
| 1173 |
|
| 1174 |
#endif |
| 1175 |
|
| 1176 |
/* SVM Allocation APIs */ |
| 1177 |
|
| 1178 |
#ifdef CL_VERSION_2_0 |
| 1179 |
|
| 1180 |
extern CL_API_ENTRY void * CL_API_CALL |
| 1181 |
clSVMAlloc(cl_context context, |
| 1182 |
cl_svm_mem_flags flags, |
| 1183 |
size_t size, |
| 1184 |
cl_uint alignment) CL_API_SUFFIX__VERSION_2_0; |
| 1185 |
|
| 1186 |
extern CL_API_ENTRY void CL_API_CALL |
| 1187 |
clSVMFree(cl_context context, |
| 1188 |
void * svm_pointer) CL_API_SUFFIX__VERSION_2_0; |
| 1189 |
|
| 1190 |
#endif |
| 1191 |
|
| 1192 |
/* Sampler APIs */ |
| 1193 |
|
| 1194 |
#ifdef CL_VERSION_2_0 |
| 1195 |
|
| 1196 |
extern CL_API_ENTRY cl_sampler CL_API_CALL |
| 1197 |
clCreateSamplerWithProperties(cl_context context, |
| 1198 |
const cl_sampler_properties * sampler_properties, |
| 1199 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0; |
| 1200 |
|
| 1201 |
#endif |
| 1202 |
|
| 1203 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1204 |
clRetainSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0; |
| 1205 |
|
| 1206 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1207 |
clReleaseSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0; |
| 1208 |
|
| 1209 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1210 |
clGetSamplerInfo(cl_sampler sampler, |
| 1211 |
cl_sampler_info param_name, |
| 1212 |
size_t param_value_size, |
| 1213 |
void * param_value, |
| 1214 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1215 |
|
| 1216 |
/* Program Object APIs */ |
| 1217 |
extern CL_API_ENTRY cl_program CL_API_CALL |
| 1218 |
clCreateProgramWithSource(cl_context context, |
| 1219 |
cl_uint count, |
| 1220 |
const char ** strings, |
| 1221 |
const size_t * lengths, |
| 1222 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1223 |
|
| 1224 |
extern CL_API_ENTRY cl_program CL_API_CALL |
| 1225 |
clCreateProgramWithBinary(cl_context context, |
| 1226 |
cl_uint num_devices, |
| 1227 |
const cl_device_id * device_list, |
| 1228 |
const size_t * lengths, |
| 1229 |
const unsigned char ** binaries, |
| 1230 |
cl_int * binary_status, |
| 1231 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1232 |
|
| 1233 |
#ifdef CL_VERSION_1_2 |
| 1234 |
|
| 1235 |
extern CL_API_ENTRY cl_program CL_API_CALL |
| 1236 |
clCreateProgramWithBuiltInKernels(cl_context context, |
| 1237 |
cl_uint num_devices, |
| 1238 |
const cl_device_id * device_list, |
| 1239 |
const char * kernel_names, |
| 1240 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; |
| 1241 |
|
| 1242 |
#endif |
| 1243 |
|
| 1244 |
#ifdef CL_VERSION_2_1 |
| 1245 |
|
| 1246 |
extern CL_API_ENTRY cl_program CL_API_CALL |
| 1247 |
clCreateProgramWithIL(cl_context context, |
| 1248 |
const void* il, |
| 1249 |
size_t length, |
| 1250 |
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_1; |
| 1251 |
|
| 1252 |
#endif |
| 1253 |
|
| 1254 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1255 |
clRetainProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0; |
| 1256 |
|
| 1257 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1258 |
clReleaseProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0; |
| 1259 |
|
| 1260 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1261 |
clBuildProgram(cl_program program, |
| 1262 |
cl_uint num_devices, |
| 1263 |
const cl_device_id * device_list, |
| 1264 |
const char * options, |
| 1265 |
void (CL_CALLBACK * pfn_notify)(cl_program program, |
| 1266 |
void * user_data), |
| 1267 |
void * user_data) CL_API_SUFFIX__VERSION_1_0; |
| 1268 |
|
| 1269 |
#ifdef CL_VERSION_1_2 |
| 1270 |
|
| 1271 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1272 |
clCompileProgram(cl_program program, |
| 1273 |
cl_uint num_devices, |
| 1274 |
const cl_device_id * device_list, |
| 1275 |
const char * options, |
| 1276 |
cl_uint num_input_headers, |
| 1277 |
const cl_program * input_headers, |
| 1278 |
const char ** header_include_names, |
| 1279 |
void (CL_CALLBACK * pfn_notify)(cl_program program, |
| 1280 |
void * user_data), |
| 1281 |
void * user_data) CL_API_SUFFIX__VERSION_1_2; |
| 1282 |
|
| 1283 |
extern CL_API_ENTRY cl_program CL_API_CALL |
| 1284 |
clLinkProgram(cl_context context, |
| 1285 |
cl_uint num_devices, |
| 1286 |
const cl_device_id * device_list, |
| 1287 |
const char * options, |
| 1288 |
cl_uint num_input_programs, |
| 1289 |
const cl_program * input_programs, |
| 1290 |
void (CL_CALLBACK * pfn_notify)(cl_program program, |
| 1291 |
void * user_data), |
| 1292 |
void * user_data, |
| 1293 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; |
| 1294 |
|
| 1295 |
#endif |
| 1296 |
|
| 1297 |
#ifdef CL_VERSION_2_2 |
| 1298 |
|
| 1299 |
extern CL_API_ENTRY CL_API_PREFIX__VERSION_2_2_DEPRECATED cl_int CL_API_CALL |
| 1300 |
clSetProgramReleaseCallback(cl_program program, |
| 1301 |
void (CL_CALLBACK * pfn_notify)(cl_program program, |
| 1302 |
void * user_data), |
| 1303 |
void * user_data) CL_API_SUFFIX__VERSION_2_2_DEPRECATED; |
| 1304 |
|
| 1305 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1306 |
clSetProgramSpecializationConstant(cl_program program, |
| 1307 |
cl_uint spec_id, |
| 1308 |
size_t spec_size, |
| 1309 |
const void* spec_value) CL_API_SUFFIX__VERSION_2_2; |
| 1310 |
|
| 1311 |
#endif |
| 1312 |
|
| 1313 |
#ifdef CL_VERSION_1_2 |
| 1314 |
|
| 1315 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1316 |
clUnloadPlatformCompiler(cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2; |
| 1317 |
|
| 1318 |
#endif |
| 1319 |
|
| 1320 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1321 |
clGetProgramInfo(cl_program program, |
| 1322 |
cl_program_info param_name, |
| 1323 |
size_t param_value_size, |
| 1324 |
void * param_value, |
| 1325 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1326 |
|
| 1327 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1328 |
clGetProgramBuildInfo(cl_program program, |
| 1329 |
cl_device_id device, |
| 1330 |
cl_program_build_info param_name, |
| 1331 |
size_t param_value_size, |
| 1332 |
void * param_value, |
| 1333 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1334 |
|
| 1335 |
/* Kernel Object APIs */ |
| 1336 |
extern CL_API_ENTRY cl_kernel CL_API_CALL |
| 1337 |
clCreateKernel(cl_program program, |
| 1338 |
const char * kernel_name, |
| 1339 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1340 |
|
| 1341 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1342 |
clCreateKernelsInProgram(cl_program program, |
| 1343 |
cl_uint num_kernels, |
| 1344 |
cl_kernel * kernels, |
| 1345 |
cl_uint * num_kernels_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1346 |
|
| 1347 |
#ifdef CL_VERSION_2_1 |
| 1348 |
|
| 1349 |
extern CL_API_ENTRY cl_kernel CL_API_CALL |
| 1350 |
clCloneKernel(cl_kernel source_kernel, |
| 1351 |
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_1; |
| 1352 |
|
| 1353 |
#endif |
| 1354 |
|
| 1355 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1356 |
clRetainKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0; |
| 1357 |
|
| 1358 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1359 |
clReleaseKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0; |
| 1360 |
|
| 1361 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1362 |
clSetKernelArg(cl_kernel kernel, |
| 1363 |
cl_uint arg_index, |
| 1364 |
size_t arg_size, |
| 1365 |
const void * arg_value) CL_API_SUFFIX__VERSION_1_0; |
| 1366 |
|
| 1367 |
#ifdef CL_VERSION_2_0 |
| 1368 |
|
| 1369 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1370 |
clSetKernelArgSVMPointer(cl_kernel kernel, |
| 1371 |
cl_uint arg_index, |
| 1372 |
const void * arg_value) CL_API_SUFFIX__VERSION_2_0; |
| 1373 |
|
| 1374 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1375 |
clSetKernelExecInfo(cl_kernel kernel, |
| 1376 |
cl_kernel_exec_info param_name, |
| 1377 |
size_t param_value_size, |
| 1378 |
const void * param_value) CL_API_SUFFIX__VERSION_2_0; |
| 1379 |
|
| 1380 |
#endif |
| 1381 |
|
| 1382 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1383 |
clGetKernelInfo(cl_kernel kernel, |
| 1384 |
cl_kernel_info param_name, |
| 1385 |
size_t param_value_size, |
| 1386 |
void * param_value, |
| 1387 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1388 |
|
| 1389 |
#ifdef CL_VERSION_1_2 |
| 1390 |
|
| 1391 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1392 |
clGetKernelArgInfo(cl_kernel kernel, |
| 1393 |
cl_uint arg_indx, |
| 1394 |
cl_kernel_arg_info param_name, |
| 1395 |
size_t param_value_size, |
| 1396 |
void * param_value, |
| 1397 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_2; |
| 1398 |
|
| 1399 |
#endif |
| 1400 |
|
| 1401 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1402 |
clGetKernelWorkGroupInfo(cl_kernel kernel, |
| 1403 |
cl_device_id device, |
| 1404 |
cl_kernel_work_group_info param_name, |
| 1405 |
size_t param_value_size, |
| 1406 |
void * param_value, |
| 1407 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1408 |
|
| 1409 |
#ifdef CL_VERSION_2_1 |
| 1410 |
|
| 1411 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1412 |
clGetKernelSubGroupInfo(cl_kernel kernel, |
| 1413 |
cl_device_id device, |
| 1414 |
cl_kernel_sub_group_info param_name, |
| 1415 |
size_t input_value_size, |
| 1416 |
const void* input_value, |
| 1417 |
size_t param_value_size, |
| 1418 |
void* param_value, |
| 1419 |
size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_2_1; |
| 1420 |
|
| 1421 |
#endif |
| 1422 |
|
| 1423 |
/* Event Object APIs */ |
| 1424 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1425 |
clWaitForEvents(cl_uint num_events, |
| 1426 |
const cl_event * event_list) CL_API_SUFFIX__VERSION_1_0; |
| 1427 |
|
| 1428 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1429 |
clGetEventInfo(cl_event event, |
| 1430 |
cl_event_info param_name, |
| 1431 |
size_t param_value_size, |
| 1432 |
void * param_value, |
| 1433 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1434 |
|
| 1435 |
#ifdef CL_VERSION_1_1 |
| 1436 |
|
| 1437 |
extern CL_API_ENTRY cl_event CL_API_CALL |
| 1438 |
clCreateUserEvent(cl_context context, |
| 1439 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1; |
| 1440 |
|
| 1441 |
#endif |
| 1442 |
|
| 1443 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1444 |
clRetainEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0; |
| 1445 |
|
| 1446 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1447 |
clReleaseEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0; |
| 1448 |
|
| 1449 |
#ifdef CL_VERSION_1_1 |
| 1450 |
|
| 1451 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1452 |
clSetUserEventStatus(cl_event event, |
| 1453 |
cl_int execution_status) CL_API_SUFFIX__VERSION_1_1; |
| 1454 |
|
| 1455 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1456 |
clSetEventCallback(cl_event event, |
| 1457 |
cl_int command_exec_callback_type, |
| 1458 |
void (CL_CALLBACK * pfn_notify)(cl_event event, |
| 1459 |
cl_int event_command_status, |
| 1460 |
void * user_data), |
| 1461 |
void * user_data) CL_API_SUFFIX__VERSION_1_1; |
| 1462 |
|
| 1463 |
#endif |
| 1464 |
|
| 1465 |
/* Profiling APIs */ |
| 1466 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1467 |
clGetEventProfilingInfo(cl_event event, |
| 1468 |
cl_profiling_info param_name, |
| 1469 |
size_t param_value_size, |
| 1470 |
void * param_value, |
| 1471 |
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1472 |
|
| 1473 |
/* Flush and Finish APIs */ |
| 1474 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1475 |
clFlush(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; |
| 1476 |
|
| 1477 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1478 |
clFinish(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; |
| 1479 |
|
| 1480 |
/* Enqueued Commands APIs */ |
| 1481 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1482 |
clEnqueueReadBuffer(cl_command_queue command_queue, |
| 1483 |
cl_mem buffer, |
| 1484 |
cl_bool blocking_read, |
| 1485 |
size_t offset, |
| 1486 |
size_t size, |
| 1487 |
void * ptr, |
| 1488 |
cl_uint num_events_in_wait_list, |
| 1489 |
const cl_event * event_wait_list, |
| 1490 |
cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
| 1491 |
|
| 1492 |
#ifdef CL_VERSION_1_1 |
| 1493 |
|
| 1494 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1495 |
clEnqueueReadBufferRect(cl_command_queue command_queue, |
| 1496 |
cl_mem buffer, |
| 1497 |
cl_bool blocking_read, |
| 1498 |
const size_t * buffer_origin, |
| 1499 |
const size_t * host_origin, |
| 1500 |
const size_t * region, |
| 1501 |
size_t buffer_row_pitch, |
| 1502 |
size_t buffer_slice_pitch, |
| 1503 |
size_t host_row_pitch, |
| 1504 |
size_t host_slice_pitch, |
| 1505 |
void * ptr, |
| 1506 |
cl_uint num_events_in_wait_list, |
| 1507 |
const cl_event * event_wait_list, |
| 1508 |
cl_event * event) CL_API_SUFFIX__VERSION_1_1; |
| 1509 |
|
| 1510 |
#endif |
| 1511 |
|
| 1512 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1513 |
clEnqueueWriteBuffer(cl_command_queue command_queue, |
| 1514 |
cl_mem buffer, |
| 1515 |
cl_bool blocking_write, |
| 1516 |
size_t offset, |
| 1517 |
size_t size, |
| 1518 |
const void * ptr, |
| 1519 |
cl_uint num_events_in_wait_list, |
| 1520 |
const cl_event * event_wait_list, |
| 1521 |
cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
| 1522 |
|
| 1523 |
#ifdef CL_VERSION_1_1 |
| 1524 |
|
| 1525 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1526 |
clEnqueueWriteBufferRect(cl_command_queue command_queue, |
| 1527 |
cl_mem buffer, |
| 1528 |
cl_bool blocking_write, |
| 1529 |
const size_t * buffer_origin, |
| 1530 |
const size_t * host_origin, |
| 1531 |
const size_t * region, |
| 1532 |
size_t buffer_row_pitch, |
| 1533 |
size_t buffer_slice_pitch, |
| 1534 |
size_t host_row_pitch, |
| 1535 |
size_t host_slice_pitch, |
| 1536 |
const void * ptr, |
| 1537 |
cl_uint num_events_in_wait_list, |
| 1538 |
const cl_event * event_wait_list, |
| 1539 |
cl_event * event) CL_API_SUFFIX__VERSION_1_1; |
| 1540 |
|
| 1541 |
#endif |
| 1542 |
|
| 1543 |
#ifdef CL_VERSION_1_2 |
| 1544 |
|
| 1545 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1546 |
clEnqueueFillBuffer(cl_command_queue command_queue, |
| 1547 |
cl_mem buffer, |
| 1548 |
const void * pattern, |
| 1549 |
size_t pattern_size, |
| 1550 |
size_t offset, |
| 1551 |
size_t size, |
| 1552 |
cl_uint num_events_in_wait_list, |
| 1553 |
const cl_event * event_wait_list, |
| 1554 |
cl_event * event) CL_API_SUFFIX__VERSION_1_2; |
| 1555 |
|
| 1556 |
#endif |
| 1557 |
|
| 1558 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1559 |
clEnqueueCopyBuffer(cl_command_queue command_queue, |
| 1560 |
cl_mem src_buffer, |
| 1561 |
cl_mem dst_buffer, |
| 1562 |
size_t src_offset, |
| 1563 |
size_t dst_offset, |
| 1564 |
size_t size, |
| 1565 |
cl_uint num_events_in_wait_list, |
| 1566 |
const cl_event * event_wait_list, |
| 1567 |
cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
| 1568 |
|
| 1569 |
#ifdef CL_VERSION_1_1 |
| 1570 |
|
| 1571 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1572 |
clEnqueueCopyBufferRect(cl_command_queue command_queue, |
| 1573 |
cl_mem src_buffer, |
| 1574 |
cl_mem dst_buffer, |
| 1575 |
const size_t * src_origin, |
| 1576 |
const size_t * dst_origin, |
| 1577 |
const size_t * region, |
| 1578 |
size_t src_row_pitch, |
| 1579 |
size_t src_slice_pitch, |
| 1580 |
size_t dst_row_pitch, |
| 1581 |
size_t dst_slice_pitch, |
| 1582 |
cl_uint num_events_in_wait_list, |
| 1583 |
const cl_event * event_wait_list, |
| 1584 |
cl_event * event) CL_API_SUFFIX__VERSION_1_1; |
| 1585 |
|
| 1586 |
#endif |
| 1587 |
|
| 1588 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1589 |
clEnqueueReadImage(cl_command_queue command_queue, |
| 1590 |
cl_mem image, |
| 1591 |
cl_bool blocking_read, |
| 1592 |
const size_t * origin, |
| 1593 |
const size_t * region, |
| 1594 |
size_t row_pitch, |
| 1595 |
size_t slice_pitch, |
| 1596 |
void * ptr, |
| 1597 |
cl_uint num_events_in_wait_list, |
| 1598 |
const cl_event * event_wait_list, |
| 1599 |
cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
| 1600 |
|
| 1601 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1602 |
clEnqueueWriteImage(cl_command_queue command_queue, |
| 1603 |
cl_mem image, |
| 1604 |
cl_bool blocking_write, |
| 1605 |
const size_t * origin, |
| 1606 |
const size_t * region, |
| 1607 |
size_t input_row_pitch, |
| 1608 |
size_t input_slice_pitch, |
| 1609 |
const void * ptr, |
| 1610 |
cl_uint num_events_in_wait_list, |
| 1611 |
const cl_event * event_wait_list, |
| 1612 |
cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
| 1613 |
|
| 1614 |
#ifdef CL_VERSION_1_2 |
| 1615 |
|
| 1616 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1617 |
clEnqueueFillImage(cl_command_queue command_queue, |
| 1618 |
cl_mem image, |
| 1619 |
const void * fill_color, |
| 1620 |
const size_t * origin, |
| 1621 |
const size_t * region, |
| 1622 |
cl_uint num_events_in_wait_list, |
| 1623 |
const cl_event * event_wait_list, |
| 1624 |
cl_event * event) CL_API_SUFFIX__VERSION_1_2; |
| 1625 |
|
| 1626 |
#endif |
| 1627 |
|
| 1628 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1629 |
clEnqueueCopyImage(cl_command_queue command_queue, |
| 1630 |
cl_mem src_image, |
| 1631 |
cl_mem dst_image, |
| 1632 |
const size_t * src_origin, |
| 1633 |
const size_t * dst_origin, |
| 1634 |
const size_t * region, |
| 1635 |
cl_uint num_events_in_wait_list, |
| 1636 |
const cl_event * event_wait_list, |
| 1637 |
cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
| 1638 |
|
| 1639 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1640 |
clEnqueueCopyImageToBuffer(cl_command_queue command_queue, |
| 1641 |
cl_mem src_image, |
| 1642 |
cl_mem dst_buffer, |
| 1643 |
const size_t * src_origin, |
| 1644 |
const size_t * region, |
| 1645 |
size_t dst_offset, |
| 1646 |
cl_uint num_events_in_wait_list, |
| 1647 |
const cl_event * event_wait_list, |
| 1648 |
cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
| 1649 |
|
| 1650 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1651 |
clEnqueueCopyBufferToImage(cl_command_queue command_queue, |
| 1652 |
cl_mem src_buffer, |
| 1653 |
cl_mem dst_image, |
| 1654 |
size_t src_offset, |
| 1655 |
const size_t * dst_origin, |
| 1656 |
const size_t * region, |
| 1657 |
cl_uint num_events_in_wait_list, |
| 1658 |
const cl_event * event_wait_list, |
| 1659 |
cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
| 1660 |
|
| 1661 |
extern CL_API_ENTRY void * CL_API_CALL |
| 1662 |
clEnqueueMapBuffer(cl_command_queue command_queue, |
| 1663 |
cl_mem buffer, |
| 1664 |
cl_bool blocking_map, |
| 1665 |
cl_map_flags map_flags, |
| 1666 |
size_t offset, |
| 1667 |
size_t size, |
| 1668 |
cl_uint num_events_in_wait_list, |
| 1669 |
const cl_event * event_wait_list, |
| 1670 |
cl_event * event, |
| 1671 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1672 |
|
| 1673 |
extern CL_API_ENTRY void * CL_API_CALL |
| 1674 |
clEnqueueMapImage(cl_command_queue command_queue, |
| 1675 |
cl_mem image, |
| 1676 |
cl_bool blocking_map, |
| 1677 |
cl_map_flags map_flags, |
| 1678 |
const size_t * origin, |
| 1679 |
const size_t * region, |
| 1680 |
size_t * image_row_pitch, |
| 1681 |
size_t * image_slice_pitch, |
| 1682 |
cl_uint num_events_in_wait_list, |
| 1683 |
const cl_event * event_wait_list, |
| 1684 |
cl_event * event, |
| 1685 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 1686 |
|
| 1687 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1688 |
clEnqueueUnmapMemObject(cl_command_queue command_queue, |
| 1689 |
cl_mem memobj, |
| 1690 |
void * mapped_ptr, |
| 1691 |
cl_uint num_events_in_wait_list, |
| 1692 |
const cl_event * event_wait_list, |
| 1693 |
cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
| 1694 |
|
| 1695 |
#ifdef CL_VERSION_1_2 |
| 1696 |
|
| 1697 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1698 |
clEnqueueMigrateMemObjects(cl_command_queue command_queue, |
| 1699 |
cl_uint num_mem_objects, |
| 1700 |
const cl_mem * mem_objects, |
| 1701 |
cl_mem_migration_flags flags, |
| 1702 |
cl_uint num_events_in_wait_list, |
| 1703 |
const cl_event * event_wait_list, |
| 1704 |
cl_event * event) CL_API_SUFFIX__VERSION_1_2; |
| 1705 |
|
| 1706 |
#endif |
| 1707 |
|
| 1708 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1709 |
clEnqueueNDRangeKernel(cl_command_queue command_queue, |
| 1710 |
cl_kernel kernel, |
| 1711 |
cl_uint work_dim, |
| 1712 |
const size_t * global_work_offset, |
| 1713 |
const size_t * global_work_size, |
| 1714 |
const size_t * local_work_size, |
| 1715 |
cl_uint num_events_in_wait_list, |
| 1716 |
const cl_event * event_wait_list, |
| 1717 |
cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
| 1718 |
|
| 1719 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1720 |
clEnqueueNativeKernel(cl_command_queue command_queue, |
| 1721 |
void (CL_CALLBACK * user_func)(void *), |
| 1722 |
void * args, |
| 1723 |
size_t cb_args, |
| 1724 |
cl_uint num_mem_objects, |
| 1725 |
const cl_mem * mem_list, |
| 1726 |
const void ** args_mem_loc, |
| 1727 |
cl_uint num_events_in_wait_list, |
| 1728 |
const cl_event * event_wait_list, |
| 1729 |
cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
| 1730 |
|
| 1731 |
#ifdef CL_VERSION_1_2 |
| 1732 |
|
| 1733 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1734 |
clEnqueueMarkerWithWaitList(cl_command_queue command_queue, |
| 1735 |
cl_uint num_events_in_wait_list, |
| 1736 |
const cl_event * event_wait_list, |
| 1737 |
cl_event * event) CL_API_SUFFIX__VERSION_1_2; |
| 1738 |
|
| 1739 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1740 |
clEnqueueBarrierWithWaitList(cl_command_queue command_queue, |
| 1741 |
cl_uint num_events_in_wait_list, |
| 1742 |
const cl_event * event_wait_list, |
| 1743 |
cl_event * event) CL_API_SUFFIX__VERSION_1_2; |
| 1744 |
|
| 1745 |
#endif |
| 1746 |
|
| 1747 |
#ifdef CL_VERSION_2_0 |
| 1748 |
|
| 1749 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1750 |
clEnqueueSVMFree(cl_command_queue command_queue, |
| 1751 |
cl_uint num_svm_pointers, |
| 1752 |
void * svm_pointers[], |
| 1753 |
void (CL_CALLBACK * pfn_free_func)(cl_command_queue queue, |
| 1754 |
cl_uint num_svm_pointers, |
| 1755 |
void * svm_pointers[], |
| 1756 |
void * user_data), |
| 1757 |
void * user_data, |
| 1758 |
cl_uint num_events_in_wait_list, |
| 1759 |
const cl_event * event_wait_list, |
| 1760 |
cl_event * event) CL_API_SUFFIX__VERSION_2_0; |
| 1761 |
|
| 1762 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1763 |
clEnqueueSVMMemcpy(cl_command_queue command_queue, |
| 1764 |
cl_bool blocking_copy, |
| 1765 |
void * dst_ptr, |
| 1766 |
const void * src_ptr, |
| 1767 |
size_t size, |
| 1768 |
cl_uint num_events_in_wait_list, |
| 1769 |
const cl_event * event_wait_list, |
| 1770 |
cl_event * event) CL_API_SUFFIX__VERSION_2_0; |
| 1771 |
|
| 1772 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1773 |
clEnqueueSVMMemFill(cl_command_queue command_queue, |
| 1774 |
void * svm_ptr, |
| 1775 |
const void * pattern, |
| 1776 |
size_t pattern_size, |
| 1777 |
size_t size, |
| 1778 |
cl_uint num_events_in_wait_list, |
| 1779 |
const cl_event * event_wait_list, |
| 1780 |
cl_event * event) CL_API_SUFFIX__VERSION_2_0; |
| 1781 |
|
| 1782 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1783 |
clEnqueueSVMMap(cl_command_queue command_queue, |
| 1784 |
cl_bool blocking_map, |
| 1785 |
cl_map_flags flags, |
| 1786 |
void * svm_ptr, |
| 1787 |
size_t size, |
| 1788 |
cl_uint num_events_in_wait_list, |
| 1789 |
const cl_event * event_wait_list, |
| 1790 |
cl_event * event) CL_API_SUFFIX__VERSION_2_0; |
| 1791 |
|
| 1792 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1793 |
clEnqueueSVMUnmap(cl_command_queue command_queue, |
| 1794 |
void * svm_ptr, |
| 1795 |
cl_uint num_events_in_wait_list, |
| 1796 |
const cl_event * event_wait_list, |
| 1797 |
cl_event * event) CL_API_SUFFIX__VERSION_2_0; |
| 1798 |
|
| 1799 |
#endif |
| 1800 |
|
| 1801 |
#ifdef CL_VERSION_2_1 |
| 1802 |
|
| 1803 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1804 |
clEnqueueSVMMigrateMem(cl_command_queue command_queue, |
| 1805 |
cl_uint num_svm_pointers, |
| 1806 |
const void ** svm_pointers, |
| 1807 |
const size_t * sizes, |
| 1808 |
cl_mem_migration_flags flags, |
| 1809 |
cl_uint num_events_in_wait_list, |
| 1810 |
const cl_event * event_wait_list, |
| 1811 |
cl_event * event) CL_API_SUFFIX__VERSION_2_1; |
| 1812 |
|
| 1813 |
#endif |
| 1814 |
|
| 1815 |
#ifdef CL_VERSION_1_2 |
| 1816 |
|
| 1817 |
/* Extension function access |
| 1818 |
* |
| 1819 |
* Returns the extension function address for the given function name, |
| 1820 |
* or NULL if a valid function can not be found. The client must |
| 1821 |
* check to make sure the address is not NULL, before using or |
| 1822 |
* calling the returned function address. |
| 1823 |
*/ |
| 1824 |
extern CL_API_ENTRY void * CL_API_CALL |
| 1825 |
clGetExtensionFunctionAddressForPlatform(cl_platform_id platform, |
| 1826 |
const char * func_name) CL_API_SUFFIX__VERSION_1_2; |
| 1827 |
|
| 1828 |
#endif |
| 1829 |
|
| 1830 |
#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS |
| 1831 |
/* |
| 1832 |
* WARNING: |
| 1833 |
* This API introduces mutable state into the OpenCL implementation. It has been REMOVED |
| 1834 |
* to better facilitate thread safety. The 1.0 API is not thread safe. It is not tested by the |
| 1835 |
* OpenCL 1.1 conformance test, and consequently may not work or may not work dependably. |
| 1836 |
* It is likely to be non-performant. Use of this API is not advised. Use at your own risk. |
| 1837 |
* |
| 1838 |
* Software developers previously relying on this API are instructed to set the command queue |
| 1839 |
* properties when creating the queue, instead. |
| 1840 |
*/ |
| 1841 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 1842 |
clSetCommandQueueProperty(cl_command_queue command_queue, |
| 1843 |
cl_command_queue_properties properties, |
| 1844 |
cl_bool enable, |
| 1845 |
cl_command_queue_properties * old_properties) CL_API_SUFFIX__VERSION_1_0_DEPRECATED; |
| 1846 |
#endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */ |
| 1847 |
|
| 1848 |
/* Deprecated OpenCL 1.1 APIs */ |
| 1849 |
extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL |
| 1850 |
clCreateImage2D(cl_context context, |
| 1851 |
cl_mem_flags flags, |
| 1852 |
const cl_image_format * image_format, |
| 1853 |
size_t image_width, |
| 1854 |
size_t image_height, |
| 1855 |
size_t image_row_pitch, |
| 1856 |
void * host_ptr, |
| 1857 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; |
| 1858 |
|
| 1859 |
extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL |
| 1860 |
clCreateImage3D(cl_context context, |
| 1861 |
cl_mem_flags flags, |
| 1862 |
const cl_image_format * image_format, |
| 1863 |
size_t image_width, |
| 1864 |
size_t image_height, |
| 1865 |
size_t image_depth, |
| 1866 |
size_t image_row_pitch, |
| 1867 |
size_t image_slice_pitch, |
| 1868 |
void * host_ptr, |
| 1869 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; |
| 1870 |
|
| 1871 |
extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL |
| 1872 |
clEnqueueMarker(cl_command_queue command_queue, |
| 1873 |
cl_event * event) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; |
| 1874 |
|
| 1875 |
extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL |
| 1876 |
clEnqueueWaitForEvents(cl_command_queue command_queue, |
| 1877 |
cl_uint num_events, |
| 1878 |
const cl_event * event_list) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; |
| 1879 |
|
| 1880 |
extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL |
| 1881 |
clEnqueueBarrier(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; |
| 1882 |
|
| 1883 |
extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL |
| 1884 |
clUnloadCompiler(void) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; |
| 1885 |
|
| 1886 |
extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL |
| 1887 |
clGetExtensionFunctionAddress(const char * func_name) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; |
| 1888 |
|
| 1889 |
/* Deprecated OpenCL 2.0 APIs */ |
| 1890 |
extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL |
| 1891 |
clCreateCommandQueue(cl_context context, |
| 1892 |
cl_device_id device, |
| 1893 |
cl_command_queue_properties properties, |
| 1894 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2_DEPRECATED; |
| 1895 |
|
| 1896 |
extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL |
| 1897 |
clCreateSampler(cl_context context, |
| 1898 |
cl_bool normalized_coords, |
| 1899 |
cl_addressing_mode addressing_mode, |
| 1900 |
cl_filter_mode filter_mode, |
| 1901 |
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2_DEPRECATED; |
| 1902 |
|
| 1903 |
extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL |
| 1904 |
clEnqueueTask(cl_command_queue command_queue, |
| 1905 |
cl_kernel kernel, |
| 1906 |
cl_uint num_events_in_wait_list, |
| 1907 |
const cl_event * event_wait_list, |
| 1908 |
cl_event * event) CL_API_SUFFIX__VERSION_1_2_DEPRECATED; |
| 1909 |
|
| 1910 |
#endif /* !defined(CL_NO_CORE_PROTOTYPES) */ |
| 1911 |
|
| 1912 |
#ifdef __cplusplus |
| 1913 |
} |
| 1914 |
#endif |
| 1915 |
|
| 1916 |
#if defined(_WIN32) && defined(_MSC_VER) && __CL_HAS_ANON_STRUCT__ |
| 1917 |
#pragma warning( pop ) |
| 1918 |
#endif |
| 1919 |
|
| 1920 |
#endif /* __OPENCL_CL_H */ |