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