1 /******************************************************************************* 2 * Copyright (c) 2008-2015 The Khronos Group Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and/or associated documentation files (the 6 * "Materials"), to deal in the Materials without restriction, including 7 * without limitation the rights to use, copy, modify, merge, publish, 8 * distribute, sublicense, and/or sell copies of the Materials, and to 9 * permit persons to whom the Materials are furnished to do so, subject to 10 * the following conditions: 11 * 12 * The above copyright notice and this permission notice shall be included 13 * in all copies or substantial portions of the Materials. 14 * 15 * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS 16 * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS 17 * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT 18 * https://www.khronos.org/registry/ 19 * 20 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 27 ******************************************************************************/ 28 29 #ifndef __OPENCL_CL_H 30 #define __OPENCL_CL_H 31 32 #ifdef __APPLE__ 33 #include <OpenCL/cl_platform.h> 34 #else 35 #include <CL/cl_platform.h> 36 #endif 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 /******************************************************************************/ 43 44 typedef struct _cl_platform_id * cl_platform_id; 45 typedef struct _cl_device_id * cl_device_id; 46 typedef struct _cl_context * cl_context; 47 typedef struct _cl_command_queue * cl_command_queue; 48 typedef struct _cl_mem * cl_mem; 49 typedef struct _cl_program * cl_program; 50 typedef struct _cl_kernel * cl_kernel; 51 typedef struct _cl_event * cl_event; 52 typedef struct _cl_sampler * cl_sampler; 53 54 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. */ 55 typedef cl_ulong cl_bitfield; 56 typedef cl_bitfield cl_device_type; 57 typedef cl_uint cl_platform_info; 58 typedef cl_uint cl_device_info; 59 typedef cl_bitfield cl_device_fp_config; 60 typedef cl_uint cl_device_mem_cache_type; 61 typedef cl_uint cl_device_local_mem_type; 62 typedef cl_bitfield cl_device_exec_capabilities; 63 typedef cl_bitfield cl_device_svm_capabilities; 64 typedef cl_bitfield cl_command_queue_properties; 65 typedef intptr_t cl_device_partition_property; 66 typedef cl_bitfield cl_device_affinity_domain; 67 68 typedef intptr_t cl_context_properties; 69 typedef cl_uint cl_context_info; 70 typedef cl_bitfield cl_queue_properties; 71 typedef cl_uint cl_command_queue_info; 72 typedef cl_uint cl_channel_order; 73 typedef cl_uint cl_channel_type; 74 typedef cl_bitfield cl_mem_flags; 75 typedef cl_bitfield cl_svm_mem_flags; 76 typedef cl_uint cl_mem_object_type; 77 typedef cl_uint cl_mem_info; 78 typedef cl_bitfield cl_mem_migration_flags; 79 typedef cl_uint cl_image_info; 80 typedef cl_uint cl_buffer_create_type; 81 typedef cl_uint cl_addressing_mode; 82 typedef cl_uint cl_filter_mode; 83 typedef cl_uint cl_sampler_info; 84 typedef cl_bitfield cl_map_flags; 85 typedef intptr_t cl_pipe_properties; 86 typedef cl_uint cl_pipe_info; 87 typedef cl_uint cl_program_info; 88 typedef cl_uint cl_program_build_info; 89 typedef cl_uint cl_program_binary_type; 90 typedef cl_int cl_build_status; 91 typedef cl_uint cl_kernel_info; 92 typedef cl_uint cl_kernel_arg_info; 93 typedef cl_uint cl_kernel_arg_address_qualifier; 94 typedef cl_uint cl_kernel_arg_access_qualifier; 95 typedef cl_bitfield cl_kernel_arg_type_qualifier; 96 typedef cl_uint cl_kernel_work_group_info; 97 typedef cl_uint cl_kernel_sub_group_info; 98 typedef cl_uint cl_event_info; 99 typedef cl_uint cl_command_type; 100 typedef cl_uint cl_profiling_info; 101 typedef cl_bitfield cl_sampler_properties; 102 typedef cl_uint cl_kernel_exec_info; 103 104 typedef struct _cl_image_format { 105 cl_channel_order image_channel_order; 106 cl_channel_type image_channel_data_type; 107 } cl_image_format; 108 109 typedef struct _cl_image_desc { 110 cl_mem_object_type image_type; 111 size_t image_width; 112 size_t image_height; 113 size_t image_depth; 114 size_t image_array_size; 115 size_t image_row_pitch; 116 size_t image_slice_pitch; 117 cl_uint num_mip_levels; 118 cl_uint num_samples; 119 #ifdef __GNUC__ 120 __extension__ /* Prevents warnings about anonymous union in -pedantic builds */ 121 #endif 122 union { 123 cl_mem buffer; 124 cl_mem mem_object; 125 }; 126 } cl_image_desc; 127 128 typedef struct _cl_buffer_region { 129 size_t origin; 130 size_t size; 131 } cl_buffer_region; 132 133 134 /******************************************************************************/ 135 136 /* Error Codes */ 137 #define CL_SUCCESS 0 138 #define CL_DEVICE_NOT_FOUND -1 139 #define CL_DEVICE_NOT_AVAILABLE -2 140 #define CL_COMPILER_NOT_AVAILABLE -3 141 #define CL_MEM_OBJECT_ALLOCATION_FAILURE -4 142 #define CL_OUT_OF_RESOURCES -5 143 #define CL_OUT_OF_HOST_MEMORY -6 144 #define CL_PROFILING_INFO_NOT_AVAILABLE -7 145 #define CL_MEM_COPY_OVERLAP -8 146 #define CL_IMAGE_FORMAT_MISMATCH -9 147 #define CL_IMAGE_FORMAT_NOT_SUPPORTED -10 148 #define CL_BUILD_PROGRAM_FAILURE -11 149 #define CL_MAP_FAILURE -12 150 #define CL_MISALIGNED_SUB_BUFFER_OFFSET -13 151 #define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14 152 #define CL_COMPILE_PROGRAM_FAILURE -15 153 #define CL_LINKER_NOT_AVAILABLE -16 154 #define CL_LINK_PROGRAM_FAILURE -17 155 #define CL_DEVICE_PARTITION_FAILED -18 156 #define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19 157 158 #define CL_INVALID_VALUE -30 159 #define CL_INVALID_DEVICE_TYPE -31 160 #define CL_INVALID_PLATFORM -32 161 #define CL_INVALID_DEVICE -33 162 #define CL_INVALID_CONTEXT -34 163 #define CL_INVALID_QUEUE_PROPERTIES -35 164 #define CL_INVALID_COMMAND_QUEUE -36 165 #define CL_INVALID_HOST_PTR -37 166 #define CL_INVALID_MEM_OBJECT -38 167 #define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39 168 #define CL_INVALID_IMAGE_SIZE -40 169 #define CL_INVALID_SAMPLER -41 170 #define CL_INVALID_BINARY -42 171 #define CL_INVALID_BUILD_OPTIONS -43 172 #define CL_INVALID_PROGRAM -44 173 #define CL_INVALID_PROGRAM_EXECUTABLE -45 174 #define CL_INVALID_KERNEL_NAME -46 175 #define CL_INVALID_KERNEL_DEFINITION -47 176 #define CL_INVALID_KERNEL -48 177 #define CL_INVALID_ARG_INDEX -49 178 #define CL_INVALID_ARG_VALUE -50 179 #define CL_INVALID_ARG_SIZE -51 180 #define CL_INVALID_KERNEL_ARGS -52 181 #define CL_INVALID_WORK_DIMENSION -53 182 #define CL_INVALID_WORK_GROUP_SIZE -54 183 #define CL_INVALID_WORK_ITEM_SIZE -55 184 #define CL_INVALID_GLOBAL_OFFSET -56 185 #define CL_INVALID_EVENT_WAIT_LIST -57 186 #define CL_INVALID_EVENT -58 187 #define CL_INVALID_OPERATION -59 188 #define CL_INVALID_GL_OBJECT -60 189 #define CL_INVALID_BUFFER_SIZE -61 190 #define CL_INVALID_MIP_LEVEL -62 191 #define CL_INVALID_GLOBAL_WORK_SIZE -63 192 #define CL_INVALID_PROPERTY -64 193 #define CL_INVALID_IMAGE_DESCRIPTOR -65 194 #define CL_INVALID_COMPILER_OPTIONS -66 195 #define CL_INVALID_LINKER_OPTIONS -67 196 #define CL_INVALID_DEVICE_PARTITION_COUNT -68 197 #define CL_INVALID_PIPE_SIZE -69 198 #define CL_INVALID_DEVICE_QUEUE -70 199 #define CL_INVALID_SPEC_ID -71 200 #define CL_MAX_SIZE_RESTRICTION_EXCEEDED -72 201 202 /* OpenCL Version */ 203 #define CL_VERSION_1_0 1 204 #define CL_VERSION_1_1 1 205 #define CL_VERSION_1_2 1 206 #define CL_VERSION_2_0 1 207 #define CL_VERSION_2_1 1 208 #define CL_VERSION_2_2 1 209 210 /* cl_bool */ 211 #define CL_FALSE 0 212 #define CL_TRUE 1 213 #define CL_BLOCKING CL_TRUE 214 #define CL_NON_BLOCKING CL_FALSE 215 216 /* cl_platform_info */ 217 #define CL_PLATFORM_PROFILE 0x0900 218 #define CL_PLATFORM_VERSION 0x0901 219 #define CL_PLATFORM_NAME 0x0902 220 #define CL_PLATFORM_VENDOR 0x0903 221 #define CL_PLATFORM_EXTENSIONS 0x0904 222 #define CL_PLATFORM_HOST_TIMER_RESOLUTION 0x0905 223 224 /* cl_device_type - bitfield */ 225 #define CL_DEVICE_TYPE_DEFAULT (1 << 0) 226 #define CL_DEVICE_TYPE_CPU (1 << 1) 227 #define CL_DEVICE_TYPE_GPU (1 << 2) 228 #define CL_DEVICE_TYPE_ACCELERATOR (1 << 3) 229 #define CL_DEVICE_TYPE_CUSTOM (1 << 4) 230 #define CL_DEVICE_TYPE_ALL 0xFFFFFFFF 231 232 /* cl_device_info */ 233 #define CL_DEVICE_TYPE 0x1000 234 #define CL_DEVICE_VENDOR_ID 0x1001 235 #define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002 236 #define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003 237 #define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004 238 #define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 239 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006 240 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007 241 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008 242 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009 243 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A 244 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B 245 #define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C 246 #define CL_DEVICE_ADDRESS_BITS 0x100D 247 #define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E 248 #define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F 249 #define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010 250 #define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011 251 #define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012 252 #define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013 253 #define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014 254 #define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015 255 #define CL_DEVICE_IMAGE_SUPPORT 0x1016 256 #define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017 257 #define CL_DEVICE_MAX_SAMPLERS 0x1018 258 #define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019 259 #define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A 260 #define CL_DEVICE_SINGLE_FP_CONFIG 0x101B 261 #define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C 262 #define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D 263 #define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E 264 #define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F 265 #define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020 266 #define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021 267 #define CL_DEVICE_LOCAL_MEM_TYPE 0x1022 268 #define CL_DEVICE_LOCAL_MEM_SIZE 0x1023 269 #define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024 270 #define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025 271 #define CL_DEVICE_ENDIAN_LITTLE 0x1026 272 #define CL_DEVICE_AVAILABLE 0x1027 273 #define CL_DEVICE_COMPILER_AVAILABLE 0x1028 274 #define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029 275 #define CL_DEVICE_QUEUE_PROPERTIES 0x102A /* deprecated */ 276 #define CL_DEVICE_QUEUE_ON_HOST_PROPERTIES 0x102A 277 #define CL_DEVICE_NAME 0x102B 278 #define CL_DEVICE_VENDOR 0x102C 279 #define CL_DRIVER_VERSION 0x102D 280 #define CL_DEVICE_PROFILE 0x102E 281 #define CL_DEVICE_VERSION 0x102F 282 #define CL_DEVICE_EXTENSIONS 0x1030 283 #define CL_DEVICE_PLATFORM 0x1031 284 #define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032 285 #define CL_DEVICE_HALF_FP_CONFIG 0x1033 286 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034 287 #define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */ 288 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036 289 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037 290 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038 291 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039 292 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A 293 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B 294 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C 295 #define CL_DEVICE_OPENCL_C_VERSION 0x103D 296 #define CL_DEVICE_LINKER_AVAILABLE 0x103E 297 #define CL_DEVICE_BUILT_IN_KERNELS 0x103F 298 #define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040 299 #define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041 300 #define CL_DEVICE_PARENT_DEVICE 0x1042 301 #define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043 302 #define CL_DEVICE_PARTITION_PROPERTIES 0x1044 303 #define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045 304 #define CL_DEVICE_PARTITION_TYPE 0x1046 305 #define CL_DEVICE_REFERENCE_COUNT 0x1047 306 #define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048 307 #define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049 308 #define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A 309 #define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B 310 #define CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS 0x104C 311 #define CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE 0x104D 312 #define CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES 0x104E 313 #define CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE 0x104F 314 #define CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE 0x1050 315 #define CL_DEVICE_MAX_ON_DEVICE_QUEUES 0x1051 316 #define CL_DEVICE_MAX_ON_DEVICE_EVENTS 0x1052 317 #define CL_DEVICE_SVM_CAPABILITIES 0x1053 318 #define CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE 0x1054 319 #define CL_DEVICE_MAX_PIPE_ARGS 0x1055 320 #define CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS 0x1056 321 #define CL_DEVICE_PIPE_MAX_PACKET_SIZE 0x1057 322 #define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT 0x1058 323 #define CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT 0x1059 324 #define CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT 0x105A 325 #define CL_DEVICE_IL_VERSION 0x105B 326 #define CL_DEVICE_MAX_NUM_SUB_GROUPS 0x105C 327 #define CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS 0x105D 328 329 /* cl_device_fp_config - bitfield */ 330 #define CL_FP_DENORM (1 << 0) 331 #define CL_FP_INF_NAN (1 << 1) 332 #define CL_FP_ROUND_TO_NEAREST (1 << 2) 333 #define CL_FP_ROUND_TO_ZERO (1 << 3) 334 #define CL_FP_ROUND_TO_INF (1 << 4) 335 #define CL_FP_FMA (1 << 5) 336 #define CL_FP_SOFT_FLOAT (1 << 6) 337 #define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7) 338 339 /* cl_device_mem_cache_type */ 340 #define CL_NONE 0x0 341 #define CL_READ_ONLY_CACHE 0x1 342 #define CL_READ_WRITE_CACHE 0x2 343 344 /* cl_device_local_mem_type */ 345 #define CL_LOCAL 0x1 346 #define CL_GLOBAL 0x2 347 348 /* cl_device_exec_capabilities - bitfield */ 349 #define CL_EXEC_KERNEL (1 << 0) 350 #define CL_EXEC_NATIVE_KERNEL (1 << 1) 351 352 /* cl_command_queue_properties - bitfield */ 353 #define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0) 354 #define CL_QUEUE_PROFILING_ENABLE (1 << 1) 355 #define CL_QUEUE_ON_DEVICE (1 << 2) 356 #define CL_QUEUE_ON_DEVICE_DEFAULT (1 << 3) 357 358 /* cl_context_info */ 359 #define CL_CONTEXT_REFERENCE_COUNT 0x1080 360 #define CL_CONTEXT_DEVICES 0x1081 361 #define CL_CONTEXT_PROPERTIES 0x1082 362 #define CL_CONTEXT_NUM_DEVICES 0x1083 363 364 /* cl_context_properties */ 365 #define CL_CONTEXT_PLATFORM 0x1084 366 #define CL_CONTEXT_INTEROP_USER_SYNC 0x1085 367 368 /* cl_device_partition_property */ 369 #define CL_DEVICE_PARTITION_EQUALLY 0x1086 370 #define CL_DEVICE_PARTITION_BY_COUNTS 0x1087 371 #define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0 372 #define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088 373 374 /* cl_device_affinity_domain */ 375 #define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0) 376 #define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1) 377 #define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2) 378 #define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3) 379 #define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4) 380 #define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5) 381 382 /* cl_device_svm_capabilities */ 383 #define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0) 384 #define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1) 385 #define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2) 386 #define CL_DEVICE_SVM_ATOMICS (1 << 3) 387 388 /* cl_command_queue_info */ 389 #define CL_QUEUE_CONTEXT 0x1090 390 #define CL_QUEUE_DEVICE 0x1091 391 #define CL_QUEUE_REFERENCE_COUNT 0x1092 392 #define CL_QUEUE_PROPERTIES 0x1093 393 #define CL_QUEUE_SIZE 0x1094 394 #define CL_QUEUE_DEVICE_DEFAULT 0x1095 395 396 /* cl_mem_flags and cl_svm_mem_flags - bitfield */ 397 #define CL_MEM_READ_WRITE (1 << 0) 398 #define CL_MEM_WRITE_ONLY (1 << 1) 399 #define CL_MEM_READ_ONLY (1 << 2) 400 #define CL_MEM_USE_HOST_PTR (1 << 3) 401 #define CL_MEM_ALLOC_HOST_PTR (1 << 4) 402 #define CL_MEM_COPY_HOST_PTR (1 << 5) 403 /* reserved (1 << 6) */ 404 #define CL_MEM_HOST_WRITE_ONLY (1 << 7) 405 #define CL_MEM_HOST_READ_ONLY (1 << 8) 406 #define CL_MEM_HOST_NO_ACCESS (1 << 9) 407 #define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10) /* used by cl_svm_mem_flags only */ 408 #define CL_MEM_SVM_ATOMICS (1 << 11) /* used by cl_svm_mem_flags only */ 409 #define CL_MEM_KERNEL_READ_AND_WRITE (1 << 12) 410 411 /* cl_mem_migration_flags - bitfield */ 412 #define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0) 413 #define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1) 414 415 /* cl_channel_order */ 416 #define CL_R 0x10B0 417 #define CL_A 0x10B1 418 #define CL_RG 0x10B2 419 #define CL_RA 0x10B3 420 #define CL_RGB 0x10B4 421 #define CL_RGBA 0x10B5 422 #define CL_BGRA 0x10B6 423 #define CL_ARGB 0x10B7 424 #define CL_INTENSITY 0x10B8 425 #define CL_LUMINANCE 0x10B9 426 #define CL_Rx 0x10BA 427 #define CL_RGx 0x10BB 428 #define CL_RGBx 0x10BC 429 #define CL_DEPTH 0x10BD 430 #define CL_DEPTH_STENCIL 0x10BE 431 #define CL_sRGB 0x10BF 432 #define CL_sRGBx 0x10C0 433 #define CL_sRGBA 0x10C1 434 #define CL_sBGRA 0x10C2 435 #define CL_ABGR 0x10C3 436 437 /* cl_channel_type */ 438 #define CL_SNORM_INT8 0x10D0 439 #define CL_SNORM_INT16 0x10D1 440 #define CL_UNORM_INT8 0x10D2 441 #define CL_UNORM_INT16 0x10D3 442 #define CL_UNORM_SHORT_565 0x10D4 443 #define CL_UNORM_SHORT_555 0x10D5 444 #define CL_UNORM_INT_101010 0x10D6 445 #define CL_SIGNED_INT8 0x10D7 446 #define CL_SIGNED_INT16 0x10D8 447 #define CL_SIGNED_INT32 0x10D9 448 #define CL_UNSIGNED_INT8 0x10DA 449 #define CL_UNSIGNED_INT16 0x10DB 450 #define CL_UNSIGNED_INT32 0x10DC 451 #define CL_HALF_FLOAT 0x10DD 452 #define CL_FLOAT 0x10DE 453 #define CL_UNORM_INT24 0x10DF 454 #define CL_UNORM_INT_101010_2 0x10E0 455 456 /* cl_mem_object_type */ 457 #define CL_MEM_OBJECT_BUFFER 0x10F0 458 #define CL_MEM_OBJECT_IMAGE2D 0x10F1 459 #define CL_MEM_OBJECT_IMAGE3D 0x10F2 460 #define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3 461 #define CL_MEM_OBJECT_IMAGE1D 0x10F4 462 #define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5 463 #define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6 464 #define CL_MEM_OBJECT_PIPE 0x10F7 465 466 /* cl_mem_info */ 467 #define CL_MEM_TYPE 0x1100 468 #define CL_MEM_FLAGS 0x1101 469 #define CL_MEM_SIZE 0x1102 470 #define CL_MEM_HOST_PTR 0x1103 471 #define CL_MEM_MAP_COUNT 0x1104 472 #define CL_MEM_REFERENCE_COUNT 0x1105 473 #define CL_MEM_CONTEXT 0x1106 474 #define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107 475 #define CL_MEM_OFFSET 0x1108 476 #define CL_MEM_USES_SVM_POINTER 0x1109 477 478 /* cl_image_info */ 479 #define CL_IMAGE_FORMAT 0x1110 480 #define CL_IMAGE_ELEMENT_SIZE 0x1111 481 #define CL_IMAGE_ROW_PITCH 0x1112 482 #define CL_IMAGE_SLICE_PITCH 0x1113 483 #define CL_IMAGE_WIDTH 0x1114 484 #define CL_IMAGE_HEIGHT 0x1115 485 #define CL_IMAGE_DEPTH 0x1116 486 #define CL_IMAGE_ARRAY_SIZE 0x1117 487 #define CL_IMAGE_BUFFER 0x1118 488 #define CL_IMAGE_NUM_MIP_LEVELS 0x1119 489 #define CL_IMAGE_NUM_SAMPLES 0x111A 490 491 /* cl_pipe_info */ 492 #define CL_PIPE_PACKET_SIZE 0x1120 493 #define CL_PIPE_MAX_PACKETS 0x1121 494 495 /* cl_addressing_mode */ 496 #define CL_ADDRESS_NONE 0x1130 497 #define CL_ADDRESS_CLAMP_TO_EDGE 0x1131 498 #define CL_ADDRESS_CLAMP 0x1132 499 #define CL_ADDRESS_REPEAT 0x1133 500 #define CL_ADDRESS_MIRRORED_REPEAT 0x1134 501 502 /* cl_filter_mode */ 503 #define CL_FILTER_NEAREST 0x1140 504 #define CL_FILTER_LINEAR 0x1141 505 506 /* cl_sampler_info */ 507 #define CL_SAMPLER_REFERENCE_COUNT 0x1150 508 #define CL_SAMPLER_CONTEXT 0x1151 509 #define CL_SAMPLER_NORMALIZED_COORDS 0x1152 510 #define CL_SAMPLER_ADDRESSING_MODE 0x1153 511 #define CL_SAMPLER_FILTER_MODE 0x1154 512 #define CL_SAMPLER_MIP_FILTER_MODE 0x1155 513 #define CL_SAMPLER_LOD_MIN 0x1156 514 #define CL_SAMPLER_LOD_MAX 0x1157 515 516 /* cl_map_flags - bitfield */ 517 #define CL_MAP_READ (1 << 0) 518 #define CL_MAP_WRITE (1 << 1) 519 #define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2) 520 521 /* cl_program_info */ 522 #define CL_PROGRAM_REFERENCE_COUNT 0x1160 523 #define CL_PROGRAM_CONTEXT 0x1161 524 #define CL_PROGRAM_NUM_DEVICES 0x1162 525 #define CL_PROGRAM_DEVICES 0x1163 526 #define CL_PROGRAM_SOURCE 0x1164 527 #define CL_PROGRAM_BINARY_SIZES 0x1165 528 #define CL_PROGRAM_BINARIES 0x1166 529 #define CL_PROGRAM_NUM_KERNELS 0x1167 530 #define CL_PROGRAM_KERNEL_NAMES 0x1168 531 #define CL_PROGRAM_IL 0x1169 532 #define CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT 0x116A 533 #define CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT 0x116B 534 535 /* cl_program_build_info */ 536 #define CL_PROGRAM_BUILD_STATUS 0x1181 537 #define CL_PROGRAM_BUILD_OPTIONS 0x1182 538 #define CL_PROGRAM_BUILD_LOG 0x1183 539 #define CL_PROGRAM_BINARY_TYPE 0x1184 540 #define CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE 0x1185 541 542 /* cl_program_binary_type */ 543 #define CL_PROGRAM_BINARY_TYPE_NONE 0x0 544 #define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1 545 #define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2 546 #define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4 547 548 /* cl_build_status */ 549 #define CL_BUILD_SUCCESS 0 550 #define CL_BUILD_NONE -1 551 #define CL_BUILD_ERROR -2 552 #define CL_BUILD_IN_PROGRESS -3 553 554 /* cl_kernel_info */ 555 #define CL_KERNEL_FUNCTION_NAME 0x1190 556 #define CL_KERNEL_NUM_ARGS 0x1191 557 #define CL_KERNEL_REFERENCE_COUNT 0x1192 558 #define CL_KERNEL_CONTEXT 0x1193 559 #define CL_KERNEL_PROGRAM 0x1194 560 #define CL_KERNEL_ATTRIBUTES 0x1195 561 #define CL_KERNEL_MAX_NUM_SUB_GROUPS 0x11B9 562 #define CL_KERNEL_COMPILE_NUM_SUB_GROUPS 0x11BA 563 564 /* cl_kernel_arg_info */ 565 #define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196 566 #define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197 567 #define CL_KERNEL_ARG_TYPE_NAME 0x1198 568 #define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199 569 #define CL_KERNEL_ARG_NAME 0x119A 570 571 /* cl_kernel_arg_address_qualifier */ 572 #define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B 573 #define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C 574 #define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D 575 #define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E 576 577 /* cl_kernel_arg_access_qualifier */ 578 #define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0 579 #define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1 580 #define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2 581 #define CL_KERNEL_ARG_ACCESS_NONE 0x11A3 582 583 /* cl_kernel_arg_type_qualifier */ 584 #define CL_KERNEL_ARG_TYPE_NONE 0 585 #define CL_KERNEL_ARG_TYPE_CONST (1 << 0) 586 #define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1) 587 #define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2) 588 #define CL_KERNEL_ARG_TYPE_PIPE (1 << 3) 589 590 /* cl_kernel_work_group_info */ 591 #define CL_KERNEL_WORK_GROUP_SIZE 0x11B0 592 #define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1 593 #define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2 594 #define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3 595 #define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4 596 #define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5 597 598 /* cl_kernel_sub_group_info */ 599 #define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE 0x2033 600 #define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE 0x2034 601 #define CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT 0x11B8 602 603 /* cl_kernel_exec_info */ 604 #define CL_KERNEL_EXEC_INFO_SVM_PTRS 0x11B6 605 #define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM 0x11B7 606 607 /* cl_event_info */ 608 #define CL_EVENT_COMMAND_QUEUE 0x11D0 609 #define CL_EVENT_COMMAND_TYPE 0x11D1 610 #define CL_EVENT_REFERENCE_COUNT 0x11D2 611 #define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3 612 #define CL_EVENT_CONTEXT 0x11D4 613 614 /* cl_command_type */ 615 #define CL_COMMAND_NDRANGE_KERNEL 0x11F0 616 #define CL_COMMAND_TASK 0x11F1 617 #define CL_COMMAND_NATIVE_KERNEL 0x11F2 618 #define CL_COMMAND_READ_BUFFER 0x11F3 619 #define CL_COMMAND_WRITE_BUFFER 0x11F4 620 #define CL_COMMAND_COPY_BUFFER 0x11F5 621 #define CL_COMMAND_READ_IMAGE 0x11F6 622 #define CL_COMMAND_WRITE_IMAGE 0x11F7 623 #define CL_COMMAND_COPY_IMAGE 0x11F8 624 #define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9 625 #define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA 626 #define CL_COMMAND_MAP_BUFFER 0x11FB 627 #define CL_COMMAND_MAP_IMAGE 0x11FC 628 #define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD 629 #define CL_COMMAND_MARKER 0x11FE 630 #define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF 631 #define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200 632 #define CL_COMMAND_READ_BUFFER_RECT 0x1201 633 #define CL_COMMAND_WRITE_BUFFER_RECT 0x1202 634 #define CL_COMMAND_COPY_BUFFER_RECT 0x1203 635 #define CL_COMMAND_USER 0x1204 636 #define CL_COMMAND_BARRIER 0x1205 637 #define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206 638 #define CL_COMMAND_FILL_BUFFER 0x1207 639 #define CL_COMMAND_FILL_IMAGE 0x1208 640 #define CL_COMMAND_SVM_FREE 0x1209 641 #define CL_COMMAND_SVM_MEMCPY 0x120A 642 #define CL_COMMAND_SVM_MEMFILL 0x120B 643 #define CL_COMMAND_SVM_MAP 0x120C 644 #define CL_COMMAND_SVM_UNMAP 0x120D 645 #define CL_COMMAND_SVM_MIGRATE_MEM 0x120E 646 647 /* command execution status */ 648 #define CL_COMPLETE 0x0 649 #define CL_RUNNING 0x1 650 #define CL_SUBMITTED 0x2 651 #define CL_QUEUED 0x3 652 653 /* cl_buffer_create_type */ 654 #define CL_BUFFER_CREATE_TYPE_REGION 0x1220 655 656 /* cl_profiling_info */ 657 #define CL_PROFILING_COMMAND_QUEUED 0x1280 658 #define CL_PROFILING_COMMAND_SUBMIT 0x1281 659 #define CL_PROFILING_COMMAND_START 0x1282 660 #define CL_PROFILING_COMMAND_END 0x1283 661 #define CL_PROFILING_COMMAND_COMPLETE 0x1284 662 663 /********************************************************************************************************/ 664 665 /* Platform API */ 666 extern CL_API_ENTRY cl_int CL_API_CALL 667 clGetPlatformIDs(cl_uint /* num_entries */, 668 cl_platform_id * /* platforms */, 669 cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0; 670 671 extern CL_API_ENTRY cl_int CL_API_CALL 672 clGetPlatformInfo(cl_platform_id /* platform */, 673 cl_platform_info /* param_name */, 674 size_t /* param_value_size */, 675 void * /* param_value */, 676 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 677 678 /* Device APIs */ 679 extern CL_API_ENTRY cl_int CL_API_CALL 680 clGetDeviceIDs(cl_platform_id /* platform */, 681 cl_device_type /* device_type */, 682 cl_uint /* num_entries */, 683 cl_device_id * /* devices */, 684 cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0; 685 686 extern CL_API_ENTRY cl_int CL_API_CALL 687 clGetDeviceInfo(cl_device_id /* device */, 688 cl_device_info /* param_name */, 689 size_t /* param_value_size */, 690 void * /* param_value */, 691 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 692 693 extern CL_API_ENTRY cl_int CL_API_CALL 694 clCreateSubDevices(cl_device_id /* in_device */, 695 const cl_device_partition_property * /* properties */, 696 cl_uint /* num_devices */, 697 cl_device_id * /* out_devices */, 698 cl_uint * /* num_devices_ret */) CL_API_SUFFIX__VERSION_1_2; 699 700 extern CL_API_ENTRY cl_int CL_API_CALL 701 clRetainDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2; 702 703 extern CL_API_ENTRY cl_int CL_API_CALL 704 clReleaseDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2; 705 706 extern CL_API_ENTRY cl_int CL_API_CALL 707 clSetDefaultDeviceCommandQueue(cl_context /* context */, 708 cl_device_id /* device */, 709 cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_2_1; 710 711 extern CL_API_ENTRY cl_int CL_API_CALL 712 clGetDeviceAndHostTimer(cl_device_id /* device */, 713 cl_ulong* /* device_timestamp */, 714 cl_ulong* /* host_timestamp */) CL_API_SUFFIX__VERSION_2_1; 715 716 extern CL_API_ENTRY cl_int CL_API_CALL 717 clGetHostTimer(cl_device_id /* device */, 718 cl_ulong * /* host_timestamp */) CL_API_SUFFIX__VERSION_2_1; 719 720 721 /* Context APIs */ 722 extern CL_API_ENTRY cl_context CL_API_CALL 723 clCreateContext(const cl_context_properties * /* properties */, 724 cl_uint /* num_devices */, 725 const cl_device_id * /* devices */, 726 void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *), 727 void * /* user_data */, 728 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 729 730 extern CL_API_ENTRY cl_context CL_API_CALL 731 clCreateContextFromType(const cl_context_properties * /* properties */, 732 cl_device_type /* device_type */, 733 void (CL_CALLBACK * /* pfn_notify*/ )(const char *, const void *, size_t, void *), 734 void * /* user_data */, 735 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 736 737 extern CL_API_ENTRY cl_int CL_API_CALL 738 clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0; 739 740 extern CL_API_ENTRY cl_int CL_API_CALL 741 clReleaseContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0; 742 743 extern CL_API_ENTRY cl_int CL_API_CALL 744 clGetContextInfo(cl_context /* context */, 745 cl_context_info /* param_name */, 746 size_t /* param_value_size */, 747 void * /* param_value */, 748 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 749 750 /* Command Queue APIs */ 751 extern CL_API_ENTRY cl_command_queue CL_API_CALL 752 clCreateCommandQueueWithProperties(cl_context /* context */, 753 cl_device_id /* device */, 754 const cl_queue_properties * /* properties */, 755 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0; 756 757 extern CL_API_ENTRY cl_int CL_API_CALL 758 clRetainCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; 759 760 extern CL_API_ENTRY cl_int CL_API_CALL 761 clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; 762 763 extern CL_API_ENTRY cl_int CL_API_CALL 764 clGetCommandQueueInfo(cl_command_queue /* command_queue */, 765 cl_command_queue_info /* param_name */, 766 size_t /* param_value_size */, 767 void * /* param_value */, 768 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 769 770 /* Memory Object APIs */ 771 extern CL_API_ENTRY cl_mem CL_API_CALL 772 clCreateBuffer(cl_context /* context */, 773 cl_mem_flags /* flags */, 774 size_t /* size */, 775 void * /* host_ptr */, 776 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 777 778 extern CL_API_ENTRY cl_mem CL_API_CALL 779 clCreateSubBuffer(cl_mem /* buffer */, 780 cl_mem_flags /* flags */, 781 cl_buffer_create_type /* buffer_create_type */, 782 const void * /* buffer_create_info */, 783 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; 784 785 extern CL_API_ENTRY cl_mem CL_API_CALL 786 clCreateImage(cl_context /* context */, 787 cl_mem_flags /* flags */, 788 const cl_image_format * /* image_format */, 789 const cl_image_desc * /* image_desc */, 790 void * /* host_ptr */, 791 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2; 792 793 extern CL_API_ENTRY cl_mem CL_API_CALL 794 clCreatePipe(cl_context /* context */, 795 cl_mem_flags /* flags */, 796 cl_uint /* pipe_packet_size */, 797 cl_uint /* pipe_max_packets */, 798 const cl_pipe_properties * /* properties */, 799 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0; 800 801 extern CL_API_ENTRY cl_int CL_API_CALL 802 clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0; 803 804 extern CL_API_ENTRY cl_int CL_API_CALL 805 clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0; 806 807 extern CL_API_ENTRY cl_int CL_API_CALL 808 clGetSupportedImageFormats(cl_context /* context */, 809 cl_mem_flags /* flags */, 810 cl_mem_object_type /* image_type */, 811 cl_uint /* num_entries */, 812 cl_image_format * /* image_formats */, 813 cl_uint * /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0; 814 815 extern CL_API_ENTRY cl_int CL_API_CALL 816 clGetMemObjectInfo(cl_mem /* memobj */, 817 cl_mem_info /* param_name */, 818 size_t /* param_value_size */, 819 void * /* param_value */, 820 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 821 822 extern CL_API_ENTRY cl_int CL_API_CALL 823 clGetImageInfo(cl_mem /* image */, 824 cl_image_info /* param_name */, 825 size_t /* param_value_size */, 826 void * /* param_value */, 827 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 828 829 extern CL_API_ENTRY cl_int CL_API_CALL 830 clGetPipeInfo(cl_mem /* pipe */, 831 cl_pipe_info /* param_name */, 832 size_t /* param_value_size */, 833 void * /* param_value */, 834 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_2_0; 835 836 837 extern CL_API_ENTRY cl_int CL_API_CALL 838 clSetMemObjectDestructorCallback(cl_mem /* memobj */, 839 void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/), 840 void * /*user_data */ ) CL_API_SUFFIX__VERSION_1_1; 841 842 /* SVM Allocation APIs */ 843 extern CL_API_ENTRY void * CL_API_CALL 844 clSVMAlloc(cl_context /* context */, 845 cl_svm_mem_flags /* flags */, 846 size_t /* size */, 847 cl_uint /* alignment */) CL_API_SUFFIX__VERSION_2_0; 848 849 extern CL_API_ENTRY void CL_API_CALL 850 clSVMFree(cl_context /* context */, 851 void * /* svm_pointer */) CL_API_SUFFIX__VERSION_2_0; 852 853 /* Sampler APIs */ 854 extern CL_API_ENTRY cl_sampler CL_API_CALL 855 clCreateSamplerWithProperties(cl_context /* context */, 856 const cl_sampler_properties * /* normalized_coords */, 857 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0; 858 859 extern CL_API_ENTRY cl_int CL_API_CALL 860 clRetainSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0; 861 862 extern CL_API_ENTRY cl_int CL_API_CALL 863 clReleaseSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0; 864 865 extern CL_API_ENTRY cl_int CL_API_CALL 866 clGetSamplerInfo(cl_sampler /* sampler */, 867 cl_sampler_info /* param_name */, 868 size_t /* param_value_size */, 869 void * /* param_value */, 870 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 871 872 /* Program Object APIs */ 873 extern CL_API_ENTRY cl_program CL_API_CALL 874 clCreateProgramWithSource(cl_context /* context */, 875 cl_uint /* count */, 876 const char ** /* strings */, 877 const size_t * /* lengths */, 878 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 879 880 extern CL_API_ENTRY cl_program CL_API_CALL 881 clCreateProgramWithBinary(cl_context /* context */, 882 cl_uint /* num_devices */, 883 const cl_device_id * /* device_list */, 884 const size_t * /* lengths */, 885 const unsigned char ** /* binaries */, 886 cl_int * /* binary_status */, 887 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 888 889 extern CL_API_ENTRY cl_program CL_API_CALL 890 clCreateProgramWithBuiltInKernels(cl_context /* context */, 891 cl_uint /* num_devices */, 892 const cl_device_id * /* device_list */, 893 const char * /* kernel_names */, 894 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2; 895 896 extern CL_API_ENTRY cl_program CL_API_CALL 897 clCreateProgramWithIL(cl_context /* context */, 898 const void* /* il */, 899 size_t /* length */, 900 cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_2_1; 901 902 903 extern CL_API_ENTRY cl_int CL_API_CALL 904 clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0; 905 906 extern CL_API_ENTRY cl_int CL_API_CALL 907 clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0; 908 909 extern CL_API_ENTRY cl_int CL_API_CALL 910 clBuildProgram(cl_program /* program */, 911 cl_uint /* num_devices */, 912 const cl_device_id * /* device_list */, 913 const char * /* options */, 914 void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), 915 void * /* user_data */) CL_API_SUFFIX__VERSION_1_0; 916 917 extern CL_API_ENTRY cl_int CL_API_CALL 918 clCompileProgram(cl_program /* program */, 919 cl_uint /* num_devices */, 920 const cl_device_id * /* device_list */, 921 const char * /* options */, 922 cl_uint /* num_input_headers */, 923 const cl_program * /* input_headers */, 924 const char ** /* header_include_names */, 925 void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), 926 void * /* user_data */) CL_API_SUFFIX__VERSION_1_2; 927 928 extern CL_API_ENTRY cl_program CL_API_CALL 929 clLinkProgram(cl_context /* context */, 930 cl_uint /* num_devices */, 931 const cl_device_id * /* device_list */, 932 const char * /* options */, 933 cl_uint /* num_input_programs */, 934 const cl_program * /* input_programs */, 935 void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), 936 void * /* user_data */, 937 cl_int * /* errcode_ret */ ) CL_API_SUFFIX__VERSION_1_2; 938 939 extern CL_API_ENTRY cl_int CL_API_CALL 940 clSetProgramReleaseCallback(cl_program /* program */, 941 void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), 942 void * /* user_data */) CL_API_SUFFIX__VERSION_2_2; 943 944 extern CL_API_ENTRY cl_int CL_API_CALL 945 clSetProgramSpecializationConstant(cl_program /* program */, 946 cl_uint /* spec_id */, 947 size_t /* spec_size */, 948 const void* /* spec_value */) CL_API_SUFFIX__VERSION_2_2; 949 950 951 extern CL_API_ENTRY cl_int CL_API_CALL 952 clUnloadPlatformCompiler(cl_platform_id /* platform */) CL_API_SUFFIX__VERSION_1_2; 953 954 extern CL_API_ENTRY cl_int CL_API_CALL 955 clGetProgramInfo(cl_program /* program */, 956 cl_program_info /* param_name */, 957 size_t /* param_value_size */, 958 void * /* param_value */, 959 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 960 961 extern CL_API_ENTRY cl_int CL_API_CALL 962 clGetProgramBuildInfo(cl_program /* program */, 963 cl_device_id /* device */, 964 cl_program_build_info /* param_name */, 965 size_t /* param_value_size */, 966 void * /* param_value */, 967 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 968 969 /* Kernel Object APIs */ 970 extern CL_API_ENTRY cl_kernel CL_API_CALL 971 clCreateKernel(cl_program /* program */, 972 const char * /* kernel_name */, 973 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 974 975 extern CL_API_ENTRY cl_int CL_API_CALL 976 clCreateKernelsInProgram(cl_program /* program */, 977 cl_uint /* num_kernels */, 978 cl_kernel * /* kernels */, 979 cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0; 980 981 extern CL_API_ENTRY cl_kernel CL_API_CALL 982 clCloneKernel(cl_kernel /* source_kernel */, 983 cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_2_1; 984 985 extern CL_API_ENTRY cl_int CL_API_CALL 986 clRetainKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0; 987 988 extern CL_API_ENTRY cl_int CL_API_CALL 989 clReleaseKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0; 990 991 extern CL_API_ENTRY cl_int CL_API_CALL 992 clSetKernelArg(cl_kernel /* kernel */, 993 cl_uint /* arg_index */, 994 size_t /* arg_size */, 995 const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0; 996 997 extern CL_API_ENTRY cl_int CL_API_CALL 998 clSetKernelArgSVMPointer(cl_kernel /* kernel */, 999 cl_uint /* arg_index */, 1000 const void * /* arg_value */) CL_API_SUFFIX__VERSION_2_0; 1001 1002 extern CL_API_ENTRY cl_int CL_API_CALL 1003 clSetKernelExecInfo(cl_kernel /* kernel */, 1004 cl_kernel_exec_info /* param_name */, 1005 size_t /* param_value_size */, 1006 const void * /* param_value */) CL_API_SUFFIX__VERSION_2_0; 1007 1008 extern CL_API_ENTRY cl_int CL_API_CALL 1009 clGetKernelInfo(cl_kernel /* kernel */, 1010 cl_kernel_info /* param_name */, 1011 size_t /* param_value_size */, 1012 void * /* param_value */, 1013 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 1014 1015 extern CL_API_ENTRY cl_int CL_API_CALL 1016 clGetKernelArgInfo(cl_kernel /* kernel */, 1017 cl_uint /* arg_indx */, 1018 cl_kernel_arg_info /* param_name */, 1019 size_t /* param_value_size */, 1020 void * /* param_value */, 1021 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_2; 1022 1023 extern CL_API_ENTRY cl_int CL_API_CALL 1024 clGetKernelWorkGroupInfo(cl_kernel /* kernel */, 1025 cl_device_id /* device */, 1026 cl_kernel_work_group_info /* param_name */, 1027 size_t /* param_value_size */, 1028 void * /* param_value */, 1029 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 1030 1031 extern CL_API_ENTRY cl_int CL_API_CALL 1032 clGetKernelSubGroupInfo(cl_kernel /* kernel */, 1033 cl_device_id /* device */, 1034 cl_kernel_sub_group_info /* param_name */, 1035 size_t /* input_value_size */, 1036 const void* /*input_value */, 1037 size_t /* param_value_size */, 1038 void* /* param_value */, 1039 size_t* /* param_value_size_ret */ ) CL_API_SUFFIX__VERSION_2_1; 1040 1041 1042 /* Event Object APIs */ 1043 extern CL_API_ENTRY cl_int CL_API_CALL 1044 clWaitForEvents(cl_uint /* num_events */, 1045 const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0; 1046 1047 extern CL_API_ENTRY cl_int CL_API_CALL 1048 clGetEventInfo(cl_event /* event */, 1049 cl_event_info /* param_name */, 1050 size_t /* param_value_size */, 1051 void * /* param_value */, 1052 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 1053 1054 extern CL_API_ENTRY cl_event CL_API_CALL 1055 clCreateUserEvent(cl_context /* context */, 1056 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; 1057 1058 extern CL_API_ENTRY cl_int CL_API_CALL 1059 clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; 1060 1061 extern CL_API_ENTRY cl_int CL_API_CALL 1062 clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; 1063 1064 extern CL_API_ENTRY cl_int CL_API_CALL 1065 clSetUserEventStatus(cl_event /* event */, 1066 cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1; 1067 1068 extern CL_API_ENTRY cl_int CL_API_CALL 1069 clSetEventCallback( cl_event /* event */, 1070 cl_int /* command_exec_callback_type */, 1071 void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *), 1072 void * /* user_data */) CL_API_SUFFIX__VERSION_1_1; 1073 1074 /* Profiling APIs */ 1075 extern CL_API_ENTRY cl_int CL_API_CALL 1076 clGetEventProfilingInfo(cl_event /* event */, 1077 cl_profiling_info /* param_name */, 1078 size_t /* param_value_size */, 1079 void * /* param_value */, 1080 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 1081 1082 /* Flush and Finish APIs */ 1083 extern CL_API_ENTRY cl_int CL_API_CALL 1084 clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; 1085 1086 extern CL_API_ENTRY cl_int CL_API_CALL 1087 clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; 1088 1089 /* Enqueued Commands APIs */ 1090 extern CL_API_ENTRY cl_int CL_API_CALL 1091 clEnqueueReadBuffer(cl_command_queue /* command_queue */, 1092 cl_mem /* buffer */, 1093 cl_bool /* blocking_read */, 1094 size_t /* offset */, 1095 size_t /* size */, 1096 void * /* ptr */, 1097 cl_uint /* num_events_in_wait_list */, 1098 const cl_event * /* event_wait_list */, 1099 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 1100 1101 extern CL_API_ENTRY cl_int CL_API_CALL 1102 clEnqueueReadBufferRect(cl_command_queue /* command_queue */, 1103 cl_mem /* buffer */, 1104 cl_bool /* blocking_read */, 1105 const size_t * /* buffer_offset */, 1106 const size_t * /* host_offset */, 1107 const size_t * /* region */, 1108 size_t /* buffer_row_pitch */, 1109 size_t /* buffer_slice_pitch */, 1110 size_t /* host_row_pitch */, 1111 size_t /* host_slice_pitch */, 1112 void * /* ptr */, 1113 cl_uint /* num_events_in_wait_list */, 1114 const cl_event * /* event_wait_list */, 1115 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; 1116 1117 extern CL_API_ENTRY cl_int CL_API_CALL 1118 clEnqueueWriteBuffer(cl_command_queue /* command_queue */, 1119 cl_mem /* buffer */, 1120 cl_bool /* blocking_write */, 1121 size_t /* offset */, 1122 size_t /* size */, 1123 const void * /* ptr */, 1124 cl_uint /* num_events_in_wait_list */, 1125 const cl_event * /* event_wait_list */, 1126 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 1127 1128 extern CL_API_ENTRY cl_int CL_API_CALL 1129 clEnqueueWriteBufferRect(cl_command_queue /* command_queue */, 1130 cl_mem /* buffer */, 1131 cl_bool /* blocking_write */, 1132 const size_t * /* buffer_offset */, 1133 const size_t * /* host_offset */, 1134 const size_t * /* region */, 1135 size_t /* buffer_row_pitch */, 1136 size_t /* buffer_slice_pitch */, 1137 size_t /* host_row_pitch */, 1138 size_t /* host_slice_pitch */, 1139 const void * /* ptr */, 1140 cl_uint /* num_events_in_wait_list */, 1141 const cl_event * /* event_wait_list */, 1142 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; 1143 1144 extern CL_API_ENTRY cl_int CL_API_CALL 1145 clEnqueueFillBuffer(cl_command_queue /* command_queue */, 1146 cl_mem /* buffer */, 1147 const void * /* pattern */, 1148 size_t /* pattern_size */, 1149 size_t /* offset */, 1150 size_t /* size */, 1151 cl_uint /* num_events_in_wait_list */, 1152 const cl_event * /* event_wait_list */, 1153 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; 1154 1155 extern CL_API_ENTRY cl_int CL_API_CALL 1156 clEnqueueCopyBuffer(cl_command_queue /* command_queue */, 1157 cl_mem /* src_buffer */, 1158 cl_mem /* dst_buffer */, 1159 size_t /* src_offset */, 1160 size_t /* dst_offset */, 1161 size_t /* size */, 1162 cl_uint /* num_events_in_wait_list */, 1163 const cl_event * /* event_wait_list */, 1164 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 1165 1166 extern CL_API_ENTRY cl_int CL_API_CALL 1167 clEnqueueCopyBufferRect(cl_command_queue /* command_queue */, 1168 cl_mem /* src_buffer */, 1169 cl_mem /* dst_buffer */, 1170 const size_t * /* src_origin */, 1171 const size_t * /* dst_origin */, 1172 const size_t * /* region */, 1173 size_t /* src_row_pitch */, 1174 size_t /* src_slice_pitch */, 1175 size_t /* dst_row_pitch */, 1176 size_t /* dst_slice_pitch */, 1177 cl_uint /* num_events_in_wait_list */, 1178 const cl_event * /* event_wait_list */, 1179 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; 1180 1181 extern CL_API_ENTRY cl_int CL_API_CALL 1182 clEnqueueReadImage(cl_command_queue /* command_queue */, 1183 cl_mem /* image */, 1184 cl_bool /* blocking_read */, 1185 const size_t * /* origin[3] */, 1186 const size_t * /* region[3] */, 1187 size_t /* row_pitch */, 1188 size_t /* slice_pitch */, 1189 void * /* ptr */, 1190 cl_uint /* num_events_in_wait_list */, 1191 const cl_event * /* event_wait_list */, 1192 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 1193 1194 extern CL_API_ENTRY cl_int CL_API_CALL 1195 clEnqueueWriteImage(cl_command_queue /* command_queue */, 1196 cl_mem /* image */, 1197 cl_bool /* blocking_write */, 1198 const size_t * /* origin[3] */, 1199 const size_t * /* region[3] */, 1200 size_t /* input_row_pitch */, 1201 size_t /* input_slice_pitch */, 1202 const void * /* ptr */, 1203 cl_uint /* num_events_in_wait_list */, 1204 const cl_event * /* event_wait_list */, 1205 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 1206 1207 extern CL_API_ENTRY cl_int CL_API_CALL 1208 clEnqueueFillImage(cl_command_queue /* command_queue */, 1209 cl_mem /* image */, 1210 const void * /* fill_color */, 1211 const size_t * /* origin[3] */, 1212 const size_t * /* region[3] */, 1213 cl_uint /* num_events_in_wait_list */, 1214 const cl_event * /* event_wait_list */, 1215 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; 1216 1217 extern CL_API_ENTRY cl_int CL_API_CALL 1218 clEnqueueCopyImage(cl_command_queue /* command_queue */, 1219 cl_mem /* src_image */, 1220 cl_mem /* dst_image */, 1221 const size_t * /* src_origin[3] */, 1222 const size_t * /* dst_origin[3] */, 1223 const size_t * /* region[3] */, 1224 cl_uint /* num_events_in_wait_list */, 1225 const cl_event * /* event_wait_list */, 1226 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 1227 1228 extern CL_API_ENTRY cl_int CL_API_CALL 1229 clEnqueueCopyImageToBuffer(cl_command_queue /* command_queue */, 1230 cl_mem /* src_image */, 1231 cl_mem /* dst_buffer */, 1232 const size_t * /* src_origin[3] */, 1233 const size_t * /* region[3] */, 1234 size_t /* dst_offset */, 1235 cl_uint /* num_events_in_wait_list */, 1236 const cl_event * /* event_wait_list */, 1237 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 1238 1239 extern CL_API_ENTRY cl_int CL_API_CALL 1240 clEnqueueCopyBufferToImage(cl_command_queue /* command_queue */, 1241 cl_mem /* src_buffer */, 1242 cl_mem /* dst_image */, 1243 size_t /* src_offset */, 1244 const size_t * /* dst_origin[3] */, 1245 const size_t * /* region[3] */, 1246 cl_uint /* num_events_in_wait_list */, 1247 const cl_event * /* event_wait_list */, 1248 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 1249 1250 extern CL_API_ENTRY void * CL_API_CALL 1251 clEnqueueMapBuffer(cl_command_queue /* command_queue */, 1252 cl_mem /* buffer */, 1253 cl_bool /* blocking_map */, 1254 cl_map_flags /* map_flags */, 1255 size_t /* offset */, 1256 size_t /* size */, 1257 cl_uint /* num_events_in_wait_list */, 1258 const cl_event * /* event_wait_list */, 1259 cl_event * /* event */, 1260 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 1261 1262 extern CL_API_ENTRY void * CL_API_CALL 1263 clEnqueueMapImage(cl_command_queue /* command_queue */, 1264 cl_mem /* image */, 1265 cl_bool /* blocking_map */, 1266 cl_map_flags /* map_flags */, 1267 const size_t * /* origin[3] */, 1268 const size_t * /* region[3] */, 1269 size_t * /* image_row_pitch */, 1270 size_t * /* image_slice_pitch */, 1271 cl_uint /* num_events_in_wait_list */, 1272 const cl_event * /* event_wait_list */, 1273 cl_event * /* event */, 1274 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 1275 1276 extern CL_API_ENTRY cl_int CL_API_CALL 1277 clEnqueueUnmapMemObject(cl_command_queue /* command_queue */, 1278 cl_mem /* memobj */, 1279 void * /* mapped_ptr */, 1280 cl_uint /* num_events_in_wait_list */, 1281 const cl_event * /* event_wait_list */, 1282 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 1283 1284 extern CL_API_ENTRY cl_int CL_API_CALL 1285 clEnqueueMigrateMemObjects(cl_command_queue /* command_queue */, 1286 cl_uint /* num_mem_objects */, 1287 const cl_mem * /* mem_objects */, 1288 cl_mem_migration_flags /* flags */, 1289 cl_uint /* num_events_in_wait_list */, 1290 const cl_event * /* event_wait_list */, 1291 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; 1292 1293 extern CL_API_ENTRY cl_int CL_API_CALL 1294 clEnqueueNDRangeKernel(cl_command_queue /* command_queue */, 1295 cl_kernel /* kernel */, 1296 cl_uint /* work_dim */, 1297 const size_t * /* global_work_offset */, 1298 const size_t * /* global_work_size */, 1299 const size_t * /* local_work_size */, 1300 cl_uint /* num_events_in_wait_list */, 1301 const cl_event * /* event_wait_list */, 1302 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 1303 1304 extern CL_API_ENTRY cl_int CL_API_CALL 1305 clEnqueueNativeKernel(cl_command_queue /* command_queue */, 1306 void (CL_CALLBACK * /*user_func*/)(void *), 1307 void * /* args */, 1308 size_t /* cb_args */, 1309 cl_uint /* num_mem_objects */, 1310 const cl_mem * /* mem_list */, 1311 const void ** /* args_mem_loc */, 1312 cl_uint /* num_events_in_wait_list */, 1313 const cl_event * /* event_wait_list */, 1314 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 1315 1316 extern CL_API_ENTRY cl_int CL_API_CALL 1317 clEnqueueMarkerWithWaitList(cl_command_queue /* command_queue */, 1318 cl_uint /* num_events_in_wait_list */, 1319 const cl_event * /* event_wait_list */, 1320 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; 1321 1322 extern CL_API_ENTRY cl_int CL_API_CALL 1323 clEnqueueBarrierWithWaitList(cl_command_queue /* command_queue */, 1324 cl_uint /* num_events_in_wait_list */, 1325 const cl_event * /* event_wait_list */, 1326 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; 1327 1328 extern CL_API_ENTRY cl_int CL_API_CALL 1329 clEnqueueSVMFree(cl_command_queue /* command_queue */, 1330 cl_uint /* num_svm_pointers */, 1331 void *[] /* svm_pointers[] */, 1332 void (CL_CALLBACK * /*pfn_free_func*/)(cl_command_queue /* queue */, 1333 cl_uint /* num_svm_pointers */, 1334 void *[] /* svm_pointers[] */, 1335 void * /* user_data */), 1336 void * /* user_data */, 1337 cl_uint /* num_events_in_wait_list */, 1338 const cl_event * /* event_wait_list */, 1339 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0; 1340 1341 extern CL_API_ENTRY cl_int CL_API_CALL 1342 clEnqueueSVMMemcpy(cl_command_queue /* command_queue */, 1343 cl_bool /* blocking_copy */, 1344 void * /* dst_ptr */, 1345 const void * /* src_ptr */, 1346 size_t /* size */, 1347 cl_uint /* num_events_in_wait_list */, 1348 const cl_event * /* event_wait_list */, 1349 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0; 1350 1351 extern CL_API_ENTRY cl_int CL_API_CALL 1352 clEnqueueSVMMemFill(cl_command_queue /* command_queue */, 1353 void * /* svm_ptr */, 1354 const void * /* pattern */, 1355 size_t /* pattern_size */, 1356 size_t /* size */, 1357 cl_uint /* num_events_in_wait_list */, 1358 const cl_event * /* event_wait_list */, 1359 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0; 1360 1361 extern CL_API_ENTRY cl_int CL_API_CALL 1362 clEnqueueSVMMap(cl_command_queue /* command_queue */, 1363 cl_bool /* blocking_map */, 1364 cl_map_flags /* flags */, 1365 void * /* svm_ptr */, 1366 size_t /* size */, 1367 cl_uint /* num_events_in_wait_list */, 1368 const cl_event * /* event_wait_list */, 1369 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0; 1370 1371 extern CL_API_ENTRY cl_int CL_API_CALL 1372 clEnqueueSVMUnmap(cl_command_queue /* command_queue */, 1373 void * /* svm_ptr */, 1374 cl_uint /* num_events_in_wait_list */, 1375 const cl_event * /* event_wait_list */, 1376 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0; 1377 1378 extern CL_API_ENTRY cl_int CL_API_CALL 1379 clEnqueueSVMMigrateMem(cl_command_queue /* command_queue */, 1380 cl_uint /* num_svm_pointers */, 1381 const void ** /* svm_pointers */, 1382 const size_t * /* sizes */, 1383 cl_mem_migration_flags /* flags */, 1384 cl_uint /* num_events_in_wait_list */, 1385 const cl_event * /* event_wait_list */, 1386 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_1; 1387 1388 1389 /* Extension function access 1390 * 1391 * Returns the extension function address for the given function name, 1392 * or NULL if a valid function can not be found. The client must 1393 * check to make sure the address is not NULL, before using or 1394 * calling the returned function address. 1395 */ 1396 extern CL_API_ENTRY void * CL_API_CALL 1397 clGetExtensionFunctionAddressForPlatform(cl_platform_id /* platform */, 1398 const char * /* func_name */) CL_API_SUFFIX__VERSION_1_2; 1399 1400 1401 /* Deprecated OpenCL 1.1 APIs */ 1402 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL 1403 clCreateImage2D(cl_context /* context */, 1404 cl_mem_flags /* flags */, 1405 const cl_image_format * /* image_format */, 1406 size_t /* image_width */, 1407 size_t /* image_height */, 1408 size_t /* image_row_pitch */, 1409 void * /* host_ptr */, 1410 cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 1411 1412 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL 1413 clCreateImage3D(cl_context /* context */, 1414 cl_mem_flags /* flags */, 1415 const cl_image_format * /* image_format */, 1416 size_t /* image_width */, 1417 size_t /* image_height */, 1418 size_t /* image_depth */, 1419 size_t /* image_row_pitch */, 1420 size_t /* image_slice_pitch */, 1421 void * /* host_ptr */, 1422 cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 1423 1424 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL 1425 clEnqueueMarker(cl_command_queue /* command_queue */, 1426 cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 1427 1428 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL 1429 clEnqueueWaitForEvents(cl_command_queue /* command_queue */, 1430 cl_uint /* num_events */, 1431 const cl_event * /* event_list */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 1432 1433 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL 1434 clEnqueueBarrier(cl_command_queue /* command_queue */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 1435 1436 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL 1437 clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 1438 1439 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL 1440 clGetExtensionFunctionAddress(const char * /* func_name */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 1441 1442 /* Deprecated OpenCL 2.0 APIs */ 1443 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL 1444 clCreateCommandQueue(cl_context /* context */, 1445 cl_device_id /* device */, 1446 cl_command_queue_properties /* properties */, 1447 cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED; 1448 1449 1450 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL 1451 clCreateSampler(cl_context /* context */, 1452 cl_bool /* normalized_coords */, 1453 cl_addressing_mode /* addressing_mode */, 1454 cl_filter_mode /* filter_mode */, 1455 cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED; 1456 1457 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL 1458 clEnqueueTask(cl_command_queue /* command_queue */, 1459 cl_kernel /* kernel */, 1460 cl_uint /* num_events_in_wait_list */, 1461 const cl_event * /* event_wait_list */, 1462 cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED; 1463 1464 #ifdef __cplusplus 1465 } 1466 #endif 1467 1468 #endif /* __OPENCL_CL_H */ 1469 1470