1 /* 2 * Copyright (c) 2023 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 * OpenCL is a trademark of Apple Inc. used under license by Khronos. 17 */ 18 19 #ifndef OPENCL_CL_FUNCTION_TYPES_H_ 20 #define OPENCL_CL_FUNCTION_TYPES_H_ 21 22 #include <CL/cl.h> 23 24 typedef cl_int CL_API_CALL clGetPlatformIDs_t( 25 cl_uint num_entries, 26 cl_platform_id* platforms, 27 cl_uint* num_platforms); 28 29 typedef clGetPlatformIDs_t * 30 clGetPlatformIDs_fn CL_API_SUFFIX__VERSION_1_0; 31 32 typedef cl_int CL_API_CALL clGetPlatformInfo_t( 33 cl_platform_id platform, 34 cl_platform_info param_name, 35 size_t param_value_size, 36 void* param_value, 37 size_t* param_value_size_ret); 38 39 typedef clGetPlatformInfo_t * 40 clGetPlatformInfo_fn CL_API_SUFFIX__VERSION_1_0; 41 42 typedef cl_int CL_API_CALL clGetDeviceIDs_t( 43 cl_platform_id platform, 44 cl_device_type device_type, 45 cl_uint num_entries, 46 cl_device_id* devices, 47 cl_uint* num_devices); 48 49 typedef clGetDeviceIDs_t * 50 clGetDeviceIDs_fn CL_API_SUFFIX__VERSION_1_0; 51 52 typedef cl_int CL_API_CALL clGetDeviceInfo_t( 53 cl_device_id device, 54 cl_device_info param_name, 55 size_t param_value_size, 56 void* param_value, 57 size_t* param_value_size_ret); 58 59 typedef clGetDeviceInfo_t * 60 clGetDeviceInfo_fn CL_API_SUFFIX__VERSION_1_0; 61 62 typedef cl_context CL_API_CALL clCreateContext_t( 63 const cl_context_properties* properties, 64 cl_uint num_devices, 65 const cl_device_id* devices, 66 void (CL_CALLBACK* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data), 67 void* user_data, 68 cl_int* errcode_ret); 69 70 typedef clCreateContext_t * 71 clCreateContext_fn CL_API_SUFFIX__VERSION_1_0; 72 73 typedef cl_context CL_API_CALL clCreateContextFromType_t( 74 const cl_context_properties* properties, 75 cl_device_type device_type, 76 void (CL_CALLBACK* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data), 77 void* user_data, 78 cl_int* errcode_ret); 79 80 typedef clCreateContextFromType_t * 81 clCreateContextFromType_fn CL_API_SUFFIX__VERSION_1_0; 82 83 typedef cl_int CL_API_CALL clRetainContext_t( 84 cl_context context); 85 86 typedef clRetainContext_t * 87 clRetainContext_fn CL_API_SUFFIX__VERSION_1_0; 88 89 typedef cl_int CL_API_CALL clReleaseContext_t( 90 cl_context context); 91 92 typedef clReleaseContext_t * 93 clReleaseContext_fn CL_API_SUFFIX__VERSION_1_0; 94 95 typedef cl_int CL_API_CALL clGetContextInfo_t( 96 cl_context context, 97 cl_context_info param_name, 98 size_t param_value_size, 99 void* param_value, 100 size_t* param_value_size_ret); 101 102 typedef clGetContextInfo_t * 103 clGetContextInfo_fn CL_API_SUFFIX__VERSION_1_0; 104 105 typedef cl_int CL_API_CALL clRetainCommandQueue_t( 106 cl_command_queue command_queue); 107 108 typedef clRetainCommandQueue_t * 109 clRetainCommandQueue_fn CL_API_SUFFIX__VERSION_1_0; 110 111 typedef cl_int CL_API_CALL clReleaseCommandQueue_t( 112 cl_command_queue command_queue); 113 114 typedef clReleaseCommandQueue_t * 115 clReleaseCommandQueue_fn CL_API_SUFFIX__VERSION_1_0; 116 117 typedef cl_int CL_API_CALL clGetCommandQueueInfo_t( 118 cl_command_queue command_queue, 119 cl_command_queue_info param_name, 120 size_t param_value_size, 121 void* param_value, 122 size_t* param_value_size_ret); 123 124 typedef clGetCommandQueueInfo_t * 125 clGetCommandQueueInfo_fn CL_API_SUFFIX__VERSION_1_0; 126 127 typedef cl_mem CL_API_CALL clCreateBuffer_t( 128 cl_context context, 129 cl_mem_flags flags, 130 size_t size, 131 void* host_ptr, 132 cl_int* errcode_ret); 133 134 typedef clCreateBuffer_t * 135 clCreateBuffer_fn CL_API_SUFFIX__VERSION_1_0; 136 137 typedef cl_int CL_API_CALL clRetainMemObject_t( 138 cl_mem memobj); 139 140 typedef clRetainMemObject_t * 141 clRetainMemObject_fn CL_API_SUFFIX__VERSION_1_0; 142 143 typedef cl_int CL_API_CALL clReleaseMemObject_t( 144 cl_mem memobj); 145 146 typedef clReleaseMemObject_t * 147 clReleaseMemObject_fn CL_API_SUFFIX__VERSION_1_0; 148 149 typedef cl_int CL_API_CALL clGetSupportedImageFormats_t( 150 cl_context context, 151 cl_mem_flags flags, 152 cl_mem_object_type image_type, 153 cl_uint num_entries, 154 cl_image_format* image_formats, 155 cl_uint* num_image_formats); 156 157 typedef clGetSupportedImageFormats_t * 158 clGetSupportedImageFormats_fn CL_API_SUFFIX__VERSION_1_0; 159 160 typedef cl_int CL_API_CALL clGetMemObjectInfo_t( 161 cl_mem memobj, 162 cl_mem_info param_name, 163 size_t param_value_size, 164 void* param_value, 165 size_t* param_value_size_ret); 166 167 typedef clGetMemObjectInfo_t * 168 clGetMemObjectInfo_fn CL_API_SUFFIX__VERSION_1_0; 169 170 typedef cl_int CL_API_CALL clGetImageInfo_t( 171 cl_mem image, 172 cl_image_info param_name, 173 size_t param_value_size, 174 void* param_value, 175 size_t* param_value_size_ret); 176 177 typedef clGetImageInfo_t * 178 clGetImageInfo_fn CL_API_SUFFIX__VERSION_1_0; 179 180 typedef cl_int CL_API_CALL clRetainSampler_t( 181 cl_sampler sampler); 182 183 typedef clRetainSampler_t * 184 clRetainSampler_fn CL_API_SUFFIX__VERSION_1_0; 185 186 typedef cl_int CL_API_CALL clReleaseSampler_t( 187 cl_sampler sampler); 188 189 typedef clReleaseSampler_t * 190 clReleaseSampler_fn CL_API_SUFFIX__VERSION_1_0; 191 192 typedef cl_int CL_API_CALL clGetSamplerInfo_t( 193 cl_sampler sampler, 194 cl_sampler_info param_name, 195 size_t param_value_size, 196 void* param_value, 197 size_t* param_value_size_ret); 198 199 typedef clGetSamplerInfo_t * 200 clGetSamplerInfo_fn CL_API_SUFFIX__VERSION_1_0; 201 202 typedef cl_program CL_API_CALL clCreateProgramWithSource_t( 203 cl_context context, 204 cl_uint count, 205 const char** strings, 206 const size_t* lengths, 207 cl_int* errcode_ret); 208 209 typedef clCreateProgramWithSource_t * 210 clCreateProgramWithSource_fn CL_API_SUFFIX__VERSION_1_0; 211 212 typedef cl_program CL_API_CALL clCreateProgramWithBinary_t( 213 cl_context context, 214 cl_uint num_devices, 215 const cl_device_id* device_list, 216 const size_t* lengths, 217 const unsigned char** binaries, 218 cl_int* binary_status, 219 cl_int* errcode_ret); 220 221 typedef clCreateProgramWithBinary_t * 222 clCreateProgramWithBinary_fn CL_API_SUFFIX__VERSION_1_0; 223 224 typedef cl_int CL_API_CALL clRetainProgram_t( 225 cl_program program); 226 227 typedef clRetainProgram_t * 228 clRetainProgram_fn CL_API_SUFFIX__VERSION_1_0; 229 230 typedef cl_int CL_API_CALL clReleaseProgram_t( 231 cl_program program); 232 233 typedef clReleaseProgram_t * 234 clReleaseProgram_fn CL_API_SUFFIX__VERSION_1_0; 235 236 typedef cl_int CL_API_CALL clBuildProgram_t( 237 cl_program program, 238 cl_uint num_devices, 239 const cl_device_id* device_list, 240 const char* options, 241 void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), 242 void* user_data); 243 244 typedef clBuildProgram_t * 245 clBuildProgram_fn CL_API_SUFFIX__VERSION_1_0; 246 247 typedef cl_int CL_API_CALL clGetProgramInfo_t( 248 cl_program program, 249 cl_program_info param_name, 250 size_t param_value_size, 251 void* param_value, 252 size_t* param_value_size_ret); 253 254 typedef clGetProgramInfo_t * 255 clGetProgramInfo_fn CL_API_SUFFIX__VERSION_1_0; 256 257 typedef cl_int CL_API_CALL clGetProgramBuildInfo_t( 258 cl_program program, 259 cl_device_id device, 260 cl_program_build_info param_name, 261 size_t param_value_size, 262 void* param_value, 263 size_t* param_value_size_ret); 264 265 typedef clGetProgramBuildInfo_t * 266 clGetProgramBuildInfo_fn CL_API_SUFFIX__VERSION_1_0; 267 268 typedef cl_kernel CL_API_CALL clCreateKernel_t( 269 cl_program program, 270 const char* kernel_name, 271 cl_int* errcode_ret); 272 273 typedef clCreateKernel_t * 274 clCreateKernel_fn CL_API_SUFFIX__VERSION_1_0; 275 276 typedef cl_int CL_API_CALL clCreateKernelsInProgram_t( 277 cl_program program, 278 cl_uint num_kernels, 279 cl_kernel* kernels, 280 cl_uint* num_kernels_ret); 281 282 typedef clCreateKernelsInProgram_t * 283 clCreateKernelsInProgram_fn CL_API_SUFFIX__VERSION_1_0; 284 285 typedef cl_int CL_API_CALL clRetainKernel_t( 286 cl_kernel kernel); 287 288 typedef clRetainKernel_t * 289 clRetainKernel_fn CL_API_SUFFIX__VERSION_1_0; 290 291 typedef cl_int CL_API_CALL clReleaseKernel_t( 292 cl_kernel kernel); 293 294 typedef clReleaseKernel_t * 295 clReleaseKernel_fn CL_API_SUFFIX__VERSION_1_0; 296 297 typedef cl_int CL_API_CALL clSetKernelArg_t( 298 cl_kernel kernel, 299 cl_uint arg_index, 300 size_t arg_size, 301 const void* arg_value); 302 303 typedef clSetKernelArg_t * 304 clSetKernelArg_fn CL_API_SUFFIX__VERSION_1_0; 305 306 typedef cl_int CL_API_CALL clGetKernelInfo_t( 307 cl_kernel kernel, 308 cl_kernel_info param_name, 309 size_t param_value_size, 310 void* param_value, 311 size_t* param_value_size_ret); 312 313 typedef clGetKernelInfo_t * 314 clGetKernelInfo_fn CL_API_SUFFIX__VERSION_1_0; 315 316 typedef cl_int CL_API_CALL clGetKernelWorkGroupInfo_t( 317 cl_kernel kernel, 318 cl_device_id device, 319 cl_kernel_work_group_info param_name, 320 size_t param_value_size, 321 void* param_value, 322 size_t* param_value_size_ret); 323 324 typedef clGetKernelWorkGroupInfo_t * 325 clGetKernelWorkGroupInfo_fn CL_API_SUFFIX__VERSION_1_0; 326 327 typedef cl_int CL_API_CALL clWaitForEvents_t( 328 cl_uint num_events, 329 const cl_event* event_list); 330 331 typedef clWaitForEvents_t * 332 clWaitForEvents_fn CL_API_SUFFIX__VERSION_1_0; 333 334 typedef cl_int CL_API_CALL clGetEventInfo_t( 335 cl_event event, 336 cl_event_info param_name, 337 size_t param_value_size, 338 void* param_value, 339 size_t* param_value_size_ret); 340 341 typedef clGetEventInfo_t * 342 clGetEventInfo_fn CL_API_SUFFIX__VERSION_1_0; 343 344 typedef cl_int CL_API_CALL clRetainEvent_t( 345 cl_event event); 346 347 typedef clRetainEvent_t * 348 clRetainEvent_fn CL_API_SUFFIX__VERSION_1_0; 349 350 typedef cl_int CL_API_CALL clReleaseEvent_t( 351 cl_event event); 352 353 typedef clReleaseEvent_t * 354 clReleaseEvent_fn CL_API_SUFFIX__VERSION_1_0; 355 356 typedef cl_int CL_API_CALL clGetEventProfilingInfo_t( 357 cl_event event, 358 cl_profiling_info param_name, 359 size_t param_value_size, 360 void* param_value, 361 size_t* param_value_size_ret); 362 363 typedef clGetEventProfilingInfo_t * 364 clGetEventProfilingInfo_fn CL_API_SUFFIX__VERSION_1_0; 365 366 typedef cl_int CL_API_CALL clFlush_t( 367 cl_command_queue command_queue); 368 369 typedef clFlush_t * 370 clFlush_fn CL_API_SUFFIX__VERSION_1_0; 371 372 typedef cl_int CL_API_CALL clFinish_t( 373 cl_command_queue command_queue); 374 375 typedef clFinish_t * 376 clFinish_fn CL_API_SUFFIX__VERSION_1_0; 377 378 typedef cl_int CL_API_CALL clEnqueueReadBuffer_t( 379 cl_command_queue command_queue, 380 cl_mem buffer, 381 cl_bool blocking_read, 382 size_t offset, 383 size_t size, 384 void* ptr, 385 cl_uint num_events_in_wait_list, 386 const cl_event* event_wait_list, 387 cl_event* event); 388 389 typedef clEnqueueReadBuffer_t * 390 clEnqueueReadBuffer_fn CL_API_SUFFIX__VERSION_1_0; 391 392 typedef cl_int CL_API_CALL clEnqueueWriteBuffer_t( 393 cl_command_queue command_queue, 394 cl_mem buffer, 395 cl_bool blocking_write, 396 size_t offset, 397 size_t size, 398 const void* ptr, 399 cl_uint num_events_in_wait_list, 400 const cl_event* event_wait_list, 401 cl_event* event); 402 403 typedef clEnqueueWriteBuffer_t * 404 clEnqueueWriteBuffer_fn CL_API_SUFFIX__VERSION_1_0; 405 406 typedef cl_int CL_API_CALL clEnqueueCopyBuffer_t( 407 cl_command_queue command_queue, 408 cl_mem src_buffer, 409 cl_mem dst_buffer, 410 size_t src_offset, 411 size_t dst_offset, 412 size_t size, 413 cl_uint num_events_in_wait_list, 414 const cl_event* event_wait_list, 415 cl_event* event); 416 417 typedef clEnqueueCopyBuffer_t * 418 clEnqueueCopyBuffer_fn CL_API_SUFFIX__VERSION_1_0; 419 420 typedef cl_int CL_API_CALL clEnqueueReadImage_t( 421 cl_command_queue command_queue, 422 cl_mem image, 423 cl_bool blocking_read, 424 const size_t* origin, 425 const size_t* region, 426 size_t row_pitch, 427 size_t slice_pitch, 428 void* ptr, 429 cl_uint num_events_in_wait_list, 430 const cl_event* event_wait_list, 431 cl_event* event); 432 433 typedef clEnqueueReadImage_t * 434 clEnqueueReadImage_fn CL_API_SUFFIX__VERSION_1_0; 435 436 typedef cl_int CL_API_CALL clEnqueueWriteImage_t( 437 cl_command_queue command_queue, 438 cl_mem image, 439 cl_bool blocking_write, 440 const size_t* origin, 441 const size_t* region, 442 size_t input_row_pitch, 443 size_t input_slice_pitch, 444 const void* ptr, 445 cl_uint num_events_in_wait_list, 446 const cl_event* event_wait_list, 447 cl_event* event); 448 449 typedef clEnqueueWriteImage_t * 450 clEnqueueWriteImage_fn CL_API_SUFFIX__VERSION_1_0; 451 452 typedef cl_int CL_API_CALL clEnqueueCopyImage_t( 453 cl_command_queue command_queue, 454 cl_mem src_image, 455 cl_mem dst_image, 456 const size_t* src_origin, 457 const size_t* dst_origin, 458 const size_t* region, 459 cl_uint num_events_in_wait_list, 460 const cl_event* event_wait_list, 461 cl_event* event); 462 463 typedef clEnqueueCopyImage_t * 464 clEnqueueCopyImage_fn CL_API_SUFFIX__VERSION_1_0; 465 466 typedef cl_int CL_API_CALL clEnqueueCopyImageToBuffer_t( 467 cl_command_queue command_queue, 468 cl_mem src_image, 469 cl_mem dst_buffer, 470 const size_t* src_origin, 471 const size_t* region, 472 size_t dst_offset, 473 cl_uint num_events_in_wait_list, 474 const cl_event* event_wait_list, 475 cl_event* event); 476 477 typedef clEnqueueCopyImageToBuffer_t * 478 clEnqueueCopyImageToBuffer_fn CL_API_SUFFIX__VERSION_1_0; 479 480 typedef cl_int CL_API_CALL clEnqueueCopyBufferToImage_t( 481 cl_command_queue command_queue, 482 cl_mem src_buffer, 483 cl_mem dst_image, 484 size_t src_offset, 485 const size_t* dst_origin, 486 const size_t* region, 487 cl_uint num_events_in_wait_list, 488 const cl_event* event_wait_list, 489 cl_event* event); 490 491 typedef clEnqueueCopyBufferToImage_t * 492 clEnqueueCopyBufferToImage_fn CL_API_SUFFIX__VERSION_1_0; 493 494 typedef void* CL_API_CALL clEnqueueMapBuffer_t( 495 cl_command_queue command_queue, 496 cl_mem buffer, 497 cl_bool blocking_map, 498 cl_map_flags map_flags, 499 size_t offset, 500 size_t size, 501 cl_uint num_events_in_wait_list, 502 const cl_event* event_wait_list, 503 cl_event* event, 504 cl_int* errcode_ret); 505 506 typedef clEnqueueMapBuffer_t * 507 clEnqueueMapBuffer_fn CL_API_SUFFIX__VERSION_1_0; 508 509 typedef void* CL_API_CALL clEnqueueMapImage_t( 510 cl_command_queue command_queue, 511 cl_mem image, 512 cl_bool blocking_map, 513 cl_map_flags map_flags, 514 const size_t* origin, 515 const size_t* region, 516 size_t* image_row_pitch, 517 size_t* image_slice_pitch, 518 cl_uint num_events_in_wait_list, 519 const cl_event* event_wait_list, 520 cl_event* event, 521 cl_int* errcode_ret); 522 523 typedef clEnqueueMapImage_t * 524 clEnqueueMapImage_fn CL_API_SUFFIX__VERSION_1_0; 525 526 typedef cl_int CL_API_CALL clEnqueueUnmapMemObject_t( 527 cl_command_queue command_queue, 528 cl_mem memobj, 529 void* mapped_ptr, 530 cl_uint num_events_in_wait_list, 531 const cl_event* event_wait_list, 532 cl_event* event); 533 534 typedef clEnqueueUnmapMemObject_t * 535 clEnqueueUnmapMemObject_fn CL_API_SUFFIX__VERSION_1_0; 536 537 typedef cl_int CL_API_CALL clEnqueueNDRangeKernel_t( 538 cl_command_queue command_queue, 539 cl_kernel kernel, 540 cl_uint work_dim, 541 const size_t* global_work_offset, 542 const size_t* global_work_size, 543 const size_t* local_work_size, 544 cl_uint num_events_in_wait_list, 545 const cl_event* event_wait_list, 546 cl_event* event); 547 548 typedef clEnqueueNDRangeKernel_t * 549 clEnqueueNDRangeKernel_fn CL_API_SUFFIX__VERSION_1_0; 550 551 typedef cl_int CL_API_CALL clEnqueueNativeKernel_t( 552 cl_command_queue command_queue, 553 void (CL_CALLBACK* user_func)(void*), 554 void* args, 555 size_t cb_args, 556 cl_uint num_mem_objects, 557 const cl_mem* mem_list, 558 const void** args_mem_loc, 559 cl_uint num_events_in_wait_list, 560 const cl_event* event_wait_list, 561 cl_event* event); 562 563 typedef clEnqueueNativeKernel_t * 564 clEnqueueNativeKernel_fn CL_API_SUFFIX__VERSION_1_0; 565 566 typedef cl_int CL_API_CALL clSetCommandQueueProperty_t( 567 cl_command_queue command_queue, 568 cl_command_queue_properties properties, 569 cl_bool enable, 570 cl_command_queue_properties* old_properties); 571 572 typedef clSetCommandQueueProperty_t * 573 clSetCommandQueueProperty_fn CL_API_SUFFIX__VERSION_1_0_DEPRECATED; 574 575 typedef cl_mem CL_API_CALL clCreateImage2D_t( 576 cl_context context, 577 cl_mem_flags flags, 578 const cl_image_format* image_format, 579 size_t image_width, 580 size_t image_height, 581 size_t image_row_pitch, 582 void* host_ptr, 583 cl_int* errcode_ret); 584 585 typedef clCreateImage2D_t * 586 clCreateImage2D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; 587 588 typedef cl_mem CL_API_CALL clCreateImage3D_t( 589 cl_context context, 590 cl_mem_flags flags, 591 const cl_image_format* image_format, 592 size_t image_width, 593 size_t image_height, 594 size_t image_depth, 595 size_t image_row_pitch, 596 size_t image_slice_pitch, 597 void* host_ptr, 598 cl_int* errcode_ret); 599 600 typedef clCreateImage3D_t * 601 clCreateImage3D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; 602 603 typedef cl_int CL_API_CALL clEnqueueMarker_t( 604 cl_command_queue command_queue, 605 cl_event* event); 606 607 typedef clEnqueueMarker_t * 608 clEnqueueMarker_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; 609 610 typedef cl_int CL_API_CALL clEnqueueWaitForEvents_t( 611 cl_command_queue command_queue, 612 cl_uint num_events, 613 const cl_event* event_list); 614 615 typedef clEnqueueWaitForEvents_t * 616 clEnqueueWaitForEvents_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; 617 618 typedef cl_int CL_API_CALL clEnqueueBarrier_t( 619 cl_command_queue command_queue); 620 621 typedef clEnqueueBarrier_t * 622 clEnqueueBarrier_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; 623 624 typedef cl_int CL_API_CALL clUnloadCompiler_t( 625 void ); 626 627 typedef clUnloadCompiler_t * 628 clUnloadCompiler_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; 629 630 typedef void* CL_API_CALL clGetExtensionFunctionAddress_t( 631 const char* func_name); 632 633 typedef clGetExtensionFunctionAddress_t * 634 clGetExtensionFunctionAddress_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; 635 636 typedef cl_command_queue CL_API_CALL clCreateCommandQueue_t( 637 cl_context context, 638 cl_device_id device, 639 cl_command_queue_properties properties, 640 cl_int* errcode_ret); 641 642 typedef clCreateCommandQueue_t * 643 clCreateCommandQueue_fn CL_API_SUFFIX__VERSION_1_2_DEPRECATED; 644 645 typedef cl_sampler CL_API_CALL clCreateSampler_t( 646 cl_context context, 647 cl_bool normalized_coords, 648 cl_addressing_mode addressing_mode, 649 cl_filter_mode filter_mode, 650 cl_int* errcode_ret); 651 652 typedef clCreateSampler_t * 653 clCreateSampler_fn CL_API_SUFFIX__VERSION_1_2_DEPRECATED; 654 655 typedef cl_int CL_API_CALL clEnqueueTask_t( 656 cl_command_queue command_queue, 657 cl_kernel kernel, 658 cl_uint num_events_in_wait_list, 659 const cl_event* event_wait_list, 660 cl_event* event); 661 662 typedef clEnqueueTask_t * 663 clEnqueueTask_fn CL_API_SUFFIX__VERSION_1_2_DEPRECATED; 664 665 #ifdef CL_VERSION_1_1 666 667 typedef cl_mem CL_API_CALL clCreateSubBuffer_t( 668 cl_mem buffer, 669 cl_mem_flags flags, 670 cl_buffer_create_type buffer_create_type, 671 const void* buffer_create_info, 672 cl_int* errcode_ret); 673 674 typedef clCreateSubBuffer_t * 675 clCreateSubBuffer_fn CL_API_SUFFIX__VERSION_1_1; 676 677 typedef cl_int CL_API_CALL clSetMemObjectDestructorCallback_t( 678 cl_mem memobj, 679 void (CL_CALLBACK* pfn_notify)(cl_mem memobj, void* user_data), 680 void* user_data); 681 682 typedef clSetMemObjectDestructorCallback_t * 683 clSetMemObjectDestructorCallback_fn CL_API_SUFFIX__VERSION_1_1; 684 685 typedef cl_event CL_API_CALL clCreateUserEvent_t( 686 cl_context context, 687 cl_int* errcode_ret); 688 689 typedef clCreateUserEvent_t * 690 clCreateUserEvent_fn CL_API_SUFFIX__VERSION_1_1; 691 692 typedef cl_int CL_API_CALL clSetUserEventStatus_t( 693 cl_event event, 694 cl_int execution_status); 695 696 typedef clSetUserEventStatus_t * 697 clSetUserEventStatus_fn CL_API_SUFFIX__VERSION_1_1; 698 699 typedef cl_int CL_API_CALL clSetEventCallback_t( 700 cl_event event, 701 cl_int command_exec_callback_type, 702 void (CL_CALLBACK* pfn_notify)(cl_event event, cl_int event_command_status, void *user_data), 703 void* user_data); 704 705 typedef clSetEventCallback_t * 706 clSetEventCallback_fn CL_API_SUFFIX__VERSION_1_1; 707 708 typedef cl_int CL_API_CALL clEnqueueReadBufferRect_t( 709 cl_command_queue command_queue, 710 cl_mem buffer, 711 cl_bool blocking_read, 712 const size_t* buffer_origin, 713 const size_t* host_origin, 714 const size_t* region, 715 size_t buffer_row_pitch, 716 size_t buffer_slice_pitch, 717 size_t host_row_pitch, 718 size_t host_slice_pitch, 719 void* ptr, 720 cl_uint num_events_in_wait_list, 721 const cl_event* event_wait_list, 722 cl_event* event); 723 724 typedef clEnqueueReadBufferRect_t * 725 clEnqueueReadBufferRect_fn CL_API_SUFFIX__VERSION_1_1; 726 727 typedef cl_int CL_API_CALL clEnqueueWriteBufferRect_t( 728 cl_command_queue command_queue, 729 cl_mem buffer, 730 cl_bool blocking_write, 731 const size_t* buffer_origin, 732 const size_t* host_origin, 733 const size_t* region, 734 size_t buffer_row_pitch, 735 size_t buffer_slice_pitch, 736 size_t host_row_pitch, 737 size_t host_slice_pitch, 738 const void* ptr, 739 cl_uint num_events_in_wait_list, 740 const cl_event* event_wait_list, 741 cl_event* event); 742 743 typedef clEnqueueWriteBufferRect_t * 744 clEnqueueWriteBufferRect_fn CL_API_SUFFIX__VERSION_1_1; 745 746 typedef cl_int CL_API_CALL clEnqueueCopyBufferRect_t( 747 cl_command_queue command_queue, 748 cl_mem src_buffer, 749 cl_mem dst_buffer, 750 const size_t* src_origin, 751 const size_t* dst_origin, 752 const size_t* region, 753 size_t src_row_pitch, 754 size_t src_slice_pitch, 755 size_t dst_row_pitch, 756 size_t dst_slice_pitch, 757 cl_uint num_events_in_wait_list, 758 const cl_event* event_wait_list, 759 cl_event* event); 760 761 typedef clEnqueueCopyBufferRect_t * 762 clEnqueueCopyBufferRect_fn CL_API_SUFFIX__VERSION_1_1; 763 764 #endif /* CL_VERSION_1_1 */ 765 766 #ifdef CL_VERSION_1_2 767 768 typedef cl_int CL_API_CALL clCreateSubDevices_t( 769 cl_device_id in_device, 770 const cl_device_partition_property* properties, 771 cl_uint num_devices, 772 cl_device_id* out_devices, 773 cl_uint* num_devices_ret); 774 775 typedef clCreateSubDevices_t * 776 clCreateSubDevices_fn CL_API_SUFFIX__VERSION_1_2; 777 778 typedef cl_int CL_API_CALL clRetainDevice_t( 779 cl_device_id device); 780 781 typedef clRetainDevice_t * 782 clRetainDevice_fn CL_API_SUFFIX__VERSION_1_2; 783 784 typedef cl_int CL_API_CALL clReleaseDevice_t( 785 cl_device_id device); 786 787 typedef clReleaseDevice_t * 788 clReleaseDevice_fn CL_API_SUFFIX__VERSION_1_2; 789 790 typedef cl_mem CL_API_CALL clCreateImage_t( 791 cl_context context, 792 cl_mem_flags flags, 793 const cl_image_format* image_format, 794 const cl_image_desc* image_desc, 795 void* host_ptr, 796 cl_int* errcode_ret); 797 798 typedef clCreateImage_t * 799 clCreateImage_fn CL_API_SUFFIX__VERSION_1_2; 800 801 typedef cl_program CL_API_CALL clCreateProgramWithBuiltInKernels_t( 802 cl_context context, 803 cl_uint num_devices, 804 const cl_device_id* device_list, 805 const char* kernel_names, 806 cl_int* errcode_ret); 807 808 typedef clCreateProgramWithBuiltInKernels_t * 809 clCreateProgramWithBuiltInKernels_fn CL_API_SUFFIX__VERSION_1_2; 810 811 typedef cl_int CL_API_CALL clCompileProgram_t( 812 cl_program program, 813 cl_uint num_devices, 814 const cl_device_id* device_list, 815 const char* options, 816 cl_uint num_input_headers, 817 const cl_program* input_headers, 818 const char** header_include_names, 819 void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), 820 void* user_data); 821 822 typedef clCompileProgram_t * 823 clCompileProgram_fn CL_API_SUFFIX__VERSION_1_2; 824 825 typedef cl_program CL_API_CALL clLinkProgram_t( 826 cl_context context, 827 cl_uint num_devices, 828 const cl_device_id* device_list, 829 const char* options, 830 cl_uint num_input_programs, 831 const cl_program* input_programs, 832 void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), 833 void* user_data, 834 cl_int* errcode_ret); 835 836 typedef clLinkProgram_t * 837 clLinkProgram_fn CL_API_SUFFIX__VERSION_1_2; 838 839 typedef cl_int CL_API_CALL clUnloadPlatformCompiler_t( 840 cl_platform_id platform); 841 842 typedef clUnloadPlatformCompiler_t * 843 clUnloadPlatformCompiler_fn CL_API_SUFFIX__VERSION_1_2; 844 845 typedef cl_int CL_API_CALL clGetKernelArgInfo_t( 846 cl_kernel kernel, 847 cl_uint arg_index, 848 cl_kernel_arg_info param_name, 849 size_t param_value_size, 850 void* param_value, 851 size_t* param_value_size_ret); 852 853 typedef clGetKernelArgInfo_t * 854 clGetKernelArgInfo_fn CL_API_SUFFIX__VERSION_1_2; 855 856 typedef cl_int CL_API_CALL clEnqueueFillBuffer_t( 857 cl_command_queue command_queue, 858 cl_mem buffer, 859 const void* pattern, 860 size_t pattern_size, 861 size_t offset, 862 size_t size, 863 cl_uint num_events_in_wait_list, 864 const cl_event* event_wait_list, 865 cl_event* event); 866 867 typedef clEnqueueFillBuffer_t * 868 clEnqueueFillBuffer_fn CL_API_SUFFIX__VERSION_1_2; 869 870 typedef cl_int CL_API_CALL clEnqueueFillImage_t( 871 cl_command_queue command_queue, 872 cl_mem image, 873 const void* fill_color, 874 const size_t* origin, 875 const size_t* region, 876 cl_uint num_events_in_wait_list, 877 const cl_event* event_wait_list, 878 cl_event* event); 879 880 typedef clEnqueueFillImage_t * 881 clEnqueueFillImage_fn CL_API_SUFFIX__VERSION_1_2; 882 883 typedef cl_int CL_API_CALL clEnqueueMigrateMemObjects_t( 884 cl_command_queue command_queue, 885 cl_uint num_mem_objects, 886 const cl_mem* mem_objects, 887 cl_mem_migration_flags flags, 888 cl_uint num_events_in_wait_list, 889 const cl_event* event_wait_list, 890 cl_event* event); 891 892 typedef clEnqueueMigrateMemObjects_t * 893 clEnqueueMigrateMemObjects_fn CL_API_SUFFIX__VERSION_1_2; 894 895 typedef cl_int CL_API_CALL clEnqueueMarkerWithWaitList_t( 896 cl_command_queue command_queue, 897 cl_uint num_events_in_wait_list, 898 const cl_event* event_wait_list, 899 cl_event* event); 900 901 typedef clEnqueueMarkerWithWaitList_t * 902 clEnqueueMarkerWithWaitList_fn CL_API_SUFFIX__VERSION_1_2; 903 904 typedef cl_int CL_API_CALL clEnqueueBarrierWithWaitList_t( 905 cl_command_queue command_queue, 906 cl_uint num_events_in_wait_list, 907 const cl_event* event_wait_list, 908 cl_event* event); 909 910 typedef clEnqueueBarrierWithWaitList_t * 911 clEnqueueBarrierWithWaitList_fn CL_API_SUFFIX__VERSION_1_2; 912 913 typedef void* CL_API_CALL clGetExtensionFunctionAddressForPlatform_t( 914 cl_platform_id platform, 915 const char* func_name); 916 917 typedef clGetExtensionFunctionAddressForPlatform_t * 918 clGetExtensionFunctionAddressForPlatform_fn CL_API_SUFFIX__VERSION_1_2; 919 920 #endif /* CL_VERSION_1_2 */ 921 922 #ifdef CL_VERSION_2_0 923 924 typedef cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties_t( 925 cl_context context, 926 cl_device_id device, 927 const cl_queue_properties* properties, 928 cl_int* errcode_ret); 929 930 typedef clCreateCommandQueueWithProperties_t * 931 clCreateCommandQueueWithProperties_fn CL_API_SUFFIX__VERSION_2_0; 932 933 typedef cl_mem CL_API_CALL clCreatePipe_t( 934 cl_context context, 935 cl_mem_flags flags, 936 cl_uint pipe_packet_size, 937 cl_uint pipe_max_packets, 938 const cl_pipe_properties* properties, 939 cl_int* errcode_ret); 940 941 typedef clCreatePipe_t * 942 clCreatePipe_fn CL_API_SUFFIX__VERSION_2_0; 943 944 typedef cl_int CL_API_CALL clGetPipeInfo_t( 945 cl_mem pipe, 946 cl_pipe_info param_name, 947 size_t param_value_size, 948 void* param_value, 949 size_t* param_value_size_ret); 950 951 typedef clGetPipeInfo_t * 952 clGetPipeInfo_fn CL_API_SUFFIX__VERSION_2_0; 953 954 typedef void* CL_API_CALL clSVMAlloc_t( 955 cl_context context, 956 cl_svm_mem_flags flags, 957 size_t size, 958 cl_uint alignment); 959 960 typedef clSVMAlloc_t * 961 clSVMAlloc_fn CL_API_SUFFIX__VERSION_2_0; 962 963 typedef void CL_API_CALL clSVMFree_t( 964 cl_context context, 965 void* svm_pointer); 966 967 typedef clSVMFree_t * 968 clSVMFree_fn CL_API_SUFFIX__VERSION_2_0; 969 970 typedef cl_sampler CL_API_CALL clCreateSamplerWithProperties_t( 971 cl_context context, 972 const cl_sampler_properties* sampler_properties, 973 cl_int* errcode_ret); 974 975 typedef clCreateSamplerWithProperties_t * 976 clCreateSamplerWithProperties_fn CL_API_SUFFIX__VERSION_2_0; 977 978 typedef cl_int CL_API_CALL clSetKernelArgSVMPointer_t( 979 cl_kernel kernel, 980 cl_uint arg_index, 981 const void* arg_value); 982 983 typedef clSetKernelArgSVMPointer_t * 984 clSetKernelArgSVMPointer_fn CL_API_SUFFIX__VERSION_2_0; 985 986 typedef cl_int CL_API_CALL clSetKernelExecInfo_t( 987 cl_kernel kernel, 988 cl_kernel_exec_info param_name, 989 size_t param_value_size, 990 const void* param_value); 991 992 typedef clSetKernelExecInfo_t * 993 clSetKernelExecInfo_fn CL_API_SUFFIX__VERSION_2_0; 994 995 typedef cl_int CL_API_CALL clEnqueueSVMFree_t( 996 cl_command_queue command_queue, 997 cl_uint num_svm_pointers, 998 void* svm_pointers[], 999 void (CL_CALLBACK* pfn_free_func)(cl_command_queue queue, cl_uint num_svm_pointers, void* svm_pointers[], void* user_data), 1000 void* user_data, 1001 cl_uint num_events_in_wait_list, 1002 const cl_event* event_wait_list, 1003 cl_event* event); 1004 1005 typedef clEnqueueSVMFree_t * 1006 clEnqueueSVMFree_fn CL_API_SUFFIX__VERSION_2_0; 1007 1008 typedef cl_int CL_API_CALL clEnqueueSVMMemcpy_t( 1009 cl_command_queue command_queue, 1010 cl_bool blocking_copy, 1011 void* dst_ptr, 1012 const void* src_ptr, 1013 size_t size, 1014 cl_uint num_events_in_wait_list, 1015 const cl_event* event_wait_list, 1016 cl_event* event); 1017 1018 typedef clEnqueueSVMMemcpy_t * 1019 clEnqueueSVMMemcpy_fn CL_API_SUFFIX__VERSION_2_0; 1020 1021 typedef cl_int CL_API_CALL clEnqueueSVMMemFill_t( 1022 cl_command_queue command_queue, 1023 void* svm_ptr, 1024 const void* pattern, 1025 size_t pattern_size, 1026 size_t size, 1027 cl_uint num_events_in_wait_list, 1028 const cl_event* event_wait_list, 1029 cl_event* event); 1030 1031 typedef clEnqueueSVMMemFill_t * 1032 clEnqueueSVMMemFill_fn CL_API_SUFFIX__VERSION_2_0; 1033 1034 typedef cl_int CL_API_CALL clEnqueueSVMMap_t( 1035 cl_command_queue command_queue, 1036 cl_bool blocking_map, 1037 cl_map_flags flags, 1038 void* svm_ptr, 1039 size_t size, 1040 cl_uint num_events_in_wait_list, 1041 const cl_event* event_wait_list, 1042 cl_event* event); 1043 1044 typedef clEnqueueSVMMap_t * 1045 clEnqueueSVMMap_fn CL_API_SUFFIX__VERSION_2_0; 1046 1047 typedef cl_int CL_API_CALL clEnqueueSVMUnmap_t( 1048 cl_command_queue command_queue, 1049 void* svm_ptr, 1050 cl_uint num_events_in_wait_list, 1051 const cl_event* event_wait_list, 1052 cl_event* event); 1053 1054 typedef clEnqueueSVMUnmap_t * 1055 clEnqueueSVMUnmap_fn CL_API_SUFFIX__VERSION_2_0; 1056 1057 #endif /* CL_VERSION_2_0 */ 1058 1059 #ifdef CL_VERSION_2_1 1060 1061 typedef cl_int CL_API_CALL clSetDefaultDeviceCommandQueue_t( 1062 cl_context context, 1063 cl_device_id device, 1064 cl_command_queue command_queue); 1065 1066 typedef clSetDefaultDeviceCommandQueue_t * 1067 clSetDefaultDeviceCommandQueue_fn CL_API_SUFFIX__VERSION_2_1; 1068 1069 typedef cl_int CL_API_CALL clGetDeviceAndHostTimer_t( 1070 cl_device_id device, 1071 cl_ulong* device_timestamp, 1072 cl_ulong* host_timestamp); 1073 1074 typedef clGetDeviceAndHostTimer_t * 1075 clGetDeviceAndHostTimer_fn CL_API_SUFFIX__VERSION_2_1; 1076 1077 typedef cl_int CL_API_CALL clGetHostTimer_t( 1078 cl_device_id device, 1079 cl_ulong* host_timestamp); 1080 1081 typedef clGetHostTimer_t * 1082 clGetHostTimer_fn CL_API_SUFFIX__VERSION_2_1; 1083 1084 typedef cl_program CL_API_CALL clCreateProgramWithIL_t( 1085 cl_context context, 1086 const void* il, 1087 size_t length, 1088 cl_int* errcode_ret); 1089 1090 typedef clCreateProgramWithIL_t * 1091 clCreateProgramWithIL_fn CL_API_SUFFIX__VERSION_2_1; 1092 1093 typedef cl_kernel CL_API_CALL clCloneKernel_t( 1094 cl_kernel source_kernel, 1095 cl_int* errcode_ret); 1096 1097 typedef clCloneKernel_t * 1098 clCloneKernel_fn CL_API_SUFFIX__VERSION_2_1; 1099 1100 typedef cl_int CL_API_CALL clGetKernelSubGroupInfo_t( 1101 cl_kernel kernel, 1102 cl_device_id device, 1103 cl_kernel_sub_group_info param_name, 1104 size_t input_value_size, 1105 const void* input_value, 1106 size_t param_value_size, 1107 void* param_value, 1108 size_t* param_value_size_ret); 1109 1110 typedef clGetKernelSubGroupInfo_t * 1111 clGetKernelSubGroupInfo_fn CL_API_SUFFIX__VERSION_2_1; 1112 1113 typedef cl_int CL_API_CALL clEnqueueSVMMigrateMem_t( 1114 cl_command_queue command_queue, 1115 cl_uint num_svm_pointers, 1116 const void** svm_pointers, 1117 const size_t* sizes, 1118 cl_mem_migration_flags flags, 1119 cl_uint num_events_in_wait_list, 1120 const cl_event* event_wait_list, 1121 cl_event* event); 1122 1123 typedef clEnqueueSVMMigrateMem_t * 1124 clEnqueueSVMMigrateMem_fn CL_API_SUFFIX__VERSION_2_1; 1125 1126 #endif /* CL_VERSION_2_1 */ 1127 1128 #ifdef CL_VERSION_2_2 1129 1130 typedef cl_int CL_API_CALL clSetProgramSpecializationConstant_t( 1131 cl_program program, 1132 cl_uint spec_id, 1133 size_t spec_size, 1134 const void* spec_value); 1135 1136 typedef clSetProgramSpecializationConstant_t * 1137 clSetProgramSpecializationConstant_fn CL_API_SUFFIX__VERSION_2_2; 1138 1139 typedef cl_int CL_API_CALL clSetProgramReleaseCallback_t( 1140 cl_program program, 1141 void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), 1142 void* user_data); 1143 1144 typedef clSetProgramReleaseCallback_t * 1145 clSetProgramReleaseCallback_fn CL_API_SUFFIX__VERSION_2_2_DEPRECATED; 1146 1147 #endif /* CL_VERSION_2_2 */ 1148 1149 #ifdef CL_VERSION_3_0 1150 1151 typedef cl_int CL_API_CALL clSetContextDestructorCallback_t( 1152 cl_context context, 1153 void (CL_CALLBACK* pfn_notify)(cl_context context, void* user_data), 1154 void* user_data); 1155 1156 typedef clSetContextDestructorCallback_t * 1157 clSetContextDestructorCallback_fn CL_API_SUFFIX__VERSION_3_0; 1158 1159 typedef cl_mem CL_API_CALL clCreateBufferWithProperties_t( 1160 cl_context context, 1161 const cl_mem_properties* properties, 1162 cl_mem_flags flags, 1163 size_t size, 1164 void* host_ptr, 1165 cl_int* errcode_ret); 1166 1167 typedef clCreateBufferWithProperties_t * 1168 clCreateBufferWithProperties_fn CL_API_SUFFIX__VERSION_3_0; 1169 1170 typedef cl_mem CL_API_CALL clCreateImageWithProperties_t( 1171 cl_context context, 1172 const cl_mem_properties* properties, 1173 cl_mem_flags flags, 1174 const cl_image_format* image_format, 1175 const cl_image_desc* image_desc, 1176 void* host_ptr, 1177 cl_int* errcode_ret); 1178 1179 typedef clCreateImageWithProperties_t * 1180 clCreateImageWithProperties_fn CL_API_SUFFIX__VERSION_3_0; 1181 1182 #endif /* CL_VERSION_3_0 */ 1183 1184 #endif /* OPENCL_CL_FUNCTION_TYPES_H_ */ 1185