cl.h revision 53c12917
1af69d88dSmrg/******************************************************************************* 253c12917Smaya * Copyright (c) 2008-2019 The Khronos Group Inc. 3af69d88dSmrg * 4af69d88dSmrg * Permission is hereby granted, free of charge, to any person obtaining a 5af69d88dSmrg * copy of this software and/or associated documentation files (the 6af69d88dSmrg * "Materials"), to deal in the Materials without restriction, including 7af69d88dSmrg * without limitation the rights to use, copy, modify, merge, publish, 8af69d88dSmrg * distribute, sublicense, and/or sell copies of the Materials, and to 9af69d88dSmrg * permit persons to whom the Materials are furnished to do so, subject to 10af69d88dSmrg * the following conditions: 11af69d88dSmrg * 12af69d88dSmrg * The above copyright notice and this permission notice shall be included 13af69d88dSmrg * in all copies or substantial portions of the Materials. 14af69d88dSmrg * 1553c12917Smaya * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS 1653c12917Smaya * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS 1753c12917Smaya * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT 1853c12917Smaya * https://www.khronos.org/registry/ 1953c12917Smaya * 20af69d88dSmrg * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21af69d88dSmrg * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22af69d88dSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23af69d88dSmrg * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24af69d88dSmrg * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25af69d88dSmrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26af69d88dSmrg * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 27af69d88dSmrg ******************************************************************************/ 28af69d88dSmrg 29af69d88dSmrg#ifndef __OPENCL_CL_H 30af69d88dSmrg#define __OPENCL_CL_H 31af69d88dSmrg 3253c12917Smaya#include <CL/cl_version.h> 33af69d88dSmrg#include <CL/cl_platform.h> 34af69d88dSmrg 35af69d88dSmrg#ifdef __cplusplus 36af69d88dSmrgextern "C" { 37af69d88dSmrg#endif 38af69d88dSmrg 39af69d88dSmrg/******************************************************************************/ 40af69d88dSmrg 41af69d88dSmrgtypedef struct _cl_platform_id * cl_platform_id; 42af69d88dSmrgtypedef struct _cl_device_id * cl_device_id; 43af69d88dSmrgtypedef struct _cl_context * cl_context; 44af69d88dSmrgtypedef struct _cl_command_queue * cl_command_queue; 45af69d88dSmrgtypedef struct _cl_mem * cl_mem; 46af69d88dSmrgtypedef struct _cl_program * cl_program; 47af69d88dSmrgtypedef struct _cl_kernel * cl_kernel; 48af69d88dSmrgtypedef struct _cl_event * cl_event; 49af69d88dSmrgtypedef struct _cl_sampler * cl_sampler; 50af69d88dSmrg 5153c12917Smayatypedef 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. */ 52af69d88dSmrgtypedef cl_ulong cl_bitfield; 53af69d88dSmrgtypedef cl_bitfield cl_device_type; 54af69d88dSmrgtypedef cl_uint cl_platform_info; 55af69d88dSmrgtypedef cl_uint cl_device_info; 56af69d88dSmrgtypedef cl_bitfield cl_device_fp_config; 57af69d88dSmrgtypedef cl_uint cl_device_mem_cache_type; 58af69d88dSmrgtypedef cl_uint cl_device_local_mem_type; 59af69d88dSmrgtypedef cl_bitfield cl_device_exec_capabilities; 6053c12917Smaya#ifdef CL_VERSION_2_0 6153c12917Smayatypedef cl_bitfield cl_device_svm_capabilities; 6253c12917Smaya#endif 63af69d88dSmrgtypedef cl_bitfield cl_command_queue_properties; 6453c12917Smaya#ifdef CL_VERSION_1_2 65af69d88dSmrgtypedef intptr_t cl_device_partition_property; 66af69d88dSmrgtypedef cl_bitfield cl_device_affinity_domain; 6753c12917Smaya#endif 68af69d88dSmrg 69af69d88dSmrgtypedef intptr_t cl_context_properties; 70af69d88dSmrgtypedef cl_uint cl_context_info; 7153c12917Smaya#ifdef CL_VERSION_2_0 7253c12917Smayatypedef cl_bitfield cl_queue_properties; 7353c12917Smaya#endif 74af69d88dSmrgtypedef cl_uint cl_command_queue_info; 75af69d88dSmrgtypedef cl_uint cl_channel_order; 76af69d88dSmrgtypedef cl_uint cl_channel_type; 77af69d88dSmrgtypedef cl_bitfield cl_mem_flags; 7853c12917Smaya#ifdef CL_VERSION_2_0 7953c12917Smayatypedef cl_bitfield cl_svm_mem_flags; 8053c12917Smaya#endif 81af69d88dSmrgtypedef cl_uint cl_mem_object_type; 82af69d88dSmrgtypedef cl_uint cl_mem_info; 8353c12917Smaya#ifdef CL_VERSION_1_2 84af69d88dSmrgtypedef cl_bitfield cl_mem_migration_flags; 8553c12917Smaya#endif 86af69d88dSmrgtypedef cl_uint cl_image_info; 8753c12917Smaya#ifdef CL_VERSION_1_1 88af69d88dSmrgtypedef cl_uint cl_buffer_create_type; 8953c12917Smaya#endif 90af69d88dSmrgtypedef cl_uint cl_addressing_mode; 91af69d88dSmrgtypedef cl_uint cl_filter_mode; 92af69d88dSmrgtypedef cl_uint cl_sampler_info; 93af69d88dSmrgtypedef cl_bitfield cl_map_flags; 9453c12917Smaya#ifdef CL_VERSION_2_0 9553c12917Smayatypedef intptr_t cl_pipe_properties; 9653c12917Smayatypedef cl_uint cl_pipe_info; 9753c12917Smaya#endif 98af69d88dSmrgtypedef cl_uint cl_program_info; 99af69d88dSmrgtypedef cl_uint cl_program_build_info; 10053c12917Smaya#ifdef CL_VERSION_1_2 101af69d88dSmrgtypedef cl_uint cl_program_binary_type; 10253c12917Smaya#endif 103af69d88dSmrgtypedef cl_int cl_build_status; 104af69d88dSmrgtypedef cl_uint cl_kernel_info; 10553c12917Smaya#ifdef CL_VERSION_1_2 106af69d88dSmrgtypedef cl_uint cl_kernel_arg_info; 107af69d88dSmrgtypedef cl_uint cl_kernel_arg_address_qualifier; 108af69d88dSmrgtypedef cl_uint cl_kernel_arg_access_qualifier; 109af69d88dSmrgtypedef cl_bitfield cl_kernel_arg_type_qualifier; 11053c12917Smaya#endif 111af69d88dSmrgtypedef cl_uint cl_kernel_work_group_info; 11253c12917Smaya#ifdef CL_VERSION_2_1 11353c12917Smayatypedef cl_uint cl_kernel_sub_group_info; 11453c12917Smaya#endif 115af69d88dSmrgtypedef cl_uint cl_event_info; 116af69d88dSmrgtypedef cl_uint cl_command_type; 117af69d88dSmrgtypedef cl_uint cl_profiling_info; 11853c12917Smaya#ifdef CL_VERSION_2_0 11953c12917Smayatypedef cl_bitfield cl_sampler_properties; 12053c12917Smayatypedef cl_uint cl_kernel_exec_info; 12153c12917Smaya#endif 122af69d88dSmrg 123af69d88dSmrgtypedef struct _cl_image_format { 124af69d88dSmrg cl_channel_order image_channel_order; 125af69d88dSmrg cl_channel_type image_channel_data_type; 126af69d88dSmrg} cl_image_format; 127af69d88dSmrg 12853c12917Smaya#ifdef CL_VERSION_1_2 12953c12917Smaya 130af69d88dSmrgtypedef struct _cl_image_desc { 131af69d88dSmrg cl_mem_object_type image_type; 132af69d88dSmrg size_t image_width; 133af69d88dSmrg size_t image_height; 134af69d88dSmrg size_t image_depth; 135af69d88dSmrg size_t image_array_size; 136af69d88dSmrg size_t image_row_pitch; 137af69d88dSmrg size_t image_slice_pitch; 138af69d88dSmrg cl_uint num_mip_levels; 139af69d88dSmrg cl_uint num_samples; 14053c12917Smaya#ifdef __GNUC__ 14153c12917Smaya __extension__ /* Prevents warnings about anonymous union in -pedantic builds */ 14253c12917Smaya#endif 14353c12917Smaya#ifdef _MSC_VER 14453c12917Smaya#pragma warning( push ) 14553c12917Smaya#pragma warning( disable : 4201 ) /* Prevents warning about nameless struct/union in /W4 /Za builds */ 14653c12917Smaya#endif 14753c12917Smaya union { 14853c12917Smaya cl_mem buffer; 14953c12917Smaya cl_mem mem_object; 15053c12917Smaya }; 15153c12917Smaya#ifdef _MSC_VER 15253c12917Smaya#pragma warning( pop ) 15353c12917Smaya#endif 154af69d88dSmrg} cl_image_desc; 155af69d88dSmrg 15653c12917Smaya#endif 15753c12917Smaya 15853c12917Smaya#ifdef CL_VERSION_1_1 15953c12917Smaya 160af69d88dSmrgtypedef struct _cl_buffer_region { 161af69d88dSmrg size_t origin; 162af69d88dSmrg size_t size; 163af69d88dSmrg} cl_buffer_region; 164af69d88dSmrg 16553c12917Smaya#endif 166af69d88dSmrg 167af69d88dSmrg/******************************************************************************/ 168af69d88dSmrg 169af69d88dSmrg/* Error Codes */ 170af69d88dSmrg#define CL_SUCCESS 0 171af69d88dSmrg#define CL_DEVICE_NOT_FOUND -1 172af69d88dSmrg#define CL_DEVICE_NOT_AVAILABLE -2 173af69d88dSmrg#define CL_COMPILER_NOT_AVAILABLE -3 174af69d88dSmrg#define CL_MEM_OBJECT_ALLOCATION_FAILURE -4 175af69d88dSmrg#define CL_OUT_OF_RESOURCES -5 176af69d88dSmrg#define CL_OUT_OF_HOST_MEMORY -6 177af69d88dSmrg#define CL_PROFILING_INFO_NOT_AVAILABLE -7 178af69d88dSmrg#define CL_MEM_COPY_OVERLAP -8 179af69d88dSmrg#define CL_IMAGE_FORMAT_MISMATCH -9 180af69d88dSmrg#define CL_IMAGE_FORMAT_NOT_SUPPORTED -10 181af69d88dSmrg#define CL_BUILD_PROGRAM_FAILURE -11 182af69d88dSmrg#define CL_MAP_FAILURE -12 18353c12917Smaya#ifdef CL_VERSION_1_1 184af69d88dSmrg#define CL_MISALIGNED_SUB_BUFFER_OFFSET -13 185af69d88dSmrg#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14 18653c12917Smaya#endif 18753c12917Smaya#ifdef CL_VERSION_1_2 188af69d88dSmrg#define CL_COMPILE_PROGRAM_FAILURE -15 189af69d88dSmrg#define CL_LINKER_NOT_AVAILABLE -16 190af69d88dSmrg#define CL_LINK_PROGRAM_FAILURE -17 191af69d88dSmrg#define CL_DEVICE_PARTITION_FAILED -18 192af69d88dSmrg#define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19 19353c12917Smaya#endif 194af69d88dSmrg 195af69d88dSmrg#define CL_INVALID_VALUE -30 196af69d88dSmrg#define CL_INVALID_DEVICE_TYPE -31 197af69d88dSmrg#define CL_INVALID_PLATFORM -32 198af69d88dSmrg#define CL_INVALID_DEVICE -33 199af69d88dSmrg#define CL_INVALID_CONTEXT -34 200af69d88dSmrg#define CL_INVALID_QUEUE_PROPERTIES -35 201af69d88dSmrg#define CL_INVALID_COMMAND_QUEUE -36 202af69d88dSmrg#define CL_INVALID_HOST_PTR -37 203af69d88dSmrg#define CL_INVALID_MEM_OBJECT -38 204af69d88dSmrg#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39 205af69d88dSmrg#define CL_INVALID_IMAGE_SIZE -40 206af69d88dSmrg#define CL_INVALID_SAMPLER -41 207af69d88dSmrg#define CL_INVALID_BINARY -42 208af69d88dSmrg#define CL_INVALID_BUILD_OPTIONS -43 209af69d88dSmrg#define CL_INVALID_PROGRAM -44 210af69d88dSmrg#define CL_INVALID_PROGRAM_EXECUTABLE -45 211af69d88dSmrg#define CL_INVALID_KERNEL_NAME -46 212af69d88dSmrg#define CL_INVALID_KERNEL_DEFINITION -47 213af69d88dSmrg#define CL_INVALID_KERNEL -48 214af69d88dSmrg#define CL_INVALID_ARG_INDEX -49 215af69d88dSmrg#define CL_INVALID_ARG_VALUE -50 216af69d88dSmrg#define CL_INVALID_ARG_SIZE -51 217af69d88dSmrg#define CL_INVALID_KERNEL_ARGS -52 218af69d88dSmrg#define CL_INVALID_WORK_DIMENSION -53 219af69d88dSmrg#define CL_INVALID_WORK_GROUP_SIZE -54 220af69d88dSmrg#define CL_INVALID_WORK_ITEM_SIZE -55 221af69d88dSmrg#define CL_INVALID_GLOBAL_OFFSET -56 222af69d88dSmrg#define CL_INVALID_EVENT_WAIT_LIST -57 223af69d88dSmrg#define CL_INVALID_EVENT -58 224af69d88dSmrg#define CL_INVALID_OPERATION -59 225af69d88dSmrg#define CL_INVALID_GL_OBJECT -60 226af69d88dSmrg#define CL_INVALID_BUFFER_SIZE -61 227af69d88dSmrg#define CL_INVALID_MIP_LEVEL -62 228af69d88dSmrg#define CL_INVALID_GLOBAL_WORK_SIZE -63 22953c12917Smaya#ifdef CL_VERSION_1_1 230af69d88dSmrg#define CL_INVALID_PROPERTY -64 23153c12917Smaya#endif 23253c12917Smaya#ifdef CL_VERSION_1_2 233af69d88dSmrg#define CL_INVALID_IMAGE_DESCRIPTOR -65 234af69d88dSmrg#define CL_INVALID_COMPILER_OPTIONS -66 235af69d88dSmrg#define CL_INVALID_LINKER_OPTIONS -67 236af69d88dSmrg#define CL_INVALID_DEVICE_PARTITION_COUNT -68 23753c12917Smaya#endif 23853c12917Smaya#ifdef CL_VERSION_2_0 23953c12917Smaya#define CL_INVALID_PIPE_SIZE -69 24053c12917Smaya#define CL_INVALID_DEVICE_QUEUE -70 24153c12917Smaya#endif 24253c12917Smaya#ifdef CL_VERSION_2_2 24353c12917Smaya#define CL_INVALID_SPEC_ID -71 24453c12917Smaya#define CL_MAX_SIZE_RESTRICTION_EXCEEDED -72 24553c12917Smaya#endif 246af69d88dSmrg 247af69d88dSmrg 248af69d88dSmrg/* cl_bool */ 249af69d88dSmrg#define CL_FALSE 0 250af69d88dSmrg#define CL_TRUE 1 25153c12917Smaya#ifdef CL_VERSION_1_2 252af69d88dSmrg#define CL_BLOCKING CL_TRUE 253af69d88dSmrg#define CL_NON_BLOCKING CL_FALSE 25453c12917Smaya#endif 255af69d88dSmrg 256af69d88dSmrg/* cl_platform_info */ 257af69d88dSmrg#define CL_PLATFORM_PROFILE 0x0900 258af69d88dSmrg#define CL_PLATFORM_VERSION 0x0901 259af69d88dSmrg#define CL_PLATFORM_NAME 0x0902 260af69d88dSmrg#define CL_PLATFORM_VENDOR 0x0903 261af69d88dSmrg#define CL_PLATFORM_EXTENSIONS 0x0904 26253c12917Smaya#ifdef CL_VERSION_2_1 26353c12917Smaya#define CL_PLATFORM_HOST_TIMER_RESOLUTION 0x0905 26453c12917Smaya#endif 265af69d88dSmrg 266af69d88dSmrg/* cl_device_type - bitfield */ 267af69d88dSmrg#define CL_DEVICE_TYPE_DEFAULT (1 << 0) 268af69d88dSmrg#define CL_DEVICE_TYPE_CPU (1 << 1) 269af69d88dSmrg#define CL_DEVICE_TYPE_GPU (1 << 2) 270af69d88dSmrg#define CL_DEVICE_TYPE_ACCELERATOR (1 << 3) 27153c12917Smaya#ifdef CL_VERSION_1_2 272af69d88dSmrg#define CL_DEVICE_TYPE_CUSTOM (1 << 4) 27353c12917Smaya#endif 274af69d88dSmrg#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF 275af69d88dSmrg 276af69d88dSmrg/* cl_device_info */ 27753c12917Smaya#define CL_DEVICE_TYPE 0x1000 27853c12917Smaya#define CL_DEVICE_VENDOR_ID 0x1001 27953c12917Smaya#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002 28053c12917Smaya#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003 28153c12917Smaya#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004 28253c12917Smaya#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 28353c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006 28453c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007 28553c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008 28653c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009 28753c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A 28853c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B 28953c12917Smaya#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C 29053c12917Smaya#define CL_DEVICE_ADDRESS_BITS 0x100D 29153c12917Smaya#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E 29253c12917Smaya#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F 29353c12917Smaya#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010 29453c12917Smaya#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011 29553c12917Smaya#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012 29653c12917Smaya#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013 29753c12917Smaya#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014 29853c12917Smaya#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015 29953c12917Smaya#define CL_DEVICE_IMAGE_SUPPORT 0x1016 30053c12917Smaya#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017 30153c12917Smaya#define CL_DEVICE_MAX_SAMPLERS 0x1018 30253c12917Smaya#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019 30353c12917Smaya#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A 30453c12917Smaya#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B 30553c12917Smaya#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C 30653c12917Smaya#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D 30753c12917Smaya#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E 30853c12917Smaya#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F 30953c12917Smaya#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020 31053c12917Smaya#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021 31153c12917Smaya#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022 31253c12917Smaya#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023 31353c12917Smaya#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024 31453c12917Smaya#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025 31553c12917Smaya#define CL_DEVICE_ENDIAN_LITTLE 0x1026 31653c12917Smaya#define CL_DEVICE_AVAILABLE 0x1027 31753c12917Smaya#define CL_DEVICE_COMPILER_AVAILABLE 0x1028 31853c12917Smaya#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029 31953c12917Smaya#define CL_DEVICE_QUEUE_PROPERTIES 0x102A /* deprecated */ 32053c12917Smaya#ifdef CL_VERSION_2_0 32153c12917Smaya#define CL_DEVICE_QUEUE_ON_HOST_PROPERTIES 0x102A 32253c12917Smaya#endif 32353c12917Smaya#define CL_DEVICE_NAME 0x102B 32453c12917Smaya#define CL_DEVICE_VENDOR 0x102C 32553c12917Smaya#define CL_DRIVER_VERSION 0x102D 32653c12917Smaya#define CL_DEVICE_PROFILE 0x102E 32753c12917Smaya#define CL_DEVICE_VERSION 0x102F 32853c12917Smaya#define CL_DEVICE_EXTENSIONS 0x1030 32953c12917Smaya#define CL_DEVICE_PLATFORM 0x1031 33053c12917Smaya#ifdef CL_VERSION_1_2 33153c12917Smaya#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032 33253c12917Smaya#endif 33353c12917Smaya/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG which is already defined in "cl_ext.h" */ 33453c12917Smaya#ifdef CL_VERSION_1_1 33553c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034 33653c12917Smaya#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */ 33753c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036 33853c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037 33953c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038 34053c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039 34153c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A 34253c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B 34353c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C 34453c12917Smaya#define CL_DEVICE_OPENCL_C_VERSION 0x103D 34553c12917Smaya#endif 34653c12917Smaya#ifdef CL_VERSION_1_2 34753c12917Smaya#define CL_DEVICE_LINKER_AVAILABLE 0x103E 34853c12917Smaya#define CL_DEVICE_BUILT_IN_KERNELS 0x103F 34953c12917Smaya#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040 35053c12917Smaya#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041 35153c12917Smaya#define CL_DEVICE_PARENT_DEVICE 0x1042 35253c12917Smaya#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043 35353c12917Smaya#define CL_DEVICE_PARTITION_PROPERTIES 0x1044 35453c12917Smaya#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045 35553c12917Smaya#define CL_DEVICE_PARTITION_TYPE 0x1046 35653c12917Smaya#define CL_DEVICE_REFERENCE_COUNT 0x1047 35753c12917Smaya#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048 35853c12917Smaya#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049 35953c12917Smaya#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A 36053c12917Smaya#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B 36153c12917Smaya#endif 36253c12917Smaya#ifdef CL_VERSION_2_0 36353c12917Smaya#define CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS 0x104C 36453c12917Smaya#define CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE 0x104D 36553c12917Smaya#define CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES 0x104E 36653c12917Smaya#define CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE 0x104F 36753c12917Smaya#define CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE 0x1050 36853c12917Smaya#define CL_DEVICE_MAX_ON_DEVICE_QUEUES 0x1051 36953c12917Smaya#define CL_DEVICE_MAX_ON_DEVICE_EVENTS 0x1052 37053c12917Smaya#define CL_DEVICE_SVM_CAPABILITIES 0x1053 37153c12917Smaya#define CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE 0x1054 37253c12917Smaya#define CL_DEVICE_MAX_PIPE_ARGS 0x1055 37353c12917Smaya#define CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS 0x1056 37453c12917Smaya#define CL_DEVICE_PIPE_MAX_PACKET_SIZE 0x1057 37553c12917Smaya#define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT 0x1058 37653c12917Smaya#define CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT 0x1059 37753c12917Smaya#define CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT 0x105A 37853c12917Smaya#endif 37953c12917Smaya#ifdef CL_VERSION_2_1 38053c12917Smaya#define CL_DEVICE_IL_VERSION 0x105B 38153c12917Smaya#define CL_DEVICE_MAX_NUM_SUB_GROUPS 0x105C 38253c12917Smaya#define CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS 0x105D 38353c12917Smaya#endif 384af69d88dSmrg 385af69d88dSmrg/* cl_device_fp_config - bitfield */ 386af69d88dSmrg#define CL_FP_DENORM (1 << 0) 387af69d88dSmrg#define CL_FP_INF_NAN (1 << 1) 388af69d88dSmrg#define CL_FP_ROUND_TO_NEAREST (1 << 2) 389af69d88dSmrg#define CL_FP_ROUND_TO_ZERO (1 << 3) 390af69d88dSmrg#define CL_FP_ROUND_TO_INF (1 << 4) 391af69d88dSmrg#define CL_FP_FMA (1 << 5) 39253c12917Smaya#ifdef CL_VERSION_1_1 393af69d88dSmrg#define CL_FP_SOFT_FLOAT (1 << 6) 39453c12917Smaya#endif 39553c12917Smaya#ifdef CL_VERSION_1_2 396af69d88dSmrg#define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7) 39753c12917Smaya#endif 398af69d88dSmrg 399af69d88dSmrg/* cl_device_mem_cache_type */ 400af69d88dSmrg#define CL_NONE 0x0 401af69d88dSmrg#define CL_READ_ONLY_CACHE 0x1 402af69d88dSmrg#define CL_READ_WRITE_CACHE 0x2 403af69d88dSmrg 404af69d88dSmrg/* cl_device_local_mem_type */ 405af69d88dSmrg#define CL_LOCAL 0x1 406af69d88dSmrg#define CL_GLOBAL 0x2 407af69d88dSmrg 408af69d88dSmrg/* cl_device_exec_capabilities - bitfield */ 409af69d88dSmrg#define CL_EXEC_KERNEL (1 << 0) 410af69d88dSmrg#define CL_EXEC_NATIVE_KERNEL (1 << 1) 411af69d88dSmrg 412af69d88dSmrg/* cl_command_queue_properties - bitfield */ 413af69d88dSmrg#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0) 414af69d88dSmrg#define CL_QUEUE_PROFILING_ENABLE (1 << 1) 41553c12917Smaya#ifdef CL_VERSION_2_0 41653c12917Smaya#define CL_QUEUE_ON_DEVICE (1 << 2) 41753c12917Smaya#define CL_QUEUE_ON_DEVICE_DEFAULT (1 << 3) 41853c12917Smaya#endif 419af69d88dSmrg 42053c12917Smaya/* cl_context_info */ 421af69d88dSmrg#define CL_CONTEXT_REFERENCE_COUNT 0x1080 422af69d88dSmrg#define CL_CONTEXT_DEVICES 0x1081 423af69d88dSmrg#define CL_CONTEXT_PROPERTIES 0x1082 42453c12917Smaya#ifdef CL_VERSION_1_1 425af69d88dSmrg#define CL_CONTEXT_NUM_DEVICES 0x1083 42653c12917Smaya#endif 427af69d88dSmrg 428af69d88dSmrg/* cl_context_properties */ 429af69d88dSmrg#define CL_CONTEXT_PLATFORM 0x1084 43053c12917Smaya#ifdef CL_VERSION_1_2 431af69d88dSmrg#define CL_CONTEXT_INTEROP_USER_SYNC 0x1085 43253c12917Smaya#endif 43353c12917Smaya 43453c12917Smaya#ifdef CL_VERSION_1_2 43553c12917Smaya 436af69d88dSmrg/* cl_device_partition_property */ 437af69d88dSmrg#define CL_DEVICE_PARTITION_EQUALLY 0x1086 438af69d88dSmrg#define CL_DEVICE_PARTITION_BY_COUNTS 0x1087 439af69d88dSmrg#define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0 440af69d88dSmrg#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088 44153c12917Smaya 44253c12917Smaya#endif 44353c12917Smaya 44453c12917Smaya#ifdef CL_VERSION_1_2 44553c12917Smaya 446af69d88dSmrg/* cl_device_affinity_domain */ 44753c12917Smaya#define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0) 44853c12917Smaya#define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1) 44953c12917Smaya#define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2) 45053c12917Smaya#define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3) 45153c12917Smaya#define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4) 45253c12917Smaya#define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5) 45353c12917Smaya 45453c12917Smaya#endif 45553c12917Smaya 45653c12917Smaya#ifdef CL_VERSION_2_0 45753c12917Smaya 45853c12917Smaya/* cl_device_svm_capabilities */ 45953c12917Smaya#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0) 46053c12917Smaya#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1) 46153c12917Smaya#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2) 46253c12917Smaya#define CL_DEVICE_SVM_ATOMICS (1 << 3) 46353c12917Smaya 46453c12917Smaya#endif 465af69d88dSmrg 466af69d88dSmrg/* cl_command_queue_info */ 467af69d88dSmrg#define CL_QUEUE_CONTEXT 0x1090 468af69d88dSmrg#define CL_QUEUE_DEVICE 0x1091 469af69d88dSmrg#define CL_QUEUE_REFERENCE_COUNT 0x1092 470af69d88dSmrg#define CL_QUEUE_PROPERTIES 0x1093 47153c12917Smaya#ifdef CL_VERSION_2_0 47253c12917Smaya#define CL_QUEUE_SIZE 0x1094 47353c12917Smaya#endif 47453c12917Smaya#ifdef CL_VERSION_2_1 47553c12917Smaya#define CL_QUEUE_DEVICE_DEFAULT 0x1095 47653c12917Smaya#endif 477af69d88dSmrg 47853c12917Smaya/* cl_mem_flags and cl_svm_mem_flags - bitfield */ 479af69d88dSmrg#define CL_MEM_READ_WRITE (1 << 0) 480af69d88dSmrg#define CL_MEM_WRITE_ONLY (1 << 1) 481af69d88dSmrg#define CL_MEM_READ_ONLY (1 << 2) 482af69d88dSmrg#define CL_MEM_USE_HOST_PTR (1 << 3) 483af69d88dSmrg#define CL_MEM_ALLOC_HOST_PTR (1 << 4) 484af69d88dSmrg#define CL_MEM_COPY_HOST_PTR (1 << 5) 485af69d88dSmrg/* reserved (1 << 6) */ 48653c12917Smaya#ifdef CL_VERSION_1_2 487af69d88dSmrg#define CL_MEM_HOST_WRITE_ONLY (1 << 7) 488af69d88dSmrg#define CL_MEM_HOST_READ_ONLY (1 << 8) 489af69d88dSmrg#define CL_MEM_HOST_NO_ACCESS (1 << 9) 49053c12917Smaya#endif 49153c12917Smaya#ifdef CL_VERSION_2_0 49253c12917Smaya#define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10) /* used by cl_svm_mem_flags only */ 49353c12917Smaya#define CL_MEM_SVM_ATOMICS (1 << 11) /* used by cl_svm_mem_flags only */ 49453c12917Smaya#define CL_MEM_KERNEL_READ_AND_WRITE (1 << 12) 49553c12917Smaya#endif 49653c12917Smaya 49753c12917Smaya#ifdef CL_VERSION_1_2 498af69d88dSmrg 499af69d88dSmrg/* cl_mem_migration_flags - bitfield */ 500af69d88dSmrg#define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0) 501af69d88dSmrg#define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1) 502af69d88dSmrg 50353c12917Smaya#endif 50453c12917Smaya 505af69d88dSmrg/* cl_channel_order */ 506af69d88dSmrg#define CL_R 0x10B0 507af69d88dSmrg#define CL_A 0x10B1 508af69d88dSmrg#define CL_RG 0x10B2 509af69d88dSmrg#define CL_RA 0x10B3 510af69d88dSmrg#define CL_RGB 0x10B4 511af69d88dSmrg#define CL_RGBA 0x10B5 512af69d88dSmrg#define CL_BGRA 0x10B6 513af69d88dSmrg#define CL_ARGB 0x10B7 514af69d88dSmrg#define CL_INTENSITY 0x10B8 515af69d88dSmrg#define CL_LUMINANCE 0x10B9 51653c12917Smaya#ifdef CL_VERSION_1_1 517af69d88dSmrg#define CL_Rx 0x10BA 518af69d88dSmrg#define CL_RGx 0x10BB 519af69d88dSmrg#define CL_RGBx 0x10BC 52053c12917Smaya#endif 52153c12917Smaya#ifdef CL_VERSION_1_2 522af69d88dSmrg#define CL_DEPTH 0x10BD 523af69d88dSmrg#define CL_DEPTH_STENCIL 0x10BE 52453c12917Smaya#endif 52553c12917Smaya#ifdef CL_VERSION_2_0 52653c12917Smaya#define CL_sRGB 0x10BF 52753c12917Smaya#define CL_sRGBx 0x10C0 52853c12917Smaya#define CL_sRGBA 0x10C1 52953c12917Smaya#define CL_sBGRA 0x10C2 53053c12917Smaya#define CL_ABGR 0x10C3 53153c12917Smaya#endif 532af69d88dSmrg 533af69d88dSmrg/* cl_channel_type */ 534af69d88dSmrg#define CL_SNORM_INT8 0x10D0 535af69d88dSmrg#define CL_SNORM_INT16 0x10D1 536af69d88dSmrg#define CL_UNORM_INT8 0x10D2 537af69d88dSmrg#define CL_UNORM_INT16 0x10D3 538af69d88dSmrg#define CL_UNORM_SHORT_565 0x10D4 539af69d88dSmrg#define CL_UNORM_SHORT_555 0x10D5 540af69d88dSmrg#define CL_UNORM_INT_101010 0x10D6 541af69d88dSmrg#define CL_SIGNED_INT8 0x10D7 542af69d88dSmrg#define CL_SIGNED_INT16 0x10D8 543af69d88dSmrg#define CL_SIGNED_INT32 0x10D9 544af69d88dSmrg#define CL_UNSIGNED_INT8 0x10DA 545af69d88dSmrg#define CL_UNSIGNED_INT16 0x10DB 546af69d88dSmrg#define CL_UNSIGNED_INT32 0x10DC 547af69d88dSmrg#define CL_HALF_FLOAT 0x10DD 548af69d88dSmrg#define CL_FLOAT 0x10DE 54953c12917Smaya#ifdef CL_VERSION_1_2 550af69d88dSmrg#define CL_UNORM_INT24 0x10DF 55153c12917Smaya#endif 55253c12917Smaya#ifdef CL_VERSION_2_1 55353c12917Smaya#define CL_UNORM_INT_101010_2 0x10E0 55453c12917Smaya#endif 555af69d88dSmrg 556af69d88dSmrg/* cl_mem_object_type */ 557af69d88dSmrg#define CL_MEM_OBJECT_BUFFER 0x10F0 558af69d88dSmrg#define CL_MEM_OBJECT_IMAGE2D 0x10F1 559af69d88dSmrg#define CL_MEM_OBJECT_IMAGE3D 0x10F2 56053c12917Smaya#ifdef CL_VERSION_1_2 561af69d88dSmrg#define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3 562af69d88dSmrg#define CL_MEM_OBJECT_IMAGE1D 0x10F4 563af69d88dSmrg#define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5 564af69d88dSmrg#define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6 56553c12917Smaya#endif 56653c12917Smaya#ifdef CL_VERSION_2_0 56753c12917Smaya#define CL_MEM_OBJECT_PIPE 0x10F7 56853c12917Smaya#endif 569af69d88dSmrg 570af69d88dSmrg/* cl_mem_info */ 571af69d88dSmrg#define CL_MEM_TYPE 0x1100 572af69d88dSmrg#define CL_MEM_FLAGS 0x1101 573af69d88dSmrg#define CL_MEM_SIZE 0x1102 574af69d88dSmrg#define CL_MEM_HOST_PTR 0x1103 575af69d88dSmrg#define CL_MEM_MAP_COUNT 0x1104 576af69d88dSmrg#define CL_MEM_REFERENCE_COUNT 0x1105 577af69d88dSmrg#define CL_MEM_CONTEXT 0x1106 57853c12917Smaya#ifdef CL_VERSION_1_1 579af69d88dSmrg#define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107 580af69d88dSmrg#define CL_MEM_OFFSET 0x1108 58153c12917Smaya#endif 58253c12917Smaya#ifdef CL_VERSION_2_0 58353c12917Smaya#define CL_MEM_USES_SVM_POINTER 0x1109 58453c12917Smaya#endif 585af69d88dSmrg 586af69d88dSmrg/* cl_image_info */ 587af69d88dSmrg#define CL_IMAGE_FORMAT 0x1110 588af69d88dSmrg#define CL_IMAGE_ELEMENT_SIZE 0x1111 589af69d88dSmrg#define CL_IMAGE_ROW_PITCH 0x1112 590af69d88dSmrg#define CL_IMAGE_SLICE_PITCH 0x1113 591af69d88dSmrg#define CL_IMAGE_WIDTH 0x1114 592af69d88dSmrg#define CL_IMAGE_HEIGHT 0x1115 593af69d88dSmrg#define CL_IMAGE_DEPTH 0x1116 59453c12917Smaya#ifdef CL_VERSION_1_2 595af69d88dSmrg#define CL_IMAGE_ARRAY_SIZE 0x1117 596af69d88dSmrg#define CL_IMAGE_BUFFER 0x1118 597af69d88dSmrg#define CL_IMAGE_NUM_MIP_LEVELS 0x1119 598af69d88dSmrg#define CL_IMAGE_NUM_SAMPLES 0x111A 59953c12917Smaya#endif 60053c12917Smaya 60153c12917Smaya#ifdef CL_VERSION_2_0 60253c12917Smaya 60353c12917Smaya/* cl_pipe_info */ 60453c12917Smaya#define CL_PIPE_PACKET_SIZE 0x1120 60553c12917Smaya#define CL_PIPE_MAX_PACKETS 0x1121 60653c12917Smaya 60753c12917Smaya#endif 608af69d88dSmrg 609af69d88dSmrg/* cl_addressing_mode */ 610af69d88dSmrg#define CL_ADDRESS_NONE 0x1130 611af69d88dSmrg#define CL_ADDRESS_CLAMP_TO_EDGE 0x1131 612af69d88dSmrg#define CL_ADDRESS_CLAMP 0x1132 613af69d88dSmrg#define CL_ADDRESS_REPEAT 0x1133 61453c12917Smaya#ifdef CL_VERSION_1_1 615af69d88dSmrg#define CL_ADDRESS_MIRRORED_REPEAT 0x1134 61653c12917Smaya#endif 617af69d88dSmrg 618af69d88dSmrg/* cl_filter_mode */ 619af69d88dSmrg#define CL_FILTER_NEAREST 0x1140 620af69d88dSmrg#define CL_FILTER_LINEAR 0x1141 621af69d88dSmrg 622af69d88dSmrg/* cl_sampler_info */ 623af69d88dSmrg#define CL_SAMPLER_REFERENCE_COUNT 0x1150 624af69d88dSmrg#define CL_SAMPLER_CONTEXT 0x1151 625af69d88dSmrg#define CL_SAMPLER_NORMALIZED_COORDS 0x1152 626af69d88dSmrg#define CL_SAMPLER_ADDRESSING_MODE 0x1153 627af69d88dSmrg#define CL_SAMPLER_FILTER_MODE 0x1154 62853c12917Smaya#ifdef CL_VERSION_2_0 62953c12917Smaya/* These enumerants are for the cl_khr_mipmap_image extension. 63053c12917Smaya They have since been added to cl_ext.h with an appropriate 63153c12917Smaya KHR suffix, but are left here for backwards compatibility. */ 63253c12917Smaya#define CL_SAMPLER_MIP_FILTER_MODE 0x1155 63353c12917Smaya#define CL_SAMPLER_LOD_MIN 0x1156 63453c12917Smaya#define CL_SAMPLER_LOD_MAX 0x1157 63553c12917Smaya#endif 636af69d88dSmrg 637af69d88dSmrg/* cl_map_flags - bitfield */ 638af69d88dSmrg#define CL_MAP_READ (1 << 0) 639af69d88dSmrg#define CL_MAP_WRITE (1 << 1) 64053c12917Smaya#ifdef CL_VERSION_1_2 641af69d88dSmrg#define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2) 64253c12917Smaya#endif 643af69d88dSmrg 644af69d88dSmrg/* cl_program_info */ 645af69d88dSmrg#define CL_PROGRAM_REFERENCE_COUNT 0x1160 646af69d88dSmrg#define CL_PROGRAM_CONTEXT 0x1161 647af69d88dSmrg#define CL_PROGRAM_NUM_DEVICES 0x1162 648af69d88dSmrg#define CL_PROGRAM_DEVICES 0x1163 649af69d88dSmrg#define CL_PROGRAM_SOURCE 0x1164 650af69d88dSmrg#define CL_PROGRAM_BINARY_SIZES 0x1165 651af69d88dSmrg#define CL_PROGRAM_BINARIES 0x1166 65253c12917Smaya#ifdef CL_VERSION_1_2 653af69d88dSmrg#define CL_PROGRAM_NUM_KERNELS 0x1167 654af69d88dSmrg#define CL_PROGRAM_KERNEL_NAMES 0x1168 65553c12917Smaya#endif 65653c12917Smaya#ifdef CL_VERSION_2_1 65753c12917Smaya#define CL_PROGRAM_IL 0x1169 65853c12917Smaya#endif 65953c12917Smaya#ifdef CL_VERSION_2_2 66053c12917Smaya#define CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT 0x116A 66153c12917Smaya#define CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT 0x116B 66253c12917Smaya#endif 663af69d88dSmrg 664af69d88dSmrg/* cl_program_build_info */ 665af69d88dSmrg#define CL_PROGRAM_BUILD_STATUS 0x1181 666af69d88dSmrg#define CL_PROGRAM_BUILD_OPTIONS 0x1182 667af69d88dSmrg#define CL_PROGRAM_BUILD_LOG 0x1183 66853c12917Smaya#ifdef CL_VERSION_1_2 669af69d88dSmrg#define CL_PROGRAM_BINARY_TYPE 0x1184 67053c12917Smaya#endif 67153c12917Smaya#ifdef CL_VERSION_2_0 67253c12917Smaya#define CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE 0x1185 67353c12917Smaya#endif 67453c12917Smaya 67553c12917Smaya#ifdef CL_VERSION_1_2 67653c12917Smaya 677af69d88dSmrg/* cl_program_binary_type */ 678af69d88dSmrg#define CL_PROGRAM_BINARY_TYPE_NONE 0x0 679af69d88dSmrg#define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1 680af69d88dSmrg#define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2 681af69d88dSmrg#define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4 682af69d88dSmrg 68353c12917Smaya#endif 68453c12917Smaya 685af69d88dSmrg/* cl_build_status */ 686af69d88dSmrg#define CL_BUILD_SUCCESS 0 687af69d88dSmrg#define CL_BUILD_NONE -1 688af69d88dSmrg#define CL_BUILD_ERROR -2 689af69d88dSmrg#define CL_BUILD_IN_PROGRESS -3 690af69d88dSmrg 691af69d88dSmrg/* cl_kernel_info */ 692af69d88dSmrg#define CL_KERNEL_FUNCTION_NAME 0x1190 693af69d88dSmrg#define CL_KERNEL_NUM_ARGS 0x1191 694af69d88dSmrg#define CL_KERNEL_REFERENCE_COUNT 0x1192 695af69d88dSmrg#define CL_KERNEL_CONTEXT 0x1193 696af69d88dSmrg#define CL_KERNEL_PROGRAM 0x1194 69753c12917Smaya#ifdef CL_VERSION_1_2 698af69d88dSmrg#define CL_KERNEL_ATTRIBUTES 0x1195 69953c12917Smaya#endif 70053c12917Smaya#ifdef CL_VERSION_2_1 70153c12917Smaya#define CL_KERNEL_MAX_NUM_SUB_GROUPS 0x11B9 70253c12917Smaya#define CL_KERNEL_COMPILE_NUM_SUB_GROUPS 0x11BA 70353c12917Smaya#endif 70453c12917Smaya 70553c12917Smaya#ifdef CL_VERSION_1_2 706af69d88dSmrg 707af69d88dSmrg/* cl_kernel_arg_info */ 708af69d88dSmrg#define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196 709af69d88dSmrg#define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197 710af69d88dSmrg#define CL_KERNEL_ARG_TYPE_NAME 0x1198 711af69d88dSmrg#define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199 712af69d88dSmrg#define CL_KERNEL_ARG_NAME 0x119A 713af69d88dSmrg 71453c12917Smaya#endif 71553c12917Smaya 71653c12917Smaya#ifdef CL_VERSION_1_2 71753c12917Smaya 718af69d88dSmrg/* cl_kernel_arg_address_qualifier */ 719af69d88dSmrg#define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B 720af69d88dSmrg#define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C 721af69d88dSmrg#define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D 722af69d88dSmrg#define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E 723af69d88dSmrg 72453c12917Smaya#endif 72553c12917Smaya 72653c12917Smaya#ifdef CL_VERSION_1_2 72753c12917Smaya 728af69d88dSmrg/* cl_kernel_arg_access_qualifier */ 729af69d88dSmrg#define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0 730af69d88dSmrg#define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1 731af69d88dSmrg#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2 732af69d88dSmrg#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3 73353c12917Smaya 73453c12917Smaya#endif 73553c12917Smaya 73653c12917Smaya#ifdef CL_VERSION_1_2 73753c12917Smaya 73853c12917Smaya/* cl_kernel_arg_type_qualifier */ 739af69d88dSmrg#define CL_KERNEL_ARG_TYPE_NONE 0 740af69d88dSmrg#define CL_KERNEL_ARG_TYPE_CONST (1 << 0) 741af69d88dSmrg#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1) 742af69d88dSmrg#define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2) 74353c12917Smaya#ifdef CL_VERSION_2_0 74453c12917Smaya#define CL_KERNEL_ARG_TYPE_PIPE (1 << 3) 74553c12917Smaya#endif 74653c12917Smaya 74753c12917Smaya#endif 748af69d88dSmrg 749af69d88dSmrg/* cl_kernel_work_group_info */ 750af69d88dSmrg#define CL_KERNEL_WORK_GROUP_SIZE 0x11B0 751af69d88dSmrg#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1 752af69d88dSmrg#define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2 753af69d88dSmrg#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3 754af69d88dSmrg#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4 75553c12917Smaya#ifdef CL_VERSION_1_2 756af69d88dSmrg#define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5 75753c12917Smaya#endif 75853c12917Smaya 75953c12917Smaya#ifdef CL_VERSION_2_1 760af69d88dSmrg 76153c12917Smaya/* cl_kernel_sub_group_info */ 76253c12917Smaya#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE 0x2033 76353c12917Smaya#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE 0x2034 76453c12917Smaya#define CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT 0x11B8 76553c12917Smaya 76653c12917Smaya#endif 76753c12917Smaya 76853c12917Smaya#ifdef CL_VERSION_2_0 76953c12917Smaya 77053c12917Smaya/* cl_kernel_exec_info */ 77153c12917Smaya#define CL_KERNEL_EXEC_INFO_SVM_PTRS 0x11B6 77253c12917Smaya#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM 0x11B7 77353c12917Smaya 77453c12917Smaya#endif 77553c12917Smaya 77653c12917Smaya/* cl_event_info */ 777af69d88dSmrg#define CL_EVENT_COMMAND_QUEUE 0x11D0 778af69d88dSmrg#define CL_EVENT_COMMAND_TYPE 0x11D1 779af69d88dSmrg#define CL_EVENT_REFERENCE_COUNT 0x11D2 780af69d88dSmrg#define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3 78153c12917Smaya#ifdef CL_VERSION_1_1 782af69d88dSmrg#define CL_EVENT_CONTEXT 0x11D4 78353c12917Smaya#endif 784af69d88dSmrg 785af69d88dSmrg/* cl_command_type */ 786af69d88dSmrg#define CL_COMMAND_NDRANGE_KERNEL 0x11F0 787af69d88dSmrg#define CL_COMMAND_TASK 0x11F1 788af69d88dSmrg#define CL_COMMAND_NATIVE_KERNEL 0x11F2 789af69d88dSmrg#define CL_COMMAND_READ_BUFFER 0x11F3 790af69d88dSmrg#define CL_COMMAND_WRITE_BUFFER 0x11F4 791af69d88dSmrg#define CL_COMMAND_COPY_BUFFER 0x11F5 792af69d88dSmrg#define CL_COMMAND_READ_IMAGE 0x11F6 793af69d88dSmrg#define CL_COMMAND_WRITE_IMAGE 0x11F7 794af69d88dSmrg#define CL_COMMAND_COPY_IMAGE 0x11F8 795af69d88dSmrg#define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9 796af69d88dSmrg#define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA 797af69d88dSmrg#define CL_COMMAND_MAP_BUFFER 0x11FB 798af69d88dSmrg#define CL_COMMAND_MAP_IMAGE 0x11FC 799af69d88dSmrg#define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD 800af69d88dSmrg#define CL_COMMAND_MARKER 0x11FE 801af69d88dSmrg#define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF 802af69d88dSmrg#define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200 80353c12917Smaya#ifdef CL_VERSION_1_1 804af69d88dSmrg#define CL_COMMAND_READ_BUFFER_RECT 0x1201 805af69d88dSmrg#define CL_COMMAND_WRITE_BUFFER_RECT 0x1202 806af69d88dSmrg#define CL_COMMAND_COPY_BUFFER_RECT 0x1203 807af69d88dSmrg#define CL_COMMAND_USER 0x1204 80853c12917Smaya#endif 80953c12917Smaya#ifdef CL_VERSION_1_2 810af69d88dSmrg#define CL_COMMAND_BARRIER 0x1205 811af69d88dSmrg#define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206 812af69d88dSmrg#define CL_COMMAND_FILL_BUFFER 0x1207 813af69d88dSmrg#define CL_COMMAND_FILL_IMAGE 0x1208 81453c12917Smaya#endif 81553c12917Smaya#ifdef CL_VERSION_2_0 81653c12917Smaya#define CL_COMMAND_SVM_FREE 0x1209 81753c12917Smaya#define CL_COMMAND_SVM_MEMCPY 0x120A 81853c12917Smaya#define CL_COMMAND_SVM_MEMFILL 0x120B 81953c12917Smaya#define CL_COMMAND_SVM_MAP 0x120C 82053c12917Smaya#define CL_COMMAND_SVM_UNMAP 0x120D 82153c12917Smaya#endif 822af69d88dSmrg 823af69d88dSmrg/* command execution status */ 824af69d88dSmrg#define CL_COMPLETE 0x0 825af69d88dSmrg#define CL_RUNNING 0x1 826af69d88dSmrg#define CL_SUBMITTED 0x2 827af69d88dSmrg#define CL_QUEUED 0x3 828af69d88dSmrg 82953c12917Smaya#ifdef CL_VERSION_1_1 83053c12917Smaya 83153c12917Smaya/* cl_buffer_create_type */ 832af69d88dSmrg#define CL_BUFFER_CREATE_TYPE_REGION 0x1220 833af69d88dSmrg 83453c12917Smaya#endif 83553c12917Smaya 83653c12917Smaya/* cl_profiling_info */ 837af69d88dSmrg#define CL_PROFILING_COMMAND_QUEUED 0x1280 838af69d88dSmrg#define CL_PROFILING_COMMAND_SUBMIT 0x1281 839af69d88dSmrg#define CL_PROFILING_COMMAND_START 0x1282 840af69d88dSmrg#define CL_PROFILING_COMMAND_END 0x1283 84153c12917Smaya#ifdef CL_VERSION_2_0 84253c12917Smaya#define CL_PROFILING_COMMAND_COMPLETE 0x1284 84353c12917Smaya#endif 844af69d88dSmrg 845af69d88dSmrg/********************************************************************************************************/ 846af69d88dSmrg 847af69d88dSmrg/* Platform API */ 848af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 84953c12917SmayaclGetPlatformIDs(cl_uint num_entries, 85053c12917Smaya cl_platform_id * platforms, 85153c12917Smaya cl_uint * num_platforms) CL_API_SUFFIX__VERSION_1_0; 852af69d88dSmrg 85353c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 85453c12917SmayaclGetPlatformInfo(cl_platform_id platform, 85553c12917Smaya cl_platform_info param_name, 85653c12917Smaya size_t param_value_size, 85753c12917Smaya void * param_value, 85853c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; 859af69d88dSmrg 860af69d88dSmrg/* Device APIs */ 861af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 86253c12917SmayaclGetDeviceIDs(cl_platform_id platform, 86353c12917Smaya cl_device_type device_type, 86453c12917Smaya cl_uint num_entries, 86553c12917Smaya cl_device_id * devices, 86653c12917Smaya cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0; 86753c12917Smaya 86853c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 86953c12917SmayaclGetDeviceInfo(cl_device_id device, 87053c12917Smaya cl_device_info param_name, 87153c12917Smaya size_t param_value_size, 87253c12917Smaya void * param_value, 87353c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; 87453c12917Smaya 87553c12917Smaya#ifdef CL_VERSION_1_2 876af69d88dSmrg 877af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 87853c12917SmayaclCreateSubDevices(cl_device_id in_device, 87953c12917Smaya const cl_device_partition_property * properties, 88053c12917Smaya cl_uint num_devices, 88153c12917Smaya cl_device_id * out_devices, 88253c12917Smaya cl_uint * num_devices_ret) CL_API_SUFFIX__VERSION_1_2; 88353c12917Smaya 884af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 88553c12917SmayaclRetainDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2; 886af69d88dSmrg 887af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 88853c12917SmayaclReleaseDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2; 88953c12917Smaya 89053c12917Smaya#endif 89153c12917Smaya 89253c12917Smaya#ifdef CL_VERSION_2_1 89353c12917Smaya 89453c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 89553c12917SmayaclSetDefaultDeviceCommandQueue(cl_context context, 89653c12917Smaya cl_device_id device, 89753c12917Smaya cl_command_queue command_queue) CL_API_SUFFIX__VERSION_2_1; 89853c12917Smaya 899af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 90053c12917SmayaclGetDeviceAndHostTimer(cl_device_id device, 90153c12917Smaya cl_ulong* device_timestamp, 90253c12917Smaya cl_ulong* host_timestamp) CL_API_SUFFIX__VERSION_2_1; 90353c12917Smaya 90453c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 90553c12917SmayaclGetHostTimer(cl_device_id device, 90653c12917Smaya cl_ulong * host_timestamp) CL_API_SUFFIX__VERSION_2_1; 90753c12917Smaya 90853c12917Smaya#endif 90953c12917Smaya 91053c12917Smaya/* Context APIs */ 911af69d88dSmrgextern CL_API_ENTRY cl_context CL_API_CALL 91253c12917SmayaclCreateContext(const cl_context_properties * properties, 91353c12917Smaya cl_uint num_devices, 91453c12917Smaya const cl_device_id * devices, 91553c12917Smaya void (CL_CALLBACK * pfn_notify)(const char * errinfo, 91653c12917Smaya const void * private_info, 91753c12917Smaya size_t cb, 91853c12917Smaya void * user_data), 91953c12917Smaya void * user_data, 92053c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; 921af69d88dSmrg 922af69d88dSmrgextern CL_API_ENTRY cl_context CL_API_CALL 92353c12917SmayaclCreateContextFromType(const cl_context_properties * properties, 92453c12917Smaya cl_device_type device_type, 92553c12917Smaya void (CL_CALLBACK * pfn_notify)(const char * errinfo, 92653c12917Smaya const void * private_info, 92753c12917Smaya size_t cb, 92853c12917Smaya void * user_data), 92953c12917Smaya void * user_data, 93053c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; 931af69d88dSmrg 932af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 93353c12917SmayaclRetainContext(cl_context context) CL_API_SUFFIX__VERSION_1_0; 934af69d88dSmrg 935af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 93653c12917SmayaclReleaseContext(cl_context context) CL_API_SUFFIX__VERSION_1_0; 937af69d88dSmrg 938af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 93953c12917SmayaclGetContextInfo(cl_context context, 94053c12917Smaya cl_context_info param_name, 94153c12917Smaya size_t param_value_size, 94253c12917Smaya void * param_value, 94353c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; 944af69d88dSmrg 945af69d88dSmrg/* Command Queue APIs */ 94653c12917Smaya 94753c12917Smaya#ifdef CL_VERSION_2_0 94853c12917Smaya 949af69d88dSmrgextern CL_API_ENTRY cl_command_queue CL_API_CALL 95053c12917SmayaclCreateCommandQueueWithProperties(cl_context context, 95153c12917Smaya cl_device_id device, 95253c12917Smaya const cl_queue_properties * properties, 95353c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0; 95453c12917Smaya 95553c12917Smaya#endif 956af69d88dSmrg 957af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 95853c12917SmayaclRetainCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; 959af69d88dSmrg 960af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 96153c12917SmayaclReleaseCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; 962af69d88dSmrg 963af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 96453c12917SmayaclGetCommandQueueInfo(cl_command_queue command_queue, 96553c12917Smaya cl_command_queue_info param_name, 96653c12917Smaya size_t param_value_size, 96753c12917Smaya void * param_value, 96853c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; 969af69d88dSmrg 970af69d88dSmrg/* Memory Object APIs */ 971af69d88dSmrgextern CL_API_ENTRY cl_mem CL_API_CALL 97253c12917SmayaclCreateBuffer(cl_context context, 97353c12917Smaya cl_mem_flags flags, 97453c12917Smaya size_t size, 97553c12917Smaya void * host_ptr, 97653c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; 97753c12917Smaya 97853c12917Smaya#ifdef CL_VERSION_1_1 979af69d88dSmrg 980af69d88dSmrgextern CL_API_ENTRY cl_mem CL_API_CALL 98153c12917SmayaclCreateSubBuffer(cl_mem buffer, 98253c12917Smaya cl_mem_flags flags, 98353c12917Smaya cl_buffer_create_type buffer_create_type, 98453c12917Smaya const void * buffer_create_info, 98553c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1; 98653c12917Smaya 98753c12917Smaya#endif 98853c12917Smaya 98953c12917Smaya#ifdef CL_VERSION_1_2 99053c12917Smaya 99153c12917Smayaextern CL_API_ENTRY cl_mem CL_API_CALL 99253c12917SmayaclCreateImage(cl_context context, 99353c12917Smaya cl_mem_flags flags, 99453c12917Smaya const cl_image_format * image_format, 99553c12917Smaya const cl_image_desc * image_desc, 99653c12917Smaya void * host_ptr, 99753c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; 99853c12917Smaya 99953c12917Smaya#endif 100053c12917Smaya 100153c12917Smaya#ifdef CL_VERSION_2_0 1002af69d88dSmrg 1003af69d88dSmrgextern CL_API_ENTRY cl_mem CL_API_CALL 100453c12917SmayaclCreatePipe(cl_context context, 100553c12917Smaya cl_mem_flags flags, 100653c12917Smaya cl_uint pipe_packet_size, 100753c12917Smaya cl_uint pipe_max_packets, 100853c12917Smaya const cl_pipe_properties * properties, 100953c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0; 101053c12917Smaya 101153c12917Smaya#endif 101253c12917Smaya 1013af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 101453c12917SmayaclRetainMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0; 1015af69d88dSmrg 1016af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 101753c12917SmayaclReleaseMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0; 1018af69d88dSmrg 1019af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 102053c12917SmayaclGetSupportedImageFormats(cl_context context, 102153c12917Smaya cl_mem_flags flags, 102253c12917Smaya cl_mem_object_type image_type, 102353c12917Smaya cl_uint num_entries, 102453c12917Smaya cl_image_format * image_formats, 102553c12917Smaya cl_uint * num_image_formats) CL_API_SUFFIX__VERSION_1_0; 102653c12917Smaya 1027af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 102853c12917SmayaclGetMemObjectInfo(cl_mem memobj, 102953c12917Smaya cl_mem_info param_name, 103053c12917Smaya size_t param_value_size, 103153c12917Smaya void * param_value, 103253c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; 1033af69d88dSmrg 1034af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 103553c12917SmayaclGetImageInfo(cl_mem image, 103653c12917Smaya cl_image_info param_name, 103753c12917Smaya size_t param_value_size, 103853c12917Smaya void * param_value, 103953c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; 104053c12917Smaya 104153c12917Smaya#ifdef CL_VERSION_2_0 1042af69d88dSmrg 1043af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 104453c12917SmayaclGetPipeInfo(cl_mem pipe, 104553c12917Smaya cl_pipe_info param_name, 104653c12917Smaya size_t param_value_size, 104753c12917Smaya void * param_value, 104853c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_2_0; 104953c12917Smaya 105053c12917Smaya#endif 105153c12917Smaya 105253c12917Smaya#ifdef CL_VERSION_1_1 105353c12917Smaya 105453c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 105553c12917SmayaclSetMemObjectDestructorCallback(cl_mem memobj, 105653c12917Smaya void (CL_CALLBACK * pfn_notify)(cl_mem memobj, 105753c12917Smaya void * user_data), 105853c12917Smaya void * user_data) CL_API_SUFFIX__VERSION_1_1; 105953c12917Smaya 106053c12917Smaya#endif 106153c12917Smaya 106253c12917Smaya/* SVM Allocation APIs */ 106353c12917Smaya 106453c12917Smaya#ifdef CL_VERSION_2_0 106553c12917Smaya 106653c12917Smayaextern CL_API_ENTRY void * CL_API_CALL 106753c12917SmayaclSVMAlloc(cl_context context, 106853c12917Smaya cl_svm_mem_flags flags, 106953c12917Smaya size_t size, 107053c12917Smaya cl_uint alignment) CL_API_SUFFIX__VERSION_2_0; 107153c12917Smaya 107253c12917Smayaextern CL_API_ENTRY void CL_API_CALL 107353c12917SmayaclSVMFree(cl_context context, 107453c12917Smaya void * svm_pointer) CL_API_SUFFIX__VERSION_2_0; 107553c12917Smaya 107653c12917Smaya#endif 1077af69d88dSmrg 1078af69d88dSmrg/* Sampler APIs */ 107953c12917Smaya 108053c12917Smaya#ifdef CL_VERSION_2_0 108153c12917Smaya 1082af69d88dSmrgextern CL_API_ENTRY cl_sampler CL_API_CALL 108353c12917SmayaclCreateSamplerWithProperties(cl_context context, 108453c12917Smaya const cl_sampler_properties * sampler_properties, 108553c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0; 108653c12917Smaya 108753c12917Smaya#endif 1088af69d88dSmrg 1089af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 109053c12917SmayaclRetainSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0; 1091af69d88dSmrg 1092af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 109353c12917SmayaclReleaseSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0; 1094af69d88dSmrg 1095af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 109653c12917SmayaclGetSamplerInfo(cl_sampler sampler, 109753c12917Smaya cl_sampler_info param_name, 109853c12917Smaya size_t param_value_size, 109953c12917Smaya void * param_value, 110053c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; 110153c12917Smaya 110253c12917Smaya/* Program Object APIs */ 1103af69d88dSmrgextern CL_API_ENTRY cl_program CL_API_CALL 110453c12917SmayaclCreateProgramWithSource(cl_context context, 110553c12917Smaya cl_uint count, 110653c12917Smaya const char ** strings, 110753c12917Smaya const size_t * lengths, 110853c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; 1109af69d88dSmrg 1110af69d88dSmrgextern CL_API_ENTRY cl_program CL_API_CALL 111153c12917SmayaclCreateProgramWithBinary(cl_context context, 111253c12917Smaya cl_uint num_devices, 111353c12917Smaya const cl_device_id * device_list, 111453c12917Smaya const size_t * lengths, 111553c12917Smaya const unsigned char ** binaries, 111653c12917Smaya cl_int * binary_status, 111753c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; 111853c12917Smaya 111953c12917Smaya#ifdef CL_VERSION_1_2 1120af69d88dSmrg 1121af69d88dSmrgextern CL_API_ENTRY cl_program CL_API_CALL 112253c12917SmayaclCreateProgramWithBuiltInKernels(cl_context context, 112353c12917Smaya cl_uint num_devices, 112453c12917Smaya const cl_device_id * device_list, 112553c12917Smaya const char * kernel_names, 112653c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; 112753c12917Smaya 112853c12917Smaya#endif 112953c12917Smaya 113053c12917Smaya#ifdef CL_VERSION_2_1 113153c12917Smaya 113253c12917Smayaextern CL_API_ENTRY cl_program CL_API_CALL 113353c12917SmayaclCreateProgramWithIL(cl_context context, 113453c12917Smaya const void* il, 113553c12917Smaya size_t length, 113653c12917Smaya cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_1; 113753c12917Smaya 113853c12917Smaya#endif 1139af69d88dSmrg 1140af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 114153c12917SmayaclRetainProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0; 1142af69d88dSmrg 1143af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 114453c12917SmayaclReleaseProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0; 1145af69d88dSmrg 1146af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 114753c12917SmayaclBuildProgram(cl_program program, 114853c12917Smaya cl_uint num_devices, 114953c12917Smaya const cl_device_id * device_list, 115053c12917Smaya const char * options, 115153c12917Smaya void (CL_CALLBACK * pfn_notify)(cl_program program, 115253c12917Smaya void * user_data), 115353c12917Smaya void * user_data) CL_API_SUFFIX__VERSION_1_0; 115453c12917Smaya 115553c12917Smaya#ifdef CL_VERSION_1_2 1156af69d88dSmrg 1157af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 115853c12917SmayaclCompileProgram(cl_program program, 115953c12917Smaya cl_uint num_devices, 116053c12917Smaya const cl_device_id * device_list, 116153c12917Smaya const char * options, 116253c12917Smaya cl_uint num_input_headers, 116353c12917Smaya const cl_program * input_headers, 116453c12917Smaya const char ** header_include_names, 116553c12917Smaya void (CL_CALLBACK * pfn_notify)(cl_program program, 116653c12917Smaya void * user_data), 116753c12917Smaya void * user_data) CL_API_SUFFIX__VERSION_1_2; 1168af69d88dSmrg 1169af69d88dSmrgextern CL_API_ENTRY cl_program CL_API_CALL 117053c12917SmayaclLinkProgram(cl_context context, 117153c12917Smaya cl_uint num_devices, 117253c12917Smaya const cl_device_id * device_list, 117353c12917Smaya const char * options, 117453c12917Smaya cl_uint num_input_programs, 117553c12917Smaya const cl_program * input_programs, 117653c12917Smaya void (CL_CALLBACK * pfn_notify)(cl_program program, 117753c12917Smaya void * user_data), 117853c12917Smaya void * user_data, 117953c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; 118053c12917Smaya 118153c12917Smaya#endif 118253c12917Smaya 118353c12917Smaya#ifdef CL_VERSION_2_2 118453c12917Smaya 118553c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 118653c12917SmayaclSetProgramReleaseCallback(cl_program program, 118753c12917Smaya void (CL_CALLBACK * pfn_notify)(cl_program program, 118853c12917Smaya void * user_data), 118953c12917Smaya void * user_data) CL_API_SUFFIX__VERSION_2_2; 119053c12917Smaya 119153c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 119253c12917SmayaclSetProgramSpecializationConstant(cl_program program, 119353c12917Smaya cl_uint spec_id, 119453c12917Smaya size_t spec_size, 119553c12917Smaya const void* spec_value) CL_API_SUFFIX__VERSION_2_2; 119653c12917Smaya 119753c12917Smaya#endif 1198af69d88dSmrg 119953c12917Smaya#ifdef CL_VERSION_1_2 1200af69d88dSmrg 1201af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 120253c12917SmayaclUnloadPlatformCompiler(cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2; 120353c12917Smaya 120453c12917Smaya#endif 1205af69d88dSmrg 1206af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 120753c12917SmayaclGetProgramInfo(cl_program program, 120853c12917Smaya cl_program_info param_name, 120953c12917Smaya size_t param_value_size, 121053c12917Smaya void * param_value, 121153c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; 1212af69d88dSmrg 1213af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 121453c12917SmayaclGetProgramBuildInfo(cl_program program, 121553c12917Smaya cl_device_id device, 121653c12917Smaya cl_program_build_info param_name, 121753c12917Smaya size_t param_value_size, 121853c12917Smaya void * param_value, 121953c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; 122053c12917Smaya 1221af69d88dSmrg/* Kernel Object APIs */ 1222af69d88dSmrgextern CL_API_ENTRY cl_kernel CL_API_CALL 122353c12917SmayaclCreateKernel(cl_program program, 122453c12917Smaya const char * kernel_name, 122553c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; 1226af69d88dSmrg 1227af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 122853c12917SmayaclCreateKernelsInProgram(cl_program program, 122953c12917Smaya cl_uint num_kernels, 123053c12917Smaya cl_kernel * kernels, 123153c12917Smaya cl_uint * num_kernels_ret) CL_API_SUFFIX__VERSION_1_0; 123253c12917Smaya 123353c12917Smaya#ifdef CL_VERSION_2_1 123453c12917Smaya 123553c12917Smayaextern CL_API_ENTRY cl_kernel CL_API_CALL 123653c12917SmayaclCloneKernel(cl_kernel source_kernel, 123753c12917Smaya cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_1; 123853c12917Smaya 123953c12917Smaya#endif 1240af69d88dSmrg 1241af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 124253c12917SmayaclRetainKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0; 1243af69d88dSmrg 1244af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 124553c12917SmayaclReleaseKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0; 1246af69d88dSmrg 1247af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 124853c12917SmayaclSetKernelArg(cl_kernel kernel, 124953c12917Smaya cl_uint arg_index, 125053c12917Smaya size_t arg_size, 125153c12917Smaya const void * arg_value) CL_API_SUFFIX__VERSION_1_0; 125253c12917Smaya 125353c12917Smaya#ifdef CL_VERSION_2_0 1254af69d88dSmrg 1255af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 125653c12917SmayaclSetKernelArgSVMPointer(cl_kernel kernel, 125753c12917Smaya cl_uint arg_index, 125853c12917Smaya const void * arg_value) CL_API_SUFFIX__VERSION_2_0; 1259af69d88dSmrg 1260af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 126153c12917SmayaclSetKernelExecInfo(cl_kernel kernel, 126253c12917Smaya cl_kernel_exec_info param_name, 126353c12917Smaya size_t param_value_size, 126453c12917Smaya const void * param_value) CL_API_SUFFIX__VERSION_2_0; 126553c12917Smaya 126653c12917Smaya#endif 126753c12917Smaya 126853c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 126953c12917SmayaclGetKernelInfo(cl_kernel kernel, 127053c12917Smaya cl_kernel_info param_name, 127153c12917Smaya size_t param_value_size, 127253c12917Smaya void * param_value, 127353c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; 127453c12917Smaya 127553c12917Smaya#ifdef CL_VERSION_1_2 1276af69d88dSmrg 1277af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 127853c12917SmayaclGetKernelArgInfo(cl_kernel kernel, 127953c12917Smaya cl_uint arg_indx, 128053c12917Smaya cl_kernel_arg_info param_name, 128153c12917Smaya size_t param_value_size, 128253c12917Smaya void * param_value, 128353c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_2; 128453c12917Smaya 128553c12917Smaya#endif 128653c12917Smaya 128753c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 128853c12917SmayaclGetKernelWorkGroupInfo(cl_kernel kernel, 128953c12917Smaya cl_device_id device, 129053c12917Smaya cl_kernel_work_group_info param_name, 129153c12917Smaya size_t param_value_size, 129253c12917Smaya void * param_value, 129353c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; 129453c12917Smaya 129553c12917Smaya#ifdef CL_VERSION_2_1 129653c12917Smaya 129753c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 129853c12917SmayaclGetKernelSubGroupInfo(cl_kernel kernel, 129953c12917Smaya cl_device_id device, 130053c12917Smaya cl_kernel_sub_group_info param_name, 130153c12917Smaya size_t input_value_size, 130253c12917Smaya const void* input_value, 130353c12917Smaya size_t param_value_size, 130453c12917Smaya void* param_value, 130553c12917Smaya size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_2_1; 130653c12917Smaya 130753c12917Smaya#endif 1308af69d88dSmrg 1309af69d88dSmrg/* Event Object APIs */ 1310af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 131153c12917SmayaclWaitForEvents(cl_uint num_events, 131253c12917Smaya const cl_event * event_list) CL_API_SUFFIX__VERSION_1_0; 1313af69d88dSmrg 1314af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 131553c12917SmayaclGetEventInfo(cl_event event, 131653c12917Smaya cl_event_info param_name, 131753c12917Smaya size_t param_value_size, 131853c12917Smaya void * param_value, 131953c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; 132053c12917Smaya 132153c12917Smaya#ifdef CL_VERSION_1_1 132253c12917Smaya 1323af69d88dSmrgextern CL_API_ENTRY cl_event CL_API_CALL 132453c12917SmayaclCreateUserEvent(cl_context context, 132553c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1; 132653c12917Smaya 132753c12917Smaya#endif 132853c12917Smaya 1329af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 133053c12917SmayaclRetainEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0; 1331af69d88dSmrg 1332af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 133353c12917SmayaclReleaseEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0; 133453c12917Smaya 133553c12917Smaya#ifdef CL_VERSION_1_1 1336af69d88dSmrg 1337af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 133853c12917SmayaclSetUserEventStatus(cl_event event, 133953c12917Smaya cl_int execution_status) CL_API_SUFFIX__VERSION_1_1; 134053c12917Smaya 1341af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 134253c12917SmayaclSetEventCallback(cl_event event, 134353c12917Smaya cl_int command_exec_callback_type, 134453c12917Smaya void (CL_CALLBACK * pfn_notify)(cl_event event, 134553c12917Smaya cl_int event_command_status, 134653c12917Smaya void * user_data), 134753c12917Smaya void * user_data) CL_API_SUFFIX__VERSION_1_1; 134853c12917Smaya 134953c12917Smaya#endif 1350af69d88dSmrg 1351af69d88dSmrg/* Profiling APIs */ 1352af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 135353c12917SmayaclGetEventProfilingInfo(cl_event event, 135453c12917Smaya cl_profiling_info param_name, 135553c12917Smaya size_t param_value_size, 135653c12917Smaya void * param_value, 135753c12917Smaya size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; 135853c12917Smaya 1359af69d88dSmrg/* Flush and Finish APIs */ 1360af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 136153c12917SmayaclFlush(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; 1362af69d88dSmrg 1363af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 136453c12917SmayaclFinish(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; 1365af69d88dSmrg 1366af69d88dSmrg/* Enqueued Commands APIs */ 1367af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL 136853c12917SmayaclEnqueueReadBuffer(cl_command_queue command_queue, 136953c12917Smaya cl_mem buffer, 137053c12917Smaya cl_bool blocking_read, 137153c12917Smaya size_t offset, 137253c12917Smaya size_t size, 137353c12917Smaya void * ptr, 137453c12917Smaya cl_uint num_events_in_wait_list, 137553c12917Smaya const cl_event * event_wait_list, 137653c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_0; 137753c12917Smaya 137853c12917Smaya#ifdef CL_VERSION_1_1 137953c12917Smaya 138053c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 138153c12917SmayaclEnqueueReadBufferRect(cl_command_queue command_queue, 138253c12917Smaya cl_mem buffer, 138353c12917Smaya cl_bool blocking_read, 138453c12917Smaya const size_t * buffer_offset, 138553c12917Smaya const size_t * host_offset, 138653c12917Smaya const size_t * region, 138753c12917Smaya size_t buffer_row_pitch, 138853c12917Smaya size_t buffer_slice_pitch, 138953c12917Smaya size_t host_row_pitch, 139053c12917Smaya size_t host_slice_pitch, 139153c12917Smaya void * ptr, 139253c12917Smaya cl_uint num_events_in_wait_list, 139353c12917Smaya const cl_event * event_wait_list, 139453c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_1; 139553c12917Smaya 139653c12917Smaya#endif 139753c12917Smaya 139853c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 139953c12917SmayaclEnqueueWriteBuffer(cl_command_queue command_queue, 140053c12917Smaya cl_mem buffer, 140153c12917Smaya cl_bool blocking_write, 140253c12917Smaya size_t offset, 140353c12917Smaya size_t size, 140453c12917Smaya const void * ptr, 140553c12917Smaya cl_uint num_events_in_wait_list, 140653c12917Smaya const cl_event * event_wait_list, 140753c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_0; 140853c12917Smaya 140953c12917Smaya#ifdef CL_VERSION_1_1 141053c12917Smaya 141153c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 141253c12917SmayaclEnqueueWriteBufferRect(cl_command_queue command_queue, 141353c12917Smaya cl_mem buffer, 141453c12917Smaya cl_bool blocking_write, 141553c12917Smaya const size_t * buffer_offset, 141653c12917Smaya const size_t * host_offset, 141753c12917Smaya const size_t * region, 141853c12917Smaya size_t buffer_row_pitch, 141953c12917Smaya size_t buffer_slice_pitch, 142053c12917Smaya size_t host_row_pitch, 142153c12917Smaya size_t host_slice_pitch, 142253c12917Smaya const void * ptr, 142353c12917Smaya cl_uint num_events_in_wait_list, 142453c12917Smaya const cl_event * event_wait_list, 142553c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_1; 142653c12917Smaya 142753c12917Smaya#endif 142853c12917Smaya 142953c12917Smaya#ifdef CL_VERSION_1_2 143053c12917Smaya 143153c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 143253c12917SmayaclEnqueueFillBuffer(cl_command_queue command_queue, 143353c12917Smaya cl_mem buffer, 143453c12917Smaya const void * pattern, 143553c12917Smaya size_t pattern_size, 143653c12917Smaya size_t offset, 143753c12917Smaya size_t size, 143853c12917Smaya cl_uint num_events_in_wait_list, 143953c12917Smaya const cl_event * event_wait_list, 144053c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_2; 144153c12917Smaya 144253c12917Smaya#endif 144353c12917Smaya 144453c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 144553c12917SmayaclEnqueueCopyBuffer(cl_command_queue command_queue, 144653c12917Smaya cl_mem src_buffer, 144753c12917Smaya cl_mem dst_buffer, 144853c12917Smaya size_t src_offset, 144953c12917Smaya size_t dst_offset, 145053c12917Smaya size_t size, 145153c12917Smaya cl_uint num_events_in_wait_list, 145253c12917Smaya const cl_event * event_wait_list, 145353c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_0; 145453c12917Smaya 145553c12917Smaya#ifdef CL_VERSION_1_1 145653c12917Smaya 145753c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 145853c12917SmayaclEnqueueCopyBufferRect(cl_command_queue command_queue, 145953c12917Smaya cl_mem src_buffer, 146053c12917Smaya cl_mem dst_buffer, 146153c12917Smaya const size_t * src_origin, 146253c12917Smaya const size_t * dst_origin, 146353c12917Smaya const size_t * region, 146453c12917Smaya size_t src_row_pitch, 146553c12917Smaya size_t src_slice_pitch, 146653c12917Smaya size_t dst_row_pitch, 146753c12917Smaya size_t dst_slice_pitch, 146853c12917Smaya cl_uint num_events_in_wait_list, 146953c12917Smaya const cl_event * event_wait_list, 147053c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_1; 147153c12917Smaya 147253c12917Smaya#endif 147353c12917Smaya 147453c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 147553c12917SmayaclEnqueueReadImage(cl_command_queue command_queue, 147653c12917Smaya cl_mem image, 147753c12917Smaya cl_bool blocking_read, 147853c12917Smaya const size_t * origin, 147953c12917Smaya const size_t * region, 148053c12917Smaya size_t row_pitch, 148153c12917Smaya size_t slice_pitch, 148253c12917Smaya void * ptr, 148353c12917Smaya cl_uint num_events_in_wait_list, 148453c12917Smaya const cl_event * event_wait_list, 148553c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_0; 148653c12917Smaya 148753c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 148853c12917SmayaclEnqueueWriteImage(cl_command_queue command_queue, 148953c12917Smaya cl_mem image, 149053c12917Smaya cl_bool blocking_write, 149153c12917Smaya const size_t * origin, 149253c12917Smaya const size_t * region, 149353c12917Smaya size_t input_row_pitch, 149453c12917Smaya size_t input_slice_pitch, 149553c12917Smaya const void * ptr, 149653c12917Smaya cl_uint num_events_in_wait_list, 149753c12917Smaya const cl_event * event_wait_list, 149853c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_0; 149953c12917Smaya 150053c12917Smaya#ifdef CL_VERSION_1_2 150153c12917Smaya 150253c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 150353c12917SmayaclEnqueueFillImage(cl_command_queue command_queue, 150453c12917Smaya cl_mem image, 150553c12917Smaya const void * fill_color, 150653c12917Smaya const size_t * origin, 150753c12917Smaya const size_t * region, 150853c12917Smaya cl_uint num_events_in_wait_list, 150953c12917Smaya const cl_event * event_wait_list, 151053c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_2; 151153c12917Smaya 151253c12917Smaya#endif 151353c12917Smaya 151453c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 151553c12917SmayaclEnqueueCopyImage(cl_command_queue command_queue, 151653c12917Smaya cl_mem src_image, 151753c12917Smaya cl_mem dst_image, 151853c12917Smaya const size_t * src_origin, 151953c12917Smaya const size_t * dst_origin, 152053c12917Smaya const size_t * region, 152153c12917Smaya cl_uint num_events_in_wait_list, 152253c12917Smaya const cl_event * event_wait_list, 152353c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_0; 152453c12917Smaya 152553c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 152653c12917SmayaclEnqueueCopyImageToBuffer(cl_command_queue command_queue, 152753c12917Smaya cl_mem src_image, 152853c12917Smaya cl_mem dst_buffer, 152953c12917Smaya const size_t * src_origin, 153053c12917Smaya const size_t * region, 153153c12917Smaya size_t dst_offset, 153253c12917Smaya cl_uint num_events_in_wait_list, 153353c12917Smaya const cl_event * event_wait_list, 153453c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_0; 153553c12917Smaya 153653c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 153753c12917SmayaclEnqueueCopyBufferToImage(cl_command_queue command_queue, 153853c12917Smaya cl_mem src_buffer, 153953c12917Smaya cl_mem dst_image, 154053c12917Smaya size_t src_offset, 154153c12917Smaya const size_t * dst_origin, 154253c12917Smaya const size_t * region, 154353c12917Smaya cl_uint num_events_in_wait_list, 154453c12917Smaya const cl_event * event_wait_list, 154553c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_0; 1546af69d88dSmrg 1547af69d88dSmrgextern CL_API_ENTRY void * CL_API_CALL 154853c12917SmayaclEnqueueMapBuffer(cl_command_queue command_queue, 154953c12917Smaya cl_mem buffer, 155053c12917Smaya cl_bool blocking_map, 155153c12917Smaya cl_map_flags map_flags, 155253c12917Smaya size_t offset, 155353c12917Smaya size_t size, 155453c12917Smaya cl_uint num_events_in_wait_list, 155553c12917Smaya const cl_event * event_wait_list, 155653c12917Smaya cl_event * event, 155753c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; 1558af69d88dSmrg 1559af69d88dSmrgextern CL_API_ENTRY void * CL_API_CALL 156053c12917SmayaclEnqueueMapImage(cl_command_queue command_queue, 156153c12917Smaya cl_mem image, 156253c12917Smaya cl_bool blocking_map, 156353c12917Smaya cl_map_flags map_flags, 156453c12917Smaya const size_t * origin, 156553c12917Smaya const size_t * region, 156653c12917Smaya size_t * image_row_pitch, 156753c12917Smaya size_t * image_slice_pitch, 156853c12917Smaya cl_uint num_events_in_wait_list, 156953c12917Smaya const cl_event * event_wait_list, 157053c12917Smaya cl_event * event, 157153c12917Smaya cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; 157253c12917Smaya 157353c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 157453c12917SmayaclEnqueueUnmapMemObject(cl_command_queue command_queue, 157553c12917Smaya cl_mem memobj, 157653c12917Smaya void * mapped_ptr, 157753c12917Smaya cl_uint num_events_in_wait_list, 157853c12917Smaya const cl_event * event_wait_list, 157953c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_0; 158053c12917Smaya 158153c12917Smaya#ifdef CL_VERSION_1_2 158253c12917Smaya 158353c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 158453c12917SmayaclEnqueueMigrateMemObjects(cl_command_queue command_queue, 158553c12917Smaya cl_uint num_mem_objects, 158653c12917Smaya const cl_mem * mem_objects, 158753c12917Smaya cl_mem_migration_flags flags, 158853c12917Smaya cl_uint num_events_in_wait_list, 158953c12917Smaya const cl_event * event_wait_list, 159053c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_2; 159153c12917Smaya 159253c12917Smaya#endif 159353c12917Smaya 159453c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 159553c12917SmayaclEnqueueNDRangeKernel(cl_command_queue command_queue, 159653c12917Smaya cl_kernel kernel, 159753c12917Smaya cl_uint work_dim, 159853c12917Smaya const size_t * global_work_offset, 159953c12917Smaya const size_t * global_work_size, 160053c12917Smaya const size_t * local_work_size, 160153c12917Smaya cl_uint num_events_in_wait_list, 160253c12917Smaya const cl_event * event_wait_list, 160353c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_0; 160453c12917Smaya 160553c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 160653c12917SmayaclEnqueueNativeKernel(cl_command_queue command_queue, 160753c12917Smaya void (CL_CALLBACK * user_func)(void *), 160853c12917Smaya void * args, 160953c12917Smaya size_t cb_args, 161053c12917Smaya cl_uint num_mem_objects, 161153c12917Smaya const cl_mem * mem_list, 161253c12917Smaya const void ** args_mem_loc, 161353c12917Smaya cl_uint num_events_in_wait_list, 161453c12917Smaya const cl_event * event_wait_list, 161553c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_0; 161653c12917Smaya 161753c12917Smaya#ifdef CL_VERSION_1_2 161853c12917Smaya 161953c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 162053c12917SmayaclEnqueueMarkerWithWaitList(cl_command_queue command_queue, 162153c12917Smaya cl_uint num_events_in_wait_list, 162253c12917Smaya const cl_event * event_wait_list, 162353c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_2; 162453c12917Smaya 162553c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 162653c12917SmayaclEnqueueBarrierWithWaitList(cl_command_queue command_queue, 162753c12917Smaya cl_uint num_events_in_wait_list, 162853c12917Smaya const cl_event * event_wait_list, 162953c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_1_2; 163053c12917Smaya 163153c12917Smaya#endif 163253c12917Smaya 163353c12917Smaya#ifdef CL_VERSION_2_0 163453c12917Smaya 163553c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 163653c12917SmayaclEnqueueSVMFree(cl_command_queue command_queue, 163753c12917Smaya cl_uint num_svm_pointers, 163853c12917Smaya void * svm_pointers[], 163953c12917Smaya void (CL_CALLBACK * pfn_free_func)(cl_command_queue queue, 164053c12917Smaya cl_uint num_svm_pointers, 164153c12917Smaya void * svm_pointers[], 164253c12917Smaya void * user_data), 164353c12917Smaya void * user_data, 164453c12917Smaya cl_uint num_events_in_wait_list, 164553c12917Smaya const cl_event * event_wait_list, 164653c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_2_0; 164753c12917Smaya 164853c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 164953c12917SmayaclEnqueueSVMMemcpy(cl_command_queue command_queue, 165053c12917Smaya cl_bool blocking_copy, 165153c12917Smaya void * dst_ptr, 165253c12917Smaya const void * src_ptr, 165353c12917Smaya size_t size, 165453c12917Smaya cl_uint num_events_in_wait_list, 165553c12917Smaya const cl_event * event_wait_list, 165653c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_2_0; 165753c12917Smaya 165853c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 165953c12917SmayaclEnqueueSVMMemFill(cl_command_queue command_queue, 166053c12917Smaya void * svm_ptr, 166153c12917Smaya const void * pattern, 166253c12917Smaya size_t pattern_size, 166353c12917Smaya size_t size, 166453c12917Smaya cl_uint num_events_in_wait_list, 166553c12917Smaya const cl_event * event_wait_list, 166653c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_2_0; 166753c12917Smaya 166853c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 166953c12917SmayaclEnqueueSVMMap(cl_command_queue command_queue, 167053c12917Smaya cl_bool blocking_map, 167153c12917Smaya cl_map_flags flags, 167253c12917Smaya void * svm_ptr, 167353c12917Smaya size_t size, 167453c12917Smaya cl_uint num_events_in_wait_list, 167553c12917Smaya const cl_event * event_wait_list, 167653c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_2_0; 167753c12917Smaya 167853c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 167953c12917SmayaclEnqueueSVMUnmap(cl_command_queue command_queue, 168053c12917Smaya void * svm_ptr, 168153c12917Smaya cl_uint num_events_in_wait_list, 168253c12917Smaya const cl_event * event_wait_list, 168353c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_2_0; 1684af69d88dSmrg 168553c12917Smaya#endif 168653c12917Smaya 168753c12917Smaya#ifdef CL_VERSION_2_1 168853c12917Smaya 168953c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL 169053c12917SmayaclEnqueueSVMMigrateMem(cl_command_queue command_queue, 169153c12917Smaya cl_uint num_svm_pointers, 169253c12917Smaya const void ** svm_pointers, 169353c12917Smaya const size_t * sizes, 169453c12917Smaya cl_mem_migration_flags flags, 169553c12917Smaya cl_uint num_events_in_wait_list, 169653c12917Smaya const cl_event * event_wait_list, 169753c12917Smaya cl_event * event) CL_API_SUFFIX__VERSION_2_1; 169853c12917Smaya 169953c12917Smaya#endif 170053c12917Smaya 170153c12917Smaya#ifdef CL_VERSION_1_2 1702af69d88dSmrg 1703af69d88dSmrg/* Extension function access 1704af69d88dSmrg * 1705af69d88dSmrg * Returns the extension function address for the given function name, 1706af69d88dSmrg * or NULL if a valid function can not be found. The client must 170753c12917Smaya * check to make sure the address is not NULL, before using or 1708af69d88dSmrg * calling the returned function address. 1709af69d88dSmrg */ 171053c12917Smayaextern CL_API_ENTRY void * CL_API_CALL 171153c12917SmayaclGetExtensionFunctionAddressForPlatform(cl_platform_id platform, 171253c12917Smaya const char * func_name) CL_API_SUFFIX__VERSION_1_2; 171353c12917Smaya 171453c12917Smaya#endif 171553c12917Smaya 171653c12917Smaya#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS 171753c12917Smaya /* 171853c12917Smaya * WARNING: 171953c12917Smaya * This API introduces mutable state into the OpenCL implementation. It has been REMOVED 172053c12917Smaya * to better facilitate thread safety. The 1.0 API is not thread safe. It is not tested by the 172153c12917Smaya * OpenCL 1.1 conformance test, and consequently may not work or may not work dependably. 172253c12917Smaya * It is likely to be non-performant. Use of this API is not advised. Use at your own risk. 172353c12917Smaya * 172453c12917Smaya * Software developers previously relying on this API are instructed to set the command queue 172553c12917Smaya * properties when creating the queue, instead. 172653c12917Smaya */ 172753c12917Smaya extern CL_API_ENTRY cl_int CL_API_CALL 172853c12917Smaya clSetCommandQueueProperty(cl_command_queue command_queue, 172953c12917Smaya cl_command_queue_properties properties, 173053c12917Smaya cl_bool enable, 173153c12917Smaya cl_command_queue_properties * old_properties) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED; 173253c12917Smaya#endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */ 1733af69d88dSmrg 1734af69d88dSmrg/* Deprecated OpenCL 1.1 APIs */ 1735af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL 173653c12917SmayaclCreateImage2D(cl_context context, 173753c12917Smaya cl_mem_flags flags, 173853c12917Smaya const cl_image_format * image_format, 173953c12917Smaya size_t image_width, 174053c12917Smaya size_t image_height, 174153c12917Smaya size_t image_row_pitch, 174253c12917Smaya void * host_ptr, 174353c12917Smaya cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 174453c12917Smaya 1745af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL 174653c12917SmayaclCreateImage3D(cl_context context, 174753c12917Smaya cl_mem_flags flags, 174853c12917Smaya const cl_image_format * image_format, 174953c12917Smaya size_t image_width, 175053c12917Smaya size_t image_height, 175153c12917Smaya size_t image_depth, 175253c12917Smaya size_t image_row_pitch, 175353c12917Smaya size_t image_slice_pitch, 175453c12917Smaya void * host_ptr, 175553c12917Smaya cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 175653c12917Smaya 1757af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL 175853c12917SmayaclEnqueueMarker(cl_command_queue command_queue, 175953c12917Smaya cl_event * event) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 176053c12917Smaya 1761af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL 176253c12917SmayaclEnqueueWaitForEvents(cl_command_queue command_queue, 176353c12917Smaya cl_uint num_events, 176453c12917Smaya const cl_event * event_list) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 176553c12917Smaya 1766af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL 176753c12917SmayaclEnqueueBarrier(cl_command_queue command_queue) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 1768af69d88dSmrg 1769af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL 1770af69d88dSmrgclUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 177153c12917Smaya 1772af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL 177353c12917SmayaclGetExtensionFunctionAddress(const char * func_name) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; 177453c12917Smaya 177553c12917Smaya/* Deprecated OpenCL 2.0 APIs */ 177653c12917Smayaextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL 177753c12917SmayaclCreateCommandQueue(cl_context context, 177853c12917Smaya cl_device_id device, 177953c12917Smaya cl_command_queue_properties properties, 178053c12917Smaya cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED; 178153c12917Smaya 178253c12917Smayaextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL 178353c12917SmayaclCreateSampler(cl_context context, 178453c12917Smaya cl_bool normalized_coords, 178553c12917Smaya cl_addressing_mode addressing_mode, 178653c12917Smaya cl_filter_mode filter_mode, 178753c12917Smaya cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED; 178853c12917Smaya 178953c12917Smayaextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL 179053c12917SmayaclEnqueueTask(cl_command_queue command_queue, 179153c12917Smaya cl_kernel kernel, 179253c12917Smaya cl_uint num_events_in_wait_list, 179353c12917Smaya const cl_event * event_wait_list, 179453c12917Smaya cl_event * event) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED; 1795af69d88dSmrg 1796af69d88dSmrg#ifdef __cplusplus 1797af69d88dSmrg} 1798af69d88dSmrg#endif 1799af69d88dSmrg 1800af69d88dSmrg#endif /* __OPENCL_CL_H */ 1801