28 #include <OpenCL/cl_platform.h> 30 #include <CL/cl_platform.h> 39 typedef struct _cl_platform_id * cl_platform_id;
40 typedef struct _cl_device_id * cl_device_id;
41 typedef struct _cl_context * cl_context;
42 typedef struct _cl_command_queue * cl_command_queue;
43 typedef struct _cl_mem * cl_mem;
44 typedef struct _cl_program * cl_program;
45 typedef struct _cl_kernel * cl_kernel;
46 typedef struct _cl_event * cl_event;
47 typedef struct _cl_sampler * cl_sampler;
49 typedef cl_uint cl_bool;
50 typedef cl_ulong cl_bitfield;
51 typedef cl_bitfield cl_device_type;
52 typedef cl_uint cl_platform_info;
53 typedef cl_uint cl_device_info;
54 typedef cl_bitfield cl_device_fp_config;
55 typedef cl_uint cl_device_mem_cache_type;
56 typedef cl_uint cl_device_local_mem_type;
57 typedef cl_bitfield cl_device_exec_capabilities;
58 typedef cl_bitfield cl_command_queue_properties;
59 typedef intptr_t cl_device_partition_property;
60 typedef cl_bitfield cl_device_affinity_domain;
62 typedef intptr_t cl_context_properties;
63 typedef cl_uint cl_context_info;
64 typedef cl_uint cl_command_queue_info;
65 typedef cl_uint cl_channel_order;
66 typedef cl_uint cl_channel_type;
67 typedef cl_bitfield cl_mem_flags;
68 typedef cl_uint cl_mem_object_type;
69 typedef cl_uint cl_mem_info;
70 typedef cl_bitfield cl_mem_migration_flags;
71 typedef cl_uint cl_image_info;
72 typedef cl_uint cl_buffer_create_type;
73 typedef cl_uint cl_addressing_mode;
74 typedef cl_uint cl_filter_mode;
75 typedef cl_uint cl_sampler_info;
76 typedef cl_bitfield cl_map_flags;
77 typedef cl_uint cl_program_info;
78 typedef cl_uint cl_program_build_info;
79 typedef cl_uint cl_program_binary_type;
80 typedef cl_int cl_build_status;
81 typedef cl_uint cl_kernel_info;
82 typedef cl_uint cl_kernel_arg_info;
83 typedef cl_uint cl_kernel_arg_address_qualifier;
84 typedef cl_uint cl_kernel_arg_access_qualifier;
85 typedef cl_bitfield cl_kernel_arg_type_qualifier;
86 typedef cl_uint cl_kernel_work_group_info;
87 typedef cl_uint cl_event_info;
88 typedef cl_uint cl_command_type;
89 typedef cl_uint cl_profiling_info;
93 cl_channel_order image_channel_order;
94 cl_channel_type image_channel_data_type;
98 cl_mem_object_type image_type;
102 size_t image_array_size;
103 size_t image_row_pitch;
104 size_t image_slice_pitch;
105 cl_uint num_mip_levels;
120 #define CL_DEVICE_NOT_FOUND -1 121 #define CL_DEVICE_NOT_AVAILABLE -2 122 #define CL_COMPILER_NOT_AVAILABLE -3 123 #define CL_MEM_OBJECT_ALLOCATION_FAILURE -4 124 #define CL_OUT_OF_RESOURCES -5 125 #define CL_OUT_OF_HOST_MEMORY -6 126 #define CL_PROFILING_INFO_NOT_AVAILABLE -7 127 #define CL_MEM_COPY_OVERLAP -8 128 #define CL_IMAGE_FORMAT_MISMATCH -9 129 #define CL_IMAGE_FORMAT_NOT_SUPPORTED -10 130 #define CL_BUILD_PROGRAM_FAILURE -11 131 #define CL_MAP_FAILURE -12 132 #define CL_MISALIGNED_SUB_BUFFER_OFFSET -13 133 #define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14 134 #define CL_COMPILE_PROGRAM_FAILURE -15 135 #define CL_LINKER_NOT_AVAILABLE -16 136 #define CL_LINK_PROGRAM_FAILURE -17 137 #define CL_DEVICE_PARTITION_FAILED -18 138 #define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19 140 #define CL_INVALID_VALUE -30 141 #define CL_INVALID_DEVICE_TYPE -31 142 #define CL_INVALID_PLATFORM -32 143 #define CL_INVALID_DEVICE -33 144 #define CL_INVALID_CONTEXT -34 145 #define CL_INVALID_QUEUE_PROPERTIES -35 146 #define CL_INVALID_COMMAND_QUEUE -36 147 #define CL_INVALID_HOST_PTR -37 148 #define CL_INVALID_MEM_OBJECT -38 149 #define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39 150 #define CL_INVALID_IMAGE_SIZE -40 151 #define CL_INVALID_SAMPLER -41 152 #define CL_INVALID_BINARY -42 153 #define CL_INVALID_BUILD_OPTIONS -43 154 #define CL_INVALID_PROGRAM -44 155 #define CL_INVALID_PROGRAM_EXECUTABLE -45 156 #define CL_INVALID_KERNEL_NAME -46 157 #define CL_INVALID_KERNEL_DEFINITION -47 158 #define CL_INVALID_KERNEL -48 159 #define CL_INVALID_ARG_INDEX -49 160 #define CL_INVALID_ARG_VALUE -50 161 #define CL_INVALID_ARG_SIZE -51 162 #define CL_INVALID_KERNEL_ARGS -52 163 #define CL_INVALID_WORK_DIMENSION -53 164 #define CL_INVALID_WORK_GROUP_SIZE -54 165 #define CL_INVALID_WORK_ITEM_SIZE -55 166 #define CL_INVALID_GLOBAL_OFFSET -56 167 #define CL_INVALID_EVENT_WAIT_LIST -57 168 #define CL_INVALID_EVENT -58 169 #define CL_INVALID_OPERATION -59 170 #define CL_INVALID_GL_OBJECT -60 171 #define CL_INVALID_BUFFER_SIZE -61 172 #define CL_INVALID_MIP_LEVEL -62 173 #define CL_INVALID_GLOBAL_WORK_SIZE -63 174 #define CL_INVALID_PROPERTY -64 175 #define CL_INVALID_IMAGE_DESCRIPTOR -65 176 #define CL_INVALID_COMPILER_OPTIONS -66 177 #define CL_INVALID_LINKER_OPTIONS -67 178 #define CL_INVALID_DEVICE_PARTITION_COUNT -68 181 #define CL_VERSION_1_0 1 182 #define CL_VERSION_1_1 1 183 #define CL_VERSION_1_2 1 188 #define CL_BLOCKING CL_TRUE 189 #define CL_NON_BLOCKING CL_FALSE 192 #define CL_PLATFORM_PROFILE 0x0900 193 #define CL_PLATFORM_VERSION 0x0901 194 #define CL_PLATFORM_NAME 0x0902 195 #define CL_PLATFORM_VENDOR 0x0903 196 #define CL_PLATFORM_EXTENSIONS 0x0904 199 #define CL_DEVICE_TYPE_DEFAULT (1 << 0) 200 #define CL_DEVICE_TYPE_CPU (1 << 1) 201 #define CL_DEVICE_TYPE_GPU (1 << 2) 202 #define CL_DEVICE_TYPE_ACCELERATOR (1 << 3) 203 #define CL_DEVICE_TYPE_CUSTOM (1 << 4) 204 #define CL_DEVICE_TYPE_ALL 0xFFFFFFFF 207 #define CL_DEVICE_TYPE 0x1000 208 #define CL_DEVICE_VENDOR_ID 0x1001 209 #define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002 210 #define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003 211 #define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004 212 #define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 213 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006 214 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007 215 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008 216 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009 217 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A 218 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B 219 #define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C 220 #define CL_DEVICE_ADDRESS_BITS 0x100D 221 #define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E 222 #define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F 223 #define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010 224 #define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011 225 #define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012 226 #define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013 227 #define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014 228 #define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015 229 #define CL_DEVICE_IMAGE_SUPPORT 0x1016 230 #define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017 231 #define CL_DEVICE_MAX_SAMPLERS 0x1018 232 #define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019 233 #define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A 234 #define CL_DEVICE_SINGLE_FP_CONFIG 0x101B 235 #define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C 236 #define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D 237 #define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E 238 #define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F 239 #define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020 240 #define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021 241 #define CL_DEVICE_LOCAL_MEM_TYPE 0x1022 242 #define CL_DEVICE_LOCAL_MEM_SIZE 0x1023 243 #define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024 244 #define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025 245 #define CL_DEVICE_ENDIAN_LITTLE 0x1026 246 #define CL_DEVICE_AVAILABLE 0x1027 247 #define CL_DEVICE_COMPILER_AVAILABLE 0x1028 248 #define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029 249 #define CL_DEVICE_QUEUE_PROPERTIES 0x102A 250 #define CL_DEVICE_NAME 0x102B 251 #define CL_DEVICE_VENDOR 0x102C 252 #define CL_DRIVER_VERSION 0x102D 253 #define CL_DEVICE_PROFILE 0x102E 254 #define CL_DEVICE_VERSION 0x102F 255 #define CL_DEVICE_EXTENSIONS 0x1030 256 #define CL_DEVICE_PLATFORM 0x1031 257 #define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032 259 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034 260 #define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 261 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036 262 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037 263 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038 264 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039 265 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A 266 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B 267 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C 268 #define CL_DEVICE_OPENCL_C_VERSION 0x103D 269 #define CL_DEVICE_LINKER_AVAILABLE 0x103E 270 #define CL_DEVICE_BUILT_IN_KERNELS 0x103F 271 #define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040 272 #define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041 273 #define CL_DEVICE_PARENT_DEVICE 0x1042 274 #define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043 275 #define CL_DEVICE_PARTITION_PROPERTIES 0x1044 276 #define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045 277 #define CL_DEVICE_PARTITION_TYPE 0x1046 278 #define CL_DEVICE_REFERENCE_COUNT 0x1047 279 #define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048 280 #define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049 281 #define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A 282 #define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B 285 #define CL_FP_DENORM (1 << 0) 286 #define CL_FP_INF_NAN (1 << 1) 287 #define CL_FP_ROUND_TO_NEAREST (1 << 2) 288 #define CL_FP_ROUND_TO_ZERO (1 << 3) 289 #define CL_FP_ROUND_TO_INF (1 << 4) 290 #define CL_FP_FMA (1 << 5) 291 #define CL_FP_SOFT_FLOAT (1 << 6) 292 #define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7) 296 #define CL_READ_ONLY_CACHE 0x1 297 #define CL_READ_WRITE_CACHE 0x2 301 #define CL_GLOBAL 0x2 304 #define CL_EXEC_KERNEL (1 << 0) 305 #define CL_EXEC_NATIVE_KERNEL (1 << 1) 308 #define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0) 309 #define CL_QUEUE_PROFILING_ENABLE (1 << 1) 312 #define CL_CONTEXT_REFERENCE_COUNT 0x1080 313 #define CL_CONTEXT_DEVICES 0x1081 314 #define CL_CONTEXT_PROPERTIES 0x1082 315 #define CL_CONTEXT_NUM_DEVICES 0x1083 318 #define CL_CONTEXT_PLATFORM 0x1084 319 #define CL_CONTEXT_INTEROP_USER_SYNC 0x1085 322 #define CL_DEVICE_PARTITION_EQUALLY 0x1086 323 #define CL_DEVICE_PARTITION_BY_COUNTS 0x1087 324 #define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0 325 #define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088 328 #define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0) 329 #define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1) 330 #define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2) 331 #define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3) 332 #define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4) 333 #define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5) 336 #define CL_QUEUE_CONTEXT 0x1090 337 #define CL_QUEUE_DEVICE 0x1091 338 #define CL_QUEUE_REFERENCE_COUNT 0x1092 339 #define CL_QUEUE_PROPERTIES 0x1093 342 #define CL_MEM_READ_WRITE (1 << 0) 343 #define CL_MEM_WRITE_ONLY (1 << 1) 344 #define CL_MEM_READ_ONLY (1 << 2) 345 #define CL_MEM_USE_HOST_PTR (1 << 3) 346 #define CL_MEM_ALLOC_HOST_PTR (1 << 4) 347 #define CL_MEM_COPY_HOST_PTR (1 << 5) 349 #define CL_MEM_HOST_WRITE_ONLY (1 << 7) 350 #define CL_MEM_HOST_READ_ONLY (1 << 8) 351 #define CL_MEM_HOST_NO_ACCESS (1 << 9) 354 #define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0) 355 #define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1) 362 #define CL_RGB 0x10B4 363 #define CL_RGBA 0x10B5 364 #define CL_BGRA 0x10B6 365 #define CL_ARGB 0x10B7 366 #define CL_INTENSITY 0x10B8 367 #define CL_LUMINANCE 0x10B9 369 #define CL_RGx 0x10BB 370 #define CL_RGBx 0x10BC 371 #define CL_DEPTH 0x10BD 372 #define CL_DEPTH_STENCIL 0x10BE 375 #define CL_SNORM_INT8 0x10D0 376 #define CL_SNORM_INT16 0x10D1 377 #define CL_UNORM_INT8 0x10D2 378 #define CL_UNORM_INT16 0x10D3 379 #define CL_UNORM_SHORT_565 0x10D4 380 #define CL_UNORM_SHORT_555 0x10D5 381 #define CL_UNORM_INT_101010 0x10D6 382 #define CL_SIGNED_INT8 0x10D7 383 #define CL_SIGNED_INT16 0x10D8 384 #define CL_SIGNED_INT32 0x10D9 385 #define CL_UNSIGNED_INT8 0x10DA 386 #define CL_UNSIGNED_INT16 0x10DB 387 #define CL_UNSIGNED_INT32 0x10DC 388 #define CL_HALF_FLOAT 0x10DD 389 #define CL_FLOAT 0x10DE 390 #define CL_UNORM_INT24 0x10DF 393 #define CL_MEM_OBJECT_BUFFER 0x10F0 394 #define CL_MEM_OBJECT_IMAGE2D 0x10F1 395 #define CL_MEM_OBJECT_IMAGE3D 0x10F2 396 #define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3 397 #define CL_MEM_OBJECT_IMAGE1D 0x10F4 398 #define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5 399 #define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6 402 #define CL_MEM_TYPE 0x1100 403 #define CL_MEM_FLAGS 0x1101 404 #define CL_MEM_SIZE 0x1102 405 #define CL_MEM_HOST_PTR 0x1103 406 #define CL_MEM_MAP_COUNT 0x1104 407 #define CL_MEM_REFERENCE_COUNT 0x1105 408 #define CL_MEM_CONTEXT 0x1106 409 #define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107 410 #define CL_MEM_OFFSET 0x1108 413 #define CL_IMAGE_FORMAT 0x1110 414 #define CL_IMAGE_ELEMENT_SIZE 0x1111 415 #define CL_IMAGE_ROW_PITCH 0x1112 416 #define CL_IMAGE_SLICE_PITCH 0x1113 417 #define CL_IMAGE_WIDTH 0x1114 418 #define CL_IMAGE_HEIGHT 0x1115 419 #define CL_IMAGE_DEPTH 0x1116 420 #define CL_IMAGE_ARRAY_SIZE 0x1117 421 #define CL_IMAGE_BUFFER 0x1118 422 #define CL_IMAGE_NUM_MIP_LEVELS 0x1119 423 #define CL_IMAGE_NUM_SAMPLES 0x111A 426 #define CL_ADDRESS_NONE 0x1130 427 #define CL_ADDRESS_CLAMP_TO_EDGE 0x1131 428 #define CL_ADDRESS_CLAMP 0x1132 429 #define CL_ADDRESS_REPEAT 0x1133 430 #define CL_ADDRESS_MIRRORED_REPEAT 0x1134 433 #define CL_FILTER_NEAREST 0x1140 434 #define CL_FILTER_LINEAR 0x1141 437 #define CL_SAMPLER_REFERENCE_COUNT 0x1150 438 #define CL_SAMPLER_CONTEXT 0x1151 439 #define CL_SAMPLER_NORMALIZED_COORDS 0x1152 440 #define CL_SAMPLER_ADDRESSING_MODE 0x1153 441 #define CL_SAMPLER_FILTER_MODE 0x1154 444 #define CL_MAP_READ (1 << 0) 445 #define CL_MAP_WRITE (1 << 1) 446 #define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2) 449 #define CL_PROGRAM_REFERENCE_COUNT 0x1160 450 #define CL_PROGRAM_CONTEXT 0x1161 451 #define CL_PROGRAM_NUM_DEVICES 0x1162 452 #define CL_PROGRAM_DEVICES 0x1163 453 #define CL_PROGRAM_SOURCE 0x1164 454 #define CL_PROGRAM_BINARY_SIZES 0x1165 455 #define CL_PROGRAM_BINARIES 0x1166 456 #define CL_PROGRAM_NUM_KERNELS 0x1167 457 #define CL_PROGRAM_KERNEL_NAMES 0x1168 460 #define CL_PROGRAM_BUILD_STATUS 0x1181 461 #define CL_PROGRAM_BUILD_OPTIONS 0x1182 462 #define CL_PROGRAM_BUILD_LOG 0x1183 463 #define CL_PROGRAM_BINARY_TYPE 0x1184 466 #define CL_PROGRAM_BINARY_TYPE_NONE 0x0 467 #define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1 468 #define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2 469 #define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4 472 #define CL_BUILD_SUCCESS 0 473 #define CL_BUILD_NONE -1 474 #define CL_BUILD_ERROR -2 475 #define CL_BUILD_IN_PROGRESS -3 478 #define CL_KERNEL_FUNCTION_NAME 0x1190 479 #define CL_KERNEL_NUM_ARGS 0x1191 480 #define CL_KERNEL_REFERENCE_COUNT 0x1192 481 #define CL_KERNEL_CONTEXT 0x1193 482 #define CL_KERNEL_PROGRAM 0x1194 483 #define CL_KERNEL_ATTRIBUTES 0x1195 486 #define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196 487 #define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197 488 #define CL_KERNEL_ARG_TYPE_NAME 0x1198 489 #define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199 490 #define CL_KERNEL_ARG_NAME 0x119A 493 #define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B 494 #define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C 495 #define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D 496 #define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E 499 #define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0 500 #define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1 501 #define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2 502 #define CL_KERNEL_ARG_ACCESS_NONE 0x11A3 505 #define CL_KERNEL_ARG_TYPE_NONE 0 506 #define CL_KERNEL_ARG_TYPE_CONST (1 << 0) 507 #define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1) 508 #define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2) 511 #define CL_KERNEL_WORK_GROUP_SIZE 0x11B0 512 #define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1 513 #define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2 514 #define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3 515 #define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4 516 #define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5 519 #define CL_EVENT_COMMAND_QUEUE 0x11D0 520 #define CL_EVENT_COMMAND_TYPE 0x11D1 521 #define CL_EVENT_REFERENCE_COUNT 0x11D2 522 #define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3 523 #define CL_EVENT_CONTEXT 0x11D4 526 #define CL_COMMAND_NDRANGE_KERNEL 0x11F0 527 #define CL_COMMAND_TASK 0x11F1 528 #define CL_COMMAND_NATIVE_KERNEL 0x11F2 529 #define CL_COMMAND_READ_BUFFER 0x11F3 530 #define CL_COMMAND_WRITE_BUFFER 0x11F4 531 #define CL_COMMAND_COPY_BUFFER 0x11F5 532 #define CL_COMMAND_READ_IMAGE 0x11F6 533 #define CL_COMMAND_WRITE_IMAGE 0x11F7 534 #define CL_COMMAND_COPY_IMAGE 0x11F8 535 #define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9 536 #define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA 537 #define CL_COMMAND_MAP_BUFFER 0x11FB 538 #define CL_COMMAND_MAP_IMAGE 0x11FC 539 #define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD 540 #define CL_COMMAND_MARKER 0x11FE 541 #define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF 542 #define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200 543 #define CL_COMMAND_READ_BUFFER_RECT 0x1201 544 #define CL_COMMAND_WRITE_BUFFER_RECT 0x1202 545 #define CL_COMMAND_COPY_BUFFER_RECT 0x1203 546 #define CL_COMMAND_USER 0x1204 547 #define CL_COMMAND_BARRIER 0x1205 548 #define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206 549 #define CL_COMMAND_FILL_BUFFER 0x1207 550 #define CL_COMMAND_FILL_IMAGE 0x1208 553 #define CL_COMPLETE 0x0 554 #define CL_RUNNING 0x1 555 #define CL_SUBMITTED 0x2 556 #define CL_QUEUED 0x3 559 #define CL_BUFFER_CREATE_TYPE_REGION 0x1220 562 #define CL_PROFILING_COMMAND_QUEUED 0x1280 563 #define CL_PROFILING_COMMAND_SUBMIT 0x1281 564 #define CL_PROFILING_COMMAND_START 0x1282 565 #define CL_PROFILING_COMMAND_END 0x1283 570 extern CL_API_ENTRY cl_int CL_API_CALL
571 clGetPlatformIDs(cl_uint ,
573 cl_uint * ) CL_API_SUFFIX__VERSION_1_0;
575 extern CL_API_ENTRY cl_int CL_API_CALL
576 clGetPlatformInfo(cl_platform_id ,
580 size_t * ) CL_API_SUFFIX__VERSION_1_0;
583 extern CL_API_ENTRY cl_int CL_API_CALL
584 clGetDeviceIDs(cl_platform_id ,
588 cl_uint * ) CL_API_SUFFIX__VERSION_1_0;
590 extern CL_API_ENTRY cl_int CL_API_CALL
591 clGetDeviceInfo(cl_device_id ,
595 size_t * ) CL_API_SUFFIX__VERSION_1_0;
597 extern CL_API_ENTRY cl_int CL_API_CALL
598 clCreateSubDevices(cl_device_id ,
599 const cl_device_partition_property * ,
602 cl_uint * ) CL_API_SUFFIX__VERSION_1_2;
604 extern CL_API_ENTRY cl_int CL_API_CALL
605 clRetainDevice(cl_device_id ) CL_API_SUFFIX__VERSION_1_2;
607 extern CL_API_ENTRY cl_int CL_API_CALL
608 clReleaseDevice(cl_device_id ) CL_API_SUFFIX__VERSION_1_2;
611 extern CL_API_ENTRY cl_context CL_API_CALL
612 clCreateContext(
const cl_context_properties * ,
614 const cl_device_id * ,
615 void (CL_CALLBACK * )(
const char *,
const void *,
size_t,
void *),
617 cl_int * ) CL_API_SUFFIX__VERSION_1_0;
619 extern CL_API_ENTRY cl_context CL_API_CALL
620 clCreateContextFromType(
const cl_context_properties * ,
622 void (CL_CALLBACK * )(
const char *,
const void *,
size_t,
void *),
624 cl_int * ) CL_API_SUFFIX__VERSION_1_0;
626 extern CL_API_ENTRY cl_int CL_API_CALL
627 clRetainContext(cl_context ) CL_API_SUFFIX__VERSION_1_0;
629 extern CL_API_ENTRY cl_int CL_API_CALL
630 clReleaseContext(cl_context ) CL_API_SUFFIX__VERSION_1_0;
632 extern CL_API_ENTRY cl_int CL_API_CALL
633 clGetContextInfo(cl_context ,
637 size_t * ) CL_API_SUFFIX__VERSION_1_0;
640 extern CL_API_ENTRY cl_command_queue CL_API_CALL
641 clCreateCommandQueue(cl_context ,
643 cl_command_queue_properties ,
644 cl_int * ) CL_API_SUFFIX__VERSION_1_0;
646 extern CL_API_ENTRY cl_int CL_API_CALL
647 clRetainCommandQueue(cl_command_queue ) CL_API_SUFFIX__VERSION_1_0;
649 extern CL_API_ENTRY cl_int CL_API_CALL
650 clReleaseCommandQueue(cl_command_queue ) CL_API_SUFFIX__VERSION_1_0;
652 extern CL_API_ENTRY cl_int CL_API_CALL
653 clGetCommandQueueInfo(cl_command_queue ,
654 cl_command_queue_info ,
657 size_t * ) CL_API_SUFFIX__VERSION_1_0;
660 extern CL_API_ENTRY cl_mem CL_API_CALL
661 clCreateBuffer(cl_context ,
665 cl_int * ) CL_API_SUFFIX__VERSION_1_0;
667 extern CL_API_ENTRY cl_mem CL_API_CALL
668 clCreateSubBuffer(cl_mem ,
670 cl_buffer_create_type ,
672 cl_int * ) CL_API_SUFFIX__VERSION_1_1;
674 extern CL_API_ENTRY cl_mem CL_API_CALL
675 clCreateImage(cl_context ,
680 cl_int * ) CL_API_SUFFIX__VERSION_1_2;
682 extern CL_API_ENTRY cl_int CL_API_CALL
683 clRetainMemObject(cl_mem ) CL_API_SUFFIX__VERSION_1_0;
685 extern CL_API_ENTRY cl_int CL_API_CALL
686 clReleaseMemObject(cl_mem ) CL_API_SUFFIX__VERSION_1_0;
688 extern CL_API_ENTRY cl_int CL_API_CALL
689 clGetSupportedImageFormats(cl_context ,
694 cl_uint * ) CL_API_SUFFIX__VERSION_1_0;
696 extern CL_API_ENTRY cl_int CL_API_CALL
697 clGetMemObjectInfo(cl_mem ,
701 size_t * ) CL_API_SUFFIX__VERSION_1_0;
703 extern CL_API_ENTRY cl_int CL_API_CALL
704 clGetImageInfo(cl_mem ,
708 size_t * ) CL_API_SUFFIX__VERSION_1_0;
710 extern CL_API_ENTRY cl_int CL_API_CALL
711 clSetMemObjectDestructorCallback( cl_mem ,
712 void (CL_CALLBACK * )( cl_mem ,
void* ),
713 void * ) CL_API_SUFFIX__VERSION_1_1;
716 extern CL_API_ENTRY cl_sampler CL_API_CALL
717 clCreateSampler(cl_context ,
721 cl_int * ) CL_API_SUFFIX__VERSION_1_0;
723 extern CL_API_ENTRY cl_int CL_API_CALL
724 clRetainSampler(cl_sampler ) CL_API_SUFFIX__VERSION_1_0;
726 extern CL_API_ENTRY cl_int CL_API_CALL
727 clReleaseSampler(cl_sampler ) CL_API_SUFFIX__VERSION_1_0;
729 extern CL_API_ENTRY cl_int CL_API_CALL
730 clGetSamplerInfo(cl_sampler ,
734 size_t * ) CL_API_SUFFIX__VERSION_1_0;
737 extern CL_API_ENTRY cl_program CL_API_CALL
738 clCreateProgramWithSource(cl_context ,
742 cl_int * ) CL_API_SUFFIX__VERSION_1_0;
744 extern CL_API_ENTRY cl_program CL_API_CALL
745 clCreateProgramWithBinary(cl_context ,
747 const cl_device_id * ,
749 const unsigned char ** ,
751 cl_int * ) CL_API_SUFFIX__VERSION_1_0;
753 extern CL_API_ENTRY cl_program CL_API_CALL
754 clCreateProgramWithBuiltInKernels(cl_context ,
756 const cl_device_id * ,
758 cl_int * ) CL_API_SUFFIX__VERSION_1_2;
760 extern CL_API_ENTRY cl_int CL_API_CALL
761 clRetainProgram(cl_program ) CL_API_SUFFIX__VERSION_1_0;
763 extern CL_API_ENTRY cl_int CL_API_CALL
764 clReleaseProgram(cl_program ) CL_API_SUFFIX__VERSION_1_0;
766 extern CL_API_ENTRY cl_int CL_API_CALL
767 clBuildProgram(cl_program ,
769 const cl_device_id * ,
771 void (CL_CALLBACK * )(cl_program ,
void * ),
772 void * ) CL_API_SUFFIX__VERSION_1_0;
774 extern CL_API_ENTRY cl_int CL_API_CALL
775 clCompileProgram(cl_program ,
777 const cl_device_id * ,
782 void (CL_CALLBACK * )(cl_program ,
void * ),
783 void * ) CL_API_SUFFIX__VERSION_1_2;
785 extern CL_API_ENTRY cl_program CL_API_CALL
786 clLinkProgram(cl_context ,
788 const cl_device_id * ,
792 void (CL_CALLBACK * )(cl_program ,
void * ),
794 cl_int * ) CL_API_SUFFIX__VERSION_1_2;
797 extern CL_API_ENTRY cl_int CL_API_CALL
798 clUnloadPlatformCompiler(cl_platform_id ) CL_API_SUFFIX__VERSION_1_2;
800 extern CL_API_ENTRY cl_int CL_API_CALL
801 clGetProgramInfo(cl_program ,
805 size_t * ) CL_API_SUFFIX__VERSION_1_0;
807 extern CL_API_ENTRY cl_int CL_API_CALL
808 clGetProgramBuildInfo(cl_program ,
810 cl_program_build_info ,
813 size_t * ) CL_API_SUFFIX__VERSION_1_0;
816 extern CL_API_ENTRY cl_kernel CL_API_CALL
817 clCreateKernel(cl_program ,
819 cl_int * ) CL_API_SUFFIX__VERSION_1_0;
821 extern CL_API_ENTRY cl_int CL_API_CALL
822 clCreateKernelsInProgram(cl_program ,
825 cl_uint * ) CL_API_SUFFIX__VERSION_1_0;
827 extern CL_API_ENTRY cl_int CL_API_CALL
828 clRetainKernel(cl_kernel ) CL_API_SUFFIX__VERSION_1_0;
830 extern CL_API_ENTRY cl_int CL_API_CALL
831 clReleaseKernel(cl_kernel ) CL_API_SUFFIX__VERSION_1_0;
833 extern CL_API_ENTRY cl_int CL_API_CALL
834 clSetKernelArg(cl_kernel ,
837 const void * ) CL_API_SUFFIX__VERSION_1_0;
839 extern CL_API_ENTRY cl_int CL_API_CALL
840 clGetKernelInfo(cl_kernel ,
844 size_t * ) CL_API_SUFFIX__VERSION_1_0;
846 extern CL_API_ENTRY cl_int CL_API_CALL
847 clGetKernelArgInfo(cl_kernel ,
852 size_t * ) CL_API_SUFFIX__VERSION_1_2;
854 extern CL_API_ENTRY cl_int CL_API_CALL
855 clGetKernelWorkGroupInfo(cl_kernel ,
857 cl_kernel_work_group_info ,
860 size_t * ) CL_API_SUFFIX__VERSION_1_0;
863 extern CL_API_ENTRY cl_int CL_API_CALL
864 clWaitForEvents(cl_uint ,
865 const cl_event * ) CL_API_SUFFIX__VERSION_1_0;
867 extern CL_API_ENTRY cl_int CL_API_CALL
868 clGetEventInfo(cl_event ,
872 size_t * ) CL_API_SUFFIX__VERSION_1_0;
874 extern CL_API_ENTRY cl_event CL_API_CALL
875 clCreateUserEvent(cl_context ,
876 cl_int * ) CL_API_SUFFIX__VERSION_1_1;
878 extern CL_API_ENTRY cl_int CL_API_CALL
879 clRetainEvent(cl_event ) CL_API_SUFFIX__VERSION_1_0;
881 extern CL_API_ENTRY cl_int CL_API_CALL
882 clReleaseEvent(cl_event ) CL_API_SUFFIX__VERSION_1_0;
884 extern CL_API_ENTRY cl_int CL_API_CALL
885 clSetUserEventStatus(cl_event ,
886 cl_int ) CL_API_SUFFIX__VERSION_1_1;
888 extern CL_API_ENTRY cl_int CL_API_CALL
889 clSetEventCallback( cl_event ,
891 void (CL_CALLBACK * )(cl_event, cl_int,
void *),
892 void * ) CL_API_SUFFIX__VERSION_1_1;
895 extern CL_API_ENTRY cl_int CL_API_CALL
896 clGetEventProfilingInfo(cl_event ,
900 size_t * ) CL_API_SUFFIX__VERSION_1_0;
903 extern CL_API_ENTRY cl_int CL_API_CALL
904 clFlush(cl_command_queue ) CL_API_SUFFIX__VERSION_1_0;
906 extern CL_API_ENTRY cl_int CL_API_CALL
907 clFinish(cl_command_queue ) CL_API_SUFFIX__VERSION_1_0;
910 extern CL_API_ENTRY cl_int CL_API_CALL
911 clEnqueueReadBuffer(cl_command_queue ,
919 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
921 extern CL_API_ENTRY cl_int CL_API_CALL
922 clEnqueueReadBufferRect(cl_command_queue ,
935 cl_event * ) CL_API_SUFFIX__VERSION_1_1;
937 extern CL_API_ENTRY cl_int CL_API_CALL
938 clEnqueueWriteBuffer(cl_command_queue ,
946 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
948 extern CL_API_ENTRY cl_int CL_API_CALL
949 clEnqueueWriteBufferRect(cl_command_queue ,
962 cl_event * ) CL_API_SUFFIX__VERSION_1_1;
964 extern CL_API_ENTRY cl_int CL_API_CALL
965 clEnqueueFillBuffer(cl_command_queue ,
973 cl_event * ) CL_API_SUFFIX__VERSION_1_2;
975 extern CL_API_ENTRY cl_int CL_API_CALL
976 clEnqueueCopyBuffer(cl_command_queue ,
984 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
986 extern CL_API_ENTRY cl_int CL_API_CALL
987 clEnqueueCopyBufferRect(cl_command_queue ,
999 cl_event * ) CL_API_SUFFIX__VERSION_1_1;
1001 extern CL_API_ENTRY cl_int CL_API_CALL
1002 clEnqueueReadImage(cl_command_queue ,
1012 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
1014 extern CL_API_ENTRY cl_int CL_API_CALL
1015 clEnqueueWriteImage(cl_command_queue ,
1025 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
1027 extern CL_API_ENTRY cl_int CL_API_CALL
1028 clEnqueueFillImage(cl_command_queue ,
1035 cl_event * ) CL_API_SUFFIX__VERSION_1_2;
1037 extern CL_API_ENTRY cl_int CL_API_CALL
1038 clEnqueueCopyImage(cl_command_queue ,
1046 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
1048 extern CL_API_ENTRY cl_int CL_API_CALL
1049 clEnqueueCopyImageToBuffer(cl_command_queue ,
1057 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
1059 extern CL_API_ENTRY cl_int CL_API_CALL
1060 clEnqueueCopyBufferToImage(cl_command_queue ,
1068 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
1070 extern CL_API_ENTRY
void * CL_API_CALL
1071 clEnqueueMapBuffer(cl_command_queue ,
1080 cl_int * ) CL_API_SUFFIX__VERSION_1_0;
1082 extern CL_API_ENTRY
void * CL_API_CALL
1083 clEnqueueMapImage(cl_command_queue ,
1094 cl_int * ) CL_API_SUFFIX__VERSION_1_0;
1096 extern CL_API_ENTRY cl_int CL_API_CALL
1097 clEnqueueUnmapMemObject(cl_command_queue ,
1102 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
1104 extern CL_API_ENTRY cl_int CL_API_CALL
1105 clEnqueueMigrateMemObjects(cl_command_queue ,
1108 cl_mem_migration_flags ,
1111 cl_event * ) CL_API_SUFFIX__VERSION_1_2;
1113 extern CL_API_ENTRY cl_int CL_API_CALL
1114 clEnqueueNDRangeKernel(cl_command_queue ,
1122 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
1124 extern CL_API_ENTRY cl_int CL_API_CALL
1125 clEnqueueTask(cl_command_queue ,
1129 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
1131 extern CL_API_ENTRY cl_int CL_API_CALL
1132 clEnqueueNativeKernel(cl_command_queue ,
1133 void (CL_CALLBACK * )(
void *),
1141 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
1143 extern CL_API_ENTRY cl_int CL_API_CALL
1144 clEnqueueMarkerWithWaitList(cl_command_queue ,
1147 cl_event * ) CL_API_SUFFIX__VERSION_1_2;
1149 extern CL_API_ENTRY cl_int CL_API_CALL
1150 clEnqueueBarrierWithWaitList(cl_command_queue ,
1153 cl_event * ) CL_API_SUFFIX__VERSION_1_2;
1163 extern CL_API_ENTRY
void * CL_API_CALL
1164 clGetExtensionFunctionAddressForPlatform(cl_platform_id ,
1165 const char * ) CL_API_SUFFIX__VERSION_1_2;
1169 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
1170 clCreateImage2D(cl_context ,
1177 cl_int * ) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1179 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
1180 clCreateImage3D(cl_context ,
1189 cl_int * ) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1191 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1192 clEnqueueMarker(cl_command_queue ,
1193 cl_event * ) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1195 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1196 clEnqueueWaitForEvents(cl_command_queue ,
1198 const cl_event * ) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1200 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1201 clEnqueueBarrier(cl_command_queue ) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1203 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1204 clUnloadCompiler(
void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1206 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
void * CL_API_CALL
1207 clGetExtensionFunctionAddress(
const char * ) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;