Blender V2.61 - r43446
|
00001 00002 // Copyright (c) 2009 Organic Vectory B.V. 00003 // Written by George van Venrooij 00004 // 00005 // Distributed under the Boost Software License, Version 1.0. 00006 // (See accompanying file doc/license/Boost.txt) 00007 // Extracted from the CLCC project - http://clcc.sourceforge.net/ 00009 00010 #ifndef __UTIL_OPENCL_H__ 00011 #define __UTIL_OPENCL_H__ 00012 00013 CCL_NAMESPACE_BEGIN 00014 00021 00022 // Run-time dynamic linking functionality based on concepts used in GLEW 00023 #ifdef __OPENCL_CL_H 00024 #error cl.h included before clew.h 00025 #endif 00026 00027 #ifdef __OPENCL_CL_PLATFORM_H 00028 #error cl_platform.h included before clew.h 00029 #endif 00030 00031 #ifndef CLCC_GENERATE_DOCUMENTATION 00032 // Prevent cl.h inclusion 00033 #define __OPENCL_CL_H 00034 // Prevent cl_platform.h inclusion 00035 #define __CL_PLATFORM_H 00036 #endif // CLCC_GENERATE_DOCUMENTATION 00037 00038 /******************************************************************************* 00039 * Copyright (c) 2008-2009 The Khronos Group Inc. 00040 * 00041 * Permission is hereby granted, free of charge, to any person obtaining a 00042 * copy of this software and/or associated documentation files (the 00043 * "Materials"), to deal in the Materials without restriction, including 00044 * without limitation the rights to use, copy, modify, merge, publish, 00045 * distribute, sublicense, and/or sell copies of the Materials, and to 00046 * permit persons to whom the Materials are furnished to do so, subject to 00047 * the following conditions: 00048 * 00049 * The above copyright notice and this permission notice shall be included 00050 * in all copies or substantial portions of the Materials. 00051 * 00052 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00053 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00054 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00055 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 00056 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 00057 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 00058 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 00059 ******************************************************************************/ 00060 00061 #ifndef CLCC_GENERATE_DOCUMENTATION 00062 00063 #if defined(_WIN32) 00064 #define CL_API_ENTRY 00065 #define CL_API_CALL __stdcall 00066 #else 00067 #define CL_API_ENTRY 00068 #define CL_API_CALL 00069 #endif 00070 00071 #define CL_API_SUFFIX__VERSION_1_0 00072 00073 #if defined(_WIN32) && defined(_MSC_VER) 00074 00075 /* scalar types */ 00076 typedef signed __int8 cl_char; 00077 typedef unsigned __int8 cl_uchar; 00078 typedef signed __int16 cl_short; 00079 typedef unsigned __int16 cl_ushort; 00080 typedef signed __int32 cl_int; 00081 typedef unsigned __int32 cl_uint; 00082 typedef signed __int64 cl_long; 00083 typedef unsigned __int64 cl_ulong; 00084 00085 typedef unsigned __int16 cl_half; 00086 typedef float cl_float; 00087 typedef double cl_double; 00088 00089 00090 /* 00091 * Vector types 00092 * 00093 * Note: OpenCL requires that all types be naturally aligned. 00094 * This means that vector types must be naturally aligned. 00095 * For example, a vector of four floats must be aligned to 00096 * a 16 byte boundary (calculated as 4 * the natural 4-byte 00097 * alignment of the float). The alignment qualifiers here 00098 * will only function properly if your compiler supports them 00099 * and if you don't actively work to defeat them. For example, 00100 * in order for a cl_float4 to be 16 byte aligned in a struct, 00101 * the start of the struct must itself be 16-byte aligned. 00102 * 00103 * Maintaining proper alignment is the user's responsibility. 00104 */ 00105 typedef signed __int8 cl_char2[2]; 00106 typedef signed __int8 cl_char4[4]; 00107 typedef signed __int8 cl_char8[8]; 00108 typedef signed __int8 cl_char16[16]; 00109 typedef unsigned __int8 cl_uchar2[2]; 00110 typedef unsigned __int8 cl_uchar4[4]; 00111 typedef unsigned __int8 cl_uchar8[8]; 00112 typedef unsigned __int8 cl_uchar16[16]; 00113 00114 typedef signed __int16 cl_short2[2]; 00115 typedef signed __int16 cl_short4[4]; 00116 typedef signed __int16 cl_short8[8]; 00117 typedef signed __int16 cl_short16[16]; 00118 typedef unsigned __int16 cl_ushort2[2]; 00119 typedef unsigned __int16 cl_ushort4[4]; 00120 typedef unsigned __int16 cl_ushort8[8]; 00121 typedef unsigned __int16 cl_ushort16[16]; 00122 00123 typedef signed __int32 cl_int2[2]; 00124 typedef signed __int32 cl_int4[4]; 00125 typedef signed __int32 cl_int8[8]; 00126 typedef signed __int32 cl_int16[16]; 00127 typedef unsigned __int32 cl_uint2[2]; 00128 typedef unsigned __int32 cl_uint4[4]; 00129 typedef unsigned __int32 cl_uint8[8]; 00130 typedef unsigned __int32 cl_uint16[16]; 00131 00132 typedef signed __int64 cl_long2[2]; 00133 typedef signed __int64 cl_long4[4]; 00134 typedef signed __int64 cl_long8[8]; 00135 typedef signed __int64 cl_long16[16]; 00136 typedef unsigned __int64 cl_ulong2[2]; 00137 typedef unsigned __int64 cl_ulong4[4]; 00138 typedef unsigned __int64 cl_ulong8[8]; 00139 typedef unsigned __int64 cl_ulong16[16]; 00140 00141 typedef float cl_float2[2]; 00142 typedef float cl_float4[4]; 00143 typedef float cl_float8[8]; 00144 typedef float cl_float16[16]; 00145 00146 typedef double cl_double2[2]; 00147 typedef double cl_double4[4]; 00148 typedef double cl_double8[8]; 00149 typedef double cl_double16[16]; 00150 /* There are no vector types for half */ 00151 00152 #else 00153 00154 #include <stdint.h> 00155 00156 /* scalar types */ 00157 typedef int8_t cl_char; 00158 typedef uint8_t cl_uchar; 00159 typedef int16_t cl_short __attribute__((aligned(2))); 00160 typedef uint16_t cl_ushort __attribute__((aligned(2))); 00161 typedef int32_t cl_int __attribute__((aligned(4))); 00162 typedef uint32_t cl_uint __attribute__((aligned(4))); 00163 typedef int64_t cl_long __attribute__((aligned(8))); 00164 typedef uint64_t cl_ulong __attribute__((aligned(8))); 00165 00166 typedef uint16_t cl_half __attribute__((aligned(2))); 00167 typedef float cl_float __attribute__((aligned(4))); 00168 typedef double cl_double __attribute__((aligned(8))); 00169 00170 /* 00171 * Vector types 00172 * 00173 * Note: OpenCL requires that all types be naturally aligned. 00174 * This means that vector types must be naturally aligned. 00175 * For example, a vector of four floats must be aligned to 00176 * a 16 byte boundary (calculated as 4 * the natural 4-byte 00177 * alignment of the float). The alignment qualifiers here 00178 * will only function properly if your compiler supports them 00179 * and if you don't actively work to defeat them. For example, 00180 * in order for a cl_float4 to be 16 byte aligned in a struct, 00181 * the start of the struct must itself be 16-byte aligned. 00182 * 00183 * Maintaining proper alignment is the user's responsibility. 00184 */ 00185 typedef int8_t cl_char2[2] __attribute__((aligned(2))); 00186 typedef int8_t cl_char4[4] __attribute__((aligned(4))); 00187 typedef int8_t cl_char8[8] __attribute__((aligned(8))); 00188 typedef int8_t cl_char16[16] __attribute__((aligned(16))); 00189 typedef uint8_t cl_uchar2[2] __attribute__((aligned(2))); 00190 typedef uint8_t cl_uchar4[4] __attribute__((aligned(4))); 00191 typedef uint8_t cl_uchar8[8] __attribute__((aligned(8))); 00192 typedef uint8_t cl_uchar16[16] __attribute__((aligned(16))); 00193 00194 typedef int16_t cl_short2[2] __attribute__((aligned(4))); 00195 typedef int16_t cl_short4[4] __attribute__((aligned(8))); 00196 typedef int16_t cl_short8[8] __attribute__((aligned(16))); 00197 typedef int16_t cl_short16[16] __attribute__((aligned(32))); 00198 typedef uint16_t cl_ushort2[2] __attribute__((aligned(4))); 00199 typedef uint16_t cl_ushort4[4] __attribute__((aligned(8))); 00200 typedef uint16_t cl_ushort8[8] __attribute__((aligned(16))); 00201 typedef uint16_t cl_ushort16[16] __attribute__((aligned(32))); 00202 00203 typedef int32_t cl_int2[2] __attribute__((aligned(8))); 00204 typedef int32_t cl_int4[4] __attribute__((aligned(16))); 00205 typedef int32_t cl_int8[8] __attribute__((aligned(32))); 00206 typedef int32_t cl_int16[16] __attribute__((aligned(64))); 00207 typedef uint32_t cl_uint2[2] __attribute__((aligned(8))); 00208 typedef uint32_t cl_uint4[4] __attribute__((aligned(16))); 00209 typedef uint32_t cl_uint8[8] __attribute__((aligned(32))); 00210 typedef uint32_t cl_uint16[16] __attribute__((aligned(64))); 00211 00212 typedef int64_t cl_long2[2] __attribute__((aligned(16))); 00213 typedef int64_t cl_long4[4] __attribute__((aligned(32))); 00214 typedef int64_t cl_long8[8] __attribute__((aligned(64))); 00215 typedef int64_t cl_long16[16] __attribute__((aligned(128))); 00216 typedef uint64_t cl_ulong2[2] __attribute__((aligned(16))); 00217 typedef uint64_t cl_ulong4[4] __attribute__((aligned(32))); 00218 typedef uint64_t cl_ulong8[8] __attribute__((aligned(64))); 00219 typedef uint64_t cl_ulong16[16] __attribute__((aligned(128))); 00220 00221 typedef float cl_float2[2] __attribute__((aligned(8))); 00222 typedef float cl_float4[4] __attribute__((aligned(16))); 00223 typedef float cl_float8[8] __attribute__((aligned(32))); 00224 typedef float cl_float16[16] __attribute__((aligned(64))); 00225 00226 typedef double cl_double2[2] __attribute__((aligned(16))); 00227 typedef double cl_double4[4] __attribute__((aligned(32))); 00228 typedef double cl_double8[8] __attribute__((aligned(64))); 00229 typedef double cl_double16[16] __attribute__((aligned(128))); 00230 00231 /* There are no vector types for half */ 00232 00233 #endif 00234 00235 /******************************************************************************/ 00236 00237 // Macro names and corresponding values defined by OpenCL 00238 00239 #define CL_CHAR_BIT 8 00240 #define CL_SCHAR_MAX 127 00241 #define CL_SCHAR_MIN (-127-1) 00242 #define CL_CHAR_MAX CL_SCHAR_MAX 00243 #define CL_CHAR_MIN CL_SCHAR_MIN 00244 #define CL_UCHAR_MAX 255 00245 #define CL_SHRT_MAX 32767 00246 #define CL_SHRT_MIN (-32767-1) 00247 #define CL_USHRT_MAX 65535 00248 #define CL_INT_MAX 2147483647 00249 #define CL_INT_MIN (-2147483647-1) 00250 #define CL_UINT_MAX 0xffffffffU 00251 #define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL) 00252 #define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL) 00253 #define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL) 00254 00255 #define CL_FLT_DIG 6 00256 #define CL_FLT_MANT_DIG 24 00257 #define CL_FLT_MAX_10_EXP +38 00258 #define CL_FLT_MAX_EXP +128 00259 #define CL_FLT_MIN_10_EXP -37 00260 #define CL_FLT_MIN_EXP -125 00261 #define CL_FLT_RADIX 2 00262 #if defined(_MSC_VER) 00263 // MSVC doesn't understand hex floats 00264 #define CL_FLT_MAX 3.402823466e+38F 00265 #define CL_FLT_MIN 1.175494351e-38F 00266 #define CL_FLT_EPSILON 1.192092896e-07F 00267 #else 00268 #define CL_FLT_MAX 0x1.fffffep127f 00269 #define CL_FLT_MIN 0x1.0p-126f 00270 #define CL_FLT_EPSILON 0x1.0p-23f 00271 #endif 00272 00273 #define CL_DBL_DIG 15 00274 #define CL_DBL_MANT_DIG 53 00275 #define CL_DBL_MAX_10_EXP +308 00276 #define CL_DBL_MAX_EXP +1024 00277 #define CL_DBL_MIN_10_EXP -307 00278 #define CL_DBL_MIN_EXP -1021 00279 #define CL_DBL_RADIX 2 00280 #if defined(_MSC_VER) 00281 // MSVC doesn't understand hex floats 00282 #define CL_DBL_MAX 1.7976931348623158e+308 00283 #define CL_DBL_MIN 2.2250738585072014e-308 00284 #define CL_DBL_EPSILON 2.2204460492503131e-016 00285 #else 00286 #define CL_DBL_MAX 0x1.fffffffffffffp1023 00287 #define CL_DBL_MIN 0x1.0p-1022 00288 #define CL_DBL_EPSILON 0x1.0p-52 00289 #endif 00290 00291 #include <stddef.h> 00292 00293 00294 // CL.h contents 00295 /******************************************************************************/ 00296 00297 typedef struct _cl_platform_id * cl_platform_id; 00298 typedef struct _cl_device_id * cl_device_id; 00299 typedef struct _cl_context * cl_context; 00300 typedef struct _cl_command_queue * cl_command_queue; 00301 typedef struct _cl_mem * cl_mem; 00302 typedef struct _cl_program * cl_program; 00303 typedef struct _cl_kernel * cl_kernel; 00304 typedef struct _cl_event * cl_event; 00305 typedef struct _cl_sampler * cl_sampler; 00306 00307 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. */ 00308 typedef cl_ulong cl_bitfield; 00309 typedef cl_bitfield cl_device_type; 00310 typedef cl_uint cl_platform_info; 00311 typedef cl_uint cl_device_info; 00312 typedef cl_bitfield cl_device_address_info; 00313 typedef cl_bitfield cl_device_fp_config; 00314 typedef cl_uint cl_device_mem_cache_type; 00315 typedef cl_uint cl_device_local_mem_type; 00316 typedef cl_bitfield cl_device_exec_capabilities; 00317 typedef cl_bitfield cl_command_queue_properties; 00318 00319 typedef intptr_t cl_context_properties; 00320 typedef cl_uint cl_context_info; 00321 typedef cl_uint cl_command_queue_info; 00322 typedef cl_uint cl_channel_order; 00323 typedef cl_uint cl_channel_type; 00324 typedef cl_bitfield cl_mem_flags; 00325 typedef cl_uint cl_mem_object_type; 00326 typedef cl_uint cl_mem_info; 00327 typedef cl_uint cl_image_info; 00328 typedef cl_uint cl_addressing_mode; 00329 typedef cl_uint cl_filter_mode; 00330 typedef cl_uint cl_sampler_info; 00331 typedef cl_bitfield cl_map_flags; 00332 typedef cl_uint cl_program_info; 00333 typedef cl_uint cl_program_build_info; 00334 typedef cl_int cl_build_status; 00335 typedef cl_uint cl_kernel_info; 00336 typedef cl_uint cl_kernel_work_group_info; 00337 typedef cl_uint cl_event_info; 00338 typedef cl_uint cl_command_type; 00339 typedef cl_uint cl_profiling_info; 00340 00341 typedef struct _cl_image_format { 00342 cl_channel_order image_channel_order; 00343 cl_channel_type image_channel_data_type; 00344 } cl_image_format; 00345 00346 00347 00348 /******************************************************************************/ 00349 00350 // Error Codes 00351 #define CL_SUCCESS 0 00352 #define CL_DEVICE_NOT_FOUND -1 00353 #define CL_DEVICE_NOT_AVAILABLE -2 00354 #define CL_COMPILER_NOT_AVAILABLE -3 00355 #define CL_MEM_OBJECT_ALLOCATION_FAILURE -4 00356 #define CL_OUT_OF_RESOURCES -5 00357 #define CL_OUT_OF_HOST_MEMORY -6 00358 #define CL_PROFILING_INFO_NOT_AVAILABLE -7 00359 #define CL_MEM_COPY_OVERLAP -8 00360 #define CL_IMAGE_FORMAT_MISMATCH -9 00361 #define CL_IMAGE_FORMAT_NOT_SUPPORTED -10 00362 #define CL_BUILD_PROGRAM_FAILURE -11 00363 #define CL_MAP_FAILURE -12 00364 00365 #define CL_INVALID_VALUE -30 00366 #define CL_INVALID_DEVICE_TYPE -31 00367 #define CL_INVALID_PLATFORM -32 00368 #define CL_INVALID_DEVICE -33 00369 #define CL_INVALID_CONTEXT -34 00370 #define CL_INVALID_QUEUE_PROPERTIES -35 00371 #define CL_INVALID_COMMAND_QUEUE -36 00372 #define CL_INVALID_HOST_PTR -37 00373 #define CL_INVALID_MEM_OBJECT -38 00374 #define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39 00375 #define CL_INVALID_IMAGE_SIZE -40 00376 #define CL_INVALID_SAMPLER -41 00377 #define CL_INVALID_BINARY -42 00378 #define CL_INVALID_BUILD_OPTIONS -43 00379 #define CL_INVALID_PROGRAM -44 00380 #define CL_INVALID_PROGRAM_EXECUTABLE -45 00381 #define CL_INVALID_KERNEL_NAME -46 00382 #define CL_INVALID_KERNEL_DEFINITION -47 00383 #define CL_INVALID_KERNEL -48 00384 #define CL_INVALID_ARG_INDEX -49 00385 #define CL_INVALID_ARG_VALUE -50 00386 #define CL_INVALID_ARG_SIZE -51 00387 #define CL_INVALID_KERNEL_ARGS -52 00388 #define CL_INVALID_WORK_DIMENSION -53 00389 #define CL_INVALID_WORK_GROUP_SIZE -54 00390 #define CL_INVALID_WORK_ITEM_SIZE -55 00391 #define CL_INVALID_GLOBAL_OFFSET -56 00392 #define CL_INVALID_EVENT_WAIT_LIST -57 00393 #define CL_INVALID_EVENT -58 00394 #define CL_INVALID_OPERATION -59 00395 #define CL_INVALID_GL_OBJECT -60 00396 #define CL_INVALID_BUFFER_SIZE -61 00397 #define CL_INVALID_MIP_LEVEL -62 00398 #define CL_INVALID_GLOBAL_WORK_SIZE -63 00399 00400 // OpenCL Version 00401 #define CL_VERSION_1_0 1 00402 00403 // cl_bool 00404 #define CL_FALSE 0 00405 #define CL_TRUE 1 00406 00407 // cl_platform_info 00408 #define CL_PLATFORM_PROFILE 0x0900 00409 #define CL_PLATFORM_VERSION 0x0901 00410 #define CL_PLATFORM_NAME 0x0902 00411 #define CL_PLATFORM_VENDOR 0x0903 00412 #define CL_PLATFORM_EXTENSIONS 0x0904 00413 00414 // cl_device_type - bitfield 00415 #define CL_DEVICE_TYPE_DEFAULT (1 << 0) 00416 #define CL_DEVICE_TYPE_CPU (1 << 1) 00417 #define CL_DEVICE_TYPE_GPU (1 << 2) 00418 #define CL_DEVICE_TYPE_ACCELERATOR (1 << 3) 00419 #define CL_DEVICE_TYPE_ALL 0xFFFFFFFF 00420 00421 // cl_device_info 00422 #define CL_DEVICE_TYPE 0x1000 00423 #define CL_DEVICE_VENDOR_ID 0x1001 00424 #define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002 00425 #define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003 00426 #define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004 00427 #define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 00428 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006 00429 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007 00430 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008 00431 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009 00432 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A 00433 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B 00434 #define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C 00435 #define CL_DEVICE_ADDRESS_BITS 0x100D 00436 #define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E 00437 #define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F 00438 #define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010 00439 #define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011 00440 #define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012 00441 #define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013 00442 #define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014 00443 #define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015 00444 #define CL_DEVICE_IMAGE_SUPPORT 0x1016 00445 #define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017 00446 #define CL_DEVICE_MAX_SAMPLERS 0x1018 00447 #define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019 00448 #define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A 00449 #define CL_DEVICE_SINGLE_FP_CONFIG 0x101B 00450 #define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C 00451 #define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D 00452 #define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E 00453 #define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F 00454 #define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020 00455 #define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021 00456 #define CL_DEVICE_LOCAL_MEM_TYPE 0x1022 00457 #define CL_DEVICE_LOCAL_MEM_SIZE 0x1023 00458 #define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024 00459 #define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025 00460 #define CL_DEVICE_ENDIAN_LITTLE 0x1026 00461 #define CL_DEVICE_AVAILABLE 0x1027 00462 #define CL_DEVICE_COMPILER_AVAILABLE 0x1028 00463 #define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029 00464 #define CL_DEVICE_QUEUE_PROPERTIES 0x102A 00465 #define CL_DEVICE_NAME 0x102B 00466 #define CL_DEVICE_VENDOR 0x102C 00467 #define CL_DRIVER_VERSION 0x102D 00468 #define CL_DEVICE_PROFILE 0x102E 00469 #define CL_DEVICE_VERSION 0x102F 00470 #define CL_DEVICE_EXTENSIONS 0x1030 00471 #define CL_DEVICE_PLATFORM 0x1031 00472 /* 0x1032 reserved for CL_DEVICE_DOUBLE_FP_CONFIG */ 00473 /* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */ 00474 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034 00475 #define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 00476 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036 00477 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037 00478 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038 00479 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039 00480 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A 00481 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B 00482 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C 00483 #define CL_DEVICE_OPENCL_C_VERSION 0x103D 00484 00485 // cl_device_fp_config - bitfield 00486 #define CL_FP_DENORM (1 << 0) 00487 #define CL_FP_INF_NAN (1 << 1) 00488 #define CL_FP_ROUND_TO_NEAREST (1 << 2) 00489 #define CL_FP_ROUND_TO_ZERO (1 << 3) 00490 #define CL_FP_ROUND_TO_INF (1 << 4) 00491 #define CL_FP_FMA (1 << 5) 00492 00493 // cl_device_mem_cache_type 00494 #define CL_NONE 0x0 00495 #define CL_READ_ONLY_CACHE 0x1 00496 #define CL_READ_WRITE_CACHE 0x2 00497 00498 // cl_device_local_mem_type 00499 #define CL_LOCAL 0x1 00500 #define CL_GLOBAL 0x2 00501 00502 // cl_device_exec_capabilities - bitfield 00503 #define CL_EXEC_KERNEL (1 << 0) 00504 #define CL_EXEC_NATIVE_KERNEL (1 << 1) 00505 00506 // cl_command_queue_properties - bitfield 00507 #define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0) 00508 #define CL_QUEUE_PROFILING_ENABLE (1 << 1) 00509 00510 // cl_context_info 00511 #define CL_CONTEXT_REFERENCE_COUNT 0x1080 00512 #define CL_CONTEXT_DEVICES 0x1081 00513 #define CL_CONTEXT_PROPERTIES 0x1082 00514 00515 // cl_context_properties 00516 #define CL_CONTEXT_PLATFORM 0x1084 00517 00518 // cl_command_queue_info 00519 #define CL_QUEUE_CONTEXT 0x1090 00520 #define CL_QUEUE_DEVICE 0x1091 00521 #define CL_QUEUE_REFERENCE_COUNT 0x1092 00522 #define CL_QUEUE_PROPERTIES 0x1093 00523 00524 // cl_mem_flags - bitfield 00525 #define CL_MEM_READ_WRITE (1 << 0) 00526 #define CL_MEM_WRITE_ONLY (1 << 1) 00527 #define CL_MEM_READ_ONLY (1 << 2) 00528 #define CL_MEM_USE_HOST_PTR (1 << 3) 00529 #define CL_MEM_ALLOC_HOST_PTR (1 << 4) 00530 #define CL_MEM_COPY_HOST_PTR (1 << 5) 00531 00532 // cl_channel_order 00533 #define CL_R 0x10B0 00534 #define CL_A 0x10B1 00535 #define CL_RG 0x10B2 00536 #define CL_RA 0x10B3 00537 #define CL_RGB 0x10B4 00538 #define CL_RGBA 0x10B5 00539 #define CL_BGRA 0x10B6 00540 #define CL_ARGB 0x10B7 00541 #define CL_INTENSITY 0x10B8 00542 #define CL_LUMINANCE 0x10B9 00543 00544 // cl_channel_type 00545 #define CL_SNORM_INT8 0x10D0 00546 #define CL_SNORM_INT16 0x10D1 00547 #define CL_UNORM_INT8 0x10D2 00548 #define CL_UNORM_INT16 0x10D3 00549 #define CL_UNORM_SHORT_565 0x10D4 00550 #define CL_UNORM_SHORT_555 0x10D5 00551 #define CL_UNORM_INT_101010 0x10D6 00552 #define CL_SIGNED_INT8 0x10D7 00553 #define CL_SIGNED_INT16 0x10D8 00554 #define CL_SIGNED_INT32 0x10D9 00555 #define CL_UNSIGNED_INT8 0x10DA 00556 #define CL_UNSIGNED_INT16 0x10DB 00557 #define CL_UNSIGNED_INT32 0x10DC 00558 #define CL_HALF_FLOAT 0x10DD 00559 #define CL_FLOAT 0x10DE 00560 00561 // cl_mem_object_type 00562 #define CL_MEM_OBJECT_BUFFER 0x10F0 00563 #define CL_MEM_OBJECT_IMAGE2D 0x10F1 00564 #define CL_MEM_OBJECT_IMAGE3D 0x10F2 00565 00566 // cl_mem_info 00567 #define CL_MEM_TYPE 0x1100 00568 #define CL_MEM_FLAGS 0x1101 00569 #define CL_MEM_SIZE 0x1102 00570 #define CL_MEM_HOST_PTR 0x1103 00571 #define CL_MEM_MAP_COUNT 0x1104 00572 #define CL_MEM_REFERENCE_COUNT 0x1105 00573 #define CL_MEM_CONTEXT 0x1106 00574 00575 // cl_image_info 00576 #define CL_IMAGE_FORMAT 0x1110 00577 #define CL_IMAGE_ELEMENT_SIZE 0x1111 00578 #define CL_IMAGE_ROW_PITCH 0x1112 00579 #define CL_IMAGE_SLICE_PITCH 0x1113 00580 #define CL_IMAGE_WIDTH 0x1114 00581 #define CL_IMAGE_HEIGHT 0x1115 00582 #define CL_IMAGE_DEPTH 0x1116 00583 00584 // cl_addressing_mode 00585 #define CL_ADDRESS_NONE 0x1130 00586 #define CL_ADDRESS_CLAMP_TO_EDGE 0x1131 00587 #define CL_ADDRESS_CLAMP 0x1132 00588 #define CL_ADDRESS_REPEAT 0x1133 00589 00590 // cl_filter_mode 00591 #define CL_FILTER_NEAREST 0x1140 00592 #define CL_FILTER_LINEAR 0x1141 00593 00594 // cl_sampler_info 00595 #define CL_SAMPLER_REFERENCE_COUNT 0x1150 00596 #define CL_SAMPLER_CONTEXT 0x1151 00597 #define CL_SAMPLER_NORMALIZED_COORDS 0x1152 00598 #define CL_SAMPLER_ADDRESSING_MODE 0x1153 00599 #define CL_SAMPLER_FILTER_MODE 0x1154 00600 00601 // cl_map_flags - bitfield 00602 #define CL_MAP_READ (1 << 0) 00603 #define CL_MAP_WRITE (1 << 1) 00604 00605 // cl_program_info 00606 #define CL_PROGRAM_REFERENCE_COUNT 0x1160 00607 #define CL_PROGRAM_CONTEXT 0x1161 00608 #define CL_PROGRAM_NUM_DEVICES 0x1162 00609 #define CL_PROGRAM_DEVICES 0x1163 00610 #define CL_PROGRAM_SOURCE 0x1164 00611 #define CL_PROGRAM_BINARY_SIZES 0x1165 00612 #define CL_PROGRAM_BINARIES 0x1166 00613 00614 // cl_program_build_info 00615 #define CL_PROGRAM_BUILD_STATUS 0x1181 00616 #define CL_PROGRAM_BUILD_OPTIONS 0x1182 00617 #define CL_PROGRAM_BUILD_LOG 0x1183 00618 00619 // cl_build_status 00620 #define CL_BUILD_SUCCESS 0 00621 #define CL_BUILD_NONE -1 00622 #define CL_BUILD_ERROR -2 00623 #define CL_BUILD_IN_PROGRESS -3 00624 00625 // cl_kernel_info 00626 #define CL_KERNEL_FUNCTION_NAME 0x1190 00627 #define CL_KERNEL_NUM_ARGS 0x1191 00628 #define CL_KERNEL_REFERENCE_COUNT 0x1192 00629 #define CL_KERNEL_CONTEXT 0x1193 00630 #define CL_KERNEL_PROGRAM 0x1194 00631 00632 // cl_kernel_work_group_info 00633 #define CL_KERNEL_WORK_GROUP_SIZE 0x11B0 00634 #define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1 00635 #define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2 00636 00637 // cl_event_info 00638 #define CL_EVENT_COMMAND_QUEUE 0x11D0 00639 #define CL_EVENT_COMMAND_TYPE 0x11D1 00640 #define CL_EVENT_REFERENCE_COUNT 0x11D2 00641 #define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3 00642 00643 // cl_command_type 00644 #define CL_COMMAND_NDRANGE_KERNEL 0x11F0 00645 #define CL_COMMAND_TASK 0x11F1 00646 #define CL_COMMAND_NATIVE_KERNEL 0x11F2 00647 #define CL_COMMAND_READ_BUFFER 0x11F3 00648 #define CL_COMMAND_WRITE_BUFFER 0x11F4 00649 #define CL_COMMAND_COPY_BUFFER 0x11F5 00650 #define CL_COMMAND_READ_IMAGE 0x11F6 00651 #define CL_COMMAND_WRITE_IMAGE 0x11F7 00652 #define CL_COMMAND_COPY_IMAGE 0x11F8 00653 #define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9 00654 #define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA 00655 #define CL_COMMAND_MAP_BUFFER 0x11FB 00656 #define CL_COMMAND_MAP_IMAGE 0x11FC 00657 #define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD 00658 #define CL_COMMAND_MARKER 0x11FE 00659 #define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF 00660 #define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200 00661 00662 // command execution status 00663 #define CL_COMPLETE 0x0 00664 #define CL_RUNNING 0x1 00665 #define CL_SUBMITTED 0x2 00666 #define CL_QUEUED 0x3 00667 00668 // cl_profiling_info 00669 #define CL_PROFILING_COMMAND_QUEUED 0x1280 00670 #define CL_PROFILING_COMMAND_SUBMIT 0x1281 00671 #define CL_PROFILING_COMMAND_START 0x1282 00672 #define CL_PROFILING_COMMAND_END 0x1283 00673 00674 /********************************************************************************************************/ 00675 00676 /********************************************************************************************************/ 00677 00678 // Function signature typedef's 00679 00680 // Platform API 00681 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00682 PFNCLGETPLATFORMIDS)(cl_uint /* num_entries */, 00683 cl_platform_id * /* platforms */, 00684 cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0; 00685 00686 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00687 PFNCLGETPLATFORMINFO)(cl_platform_id /* platform */, 00688 cl_platform_info /* param_name */, 00689 size_t /* param_value_size */, 00690 void * /* param_value */, 00691 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 00692 00693 // Device APIs 00694 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00695 PFNCLGETDEVICEIDS)(cl_platform_id /* platform */, 00696 cl_device_type /* device_type */, 00697 cl_uint /* num_entries */, 00698 cl_device_id * /* devices */, 00699 cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0; 00700 00701 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00702 PFNCLGETDEVICEINFO)(cl_device_id /* device */, 00703 cl_device_info /* param_name */, 00704 size_t /* param_value_size */, 00705 void * /* param_value */, 00706 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 00707 00708 // Context APIs 00709 typedef CL_API_ENTRY cl_context (CL_API_CALL * 00710 PFNCLCREATECONTEXT)(const cl_context_properties * /* properties */, 00711 cl_uint /* num_devices */, 00712 const cl_device_id * /* devices */, 00713 void (*pfn_notify)(const char *, const void *, size_t, void *) /* pfn_notify */, 00714 void * /* user_data */, 00715 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 00716 00717 typedef CL_API_ENTRY cl_context (CL_API_CALL * 00718 PFNCLCREATECONTEXTFROMTYPE)(const cl_context_properties * /* properties */, 00719 cl_device_type /* device_type */, 00720 void (*pfn_notify)(const char *, const void *, size_t, void *) /* pfn_notify */, 00721 void * /* user_data */, 00722 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 00723 00724 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00725 PFNCLRETAINCONTEXT)(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0; 00726 00727 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00728 PFNCLRELEASECONTEXT)(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0; 00729 00730 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00731 PFNCLGETCONTEXTINFO)(cl_context /* context */, 00732 cl_context_info /* param_name */, 00733 size_t /* param_value_size */, 00734 void * /* param_value */, 00735 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 00736 00737 // Command Queue APIs 00738 typedef CL_API_ENTRY cl_command_queue (CL_API_CALL * 00739 PFNCLCREATECOMMANDQUEUE)(cl_context /* context */, 00740 cl_device_id /* device */, 00741 cl_command_queue_properties /* properties */, 00742 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 00743 00744 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00745 PFNCLRETAINCOMMANDQUEUE)(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; 00746 00747 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00748 PFNCLRELEASECOMMANDQUEUE)(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; 00749 00750 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00751 PFNCLGETCOMMANDQUEUEINFO)(cl_command_queue /* command_queue */, 00752 cl_command_queue_info /* param_name */, 00753 size_t /* param_value_size */, 00754 void * /* param_value */, 00755 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 00756 00757 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00758 PFNCLSETCOMMANDQUEUEPROPERTY)(cl_command_queue /* command_queue */, 00759 cl_command_queue_properties /* properties */, 00760 cl_bool /* enable */, 00761 cl_command_queue_properties * /* old_properties */) CL_API_SUFFIX__VERSION_1_0; 00762 00763 // Memory Object APIs 00764 typedef CL_API_ENTRY cl_mem (CL_API_CALL * 00765 PFNCLCREATEBUFFER)(cl_context /* context */, 00766 cl_mem_flags /* flags */, 00767 size_t /* size */, 00768 void * /* host_ptr */, 00769 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 00770 00771 typedef CL_API_ENTRY cl_mem (CL_API_CALL * 00772 PFNCLCREATEIMAGE2D)(cl_context /* context */, 00773 cl_mem_flags /* flags */, 00774 const cl_image_format * /* image_format */, 00775 size_t /* image_width */, 00776 size_t /* image_height */, 00777 size_t /* image_row_pitch */, 00778 void * /* host_ptr */, 00779 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 00780 00781 typedef CL_API_ENTRY cl_mem (CL_API_CALL * 00782 PFNCLCREATEIMAGE3D)(cl_context /* context */, 00783 cl_mem_flags /* flags */, 00784 const cl_image_format * /* image_format */, 00785 size_t /* image_width */, 00786 size_t /* image_height */, 00787 size_t /* image_depth */, 00788 size_t /* image_row_pitch */, 00789 size_t /* image_slice_pitch */, 00790 void * /* host_ptr */, 00791 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 00792 00793 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00794 PFNCLRETAINMEMOBJECT)(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0; 00795 00796 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00797 PFNCLRELEASEMEMOBJECT)(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0; 00798 00799 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00800 PFNCLGETSUPPORTEDIMAGEFORMATS)(cl_context /* context */, 00801 cl_mem_flags /* flags */, 00802 cl_mem_object_type /* image_type */, 00803 cl_uint /* num_entries */, 00804 cl_image_format * /* image_formats */, 00805 cl_uint * /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0; 00806 00807 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00808 PFNCLGETMEMOBJECTINFO)(cl_mem /* memobj */, 00809 cl_mem_info /* param_name */, 00810 size_t /* param_value_size */, 00811 void * /* param_value */, 00812 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 00813 00814 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00815 PFNCLGETIMAGEINFO)(cl_mem /* image */, 00816 cl_image_info /* param_name */, 00817 size_t /* param_value_size */, 00818 void * /* param_value */, 00819 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 00820 00821 // Sampler APIs 00822 typedef CL_API_ENTRY cl_sampler (CL_API_CALL * 00823 PFNCLCREATESAMPLER)(cl_context /* context */, 00824 cl_bool /* normalized_coords */, 00825 cl_addressing_mode /* addressing_mode */, 00826 cl_filter_mode /* filter_mode */, 00827 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 00828 00829 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00830 PFNCLRETAINSAMPLER)(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0; 00831 00832 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00833 PFNCLRELEASESAMPLER)(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0; 00834 00835 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00836 PFNCLGETSAMPLERINFO)(cl_sampler /* sampler */, 00837 cl_sampler_info /* param_name */, 00838 size_t /* param_value_size */, 00839 void * /* param_value */, 00840 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 00841 00842 // Program Object APIs 00843 typedef CL_API_ENTRY cl_program (CL_API_CALL * 00844 PFNCLCREATEPROGRAMWITHSOURCE)(cl_context /* context */, 00845 cl_uint /* count */, 00846 const char ** /* strings */, 00847 const size_t * /* lengths */, 00848 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 00849 00850 typedef CL_API_ENTRY cl_program (CL_API_CALL * 00851 PFNCLCREATEPROGRAMWITHBINARY)(cl_context /* context */, 00852 cl_uint /* num_devices */, 00853 const cl_device_id * /* device_list */, 00854 const size_t * /* lengths */, 00855 const unsigned char ** /* binaries */, 00856 cl_int * /* binary_status */, 00857 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 00858 00859 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00860 PFNCLRETAINPROGRAM)(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0; 00861 00862 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00863 PFNCLRELEASEPROGRAM)(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0; 00864 00865 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00866 PFNCLBUILDPROGRAM)(cl_program /* program */, 00867 cl_uint /* num_devices */, 00868 const cl_device_id * /* device_list */, 00869 const char * /* options */, 00870 void (*pfn_notify)(cl_program /* program */, void * /* user_data */), 00871 void * /* user_data */) CL_API_SUFFIX__VERSION_1_0; 00872 00873 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00874 PFNCLUNLOADCOMPILER)(void) CL_API_SUFFIX__VERSION_1_0; 00875 00876 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00877 PFNCLGETPROGRAMINFO)(cl_program /* program */, 00878 cl_program_info /* param_name */, 00879 size_t /* param_value_size */, 00880 void * /* param_value */, 00881 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 00882 00883 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00884 PFNCLGETPROGRAMBUILDINFO)(cl_program /* program */, 00885 cl_device_id /* device */, 00886 cl_program_build_info /* param_name */, 00887 size_t /* param_value_size */, 00888 void * /* param_value */, 00889 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 00890 00891 // Kernel Object APIs 00892 typedef CL_API_ENTRY cl_kernel (CL_API_CALL * 00893 PFNCLCREATEKERNEL)(cl_program /* program */, 00894 const char * /* kernel_name */, 00895 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 00896 00897 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00898 PFNCLCREATEKERNELSINPROGRAM)(cl_program /* program */, 00899 cl_uint /* num_kernels */, 00900 cl_kernel * /* kernels */, 00901 cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0; 00902 00903 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00904 PFNCLRETAINKERNEL)(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0; 00905 00906 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00907 PFNCLRELEASEKERNEL)(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0; 00908 00909 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00910 PFNCLSETKERNELARG)(cl_kernel /* kernel */, 00911 cl_uint /* arg_index */, 00912 size_t /* arg_size */, 00913 const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0; 00914 00915 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00916 PFNCLGETKERNELINFO)(cl_kernel /* kernel */, 00917 cl_kernel_info /* param_name */, 00918 size_t /* param_value_size */, 00919 void * /* param_value */, 00920 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 00921 00922 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00923 PFNCLGETKERNELWORKGROUPINFO)(cl_kernel /* kernel */, 00924 cl_device_id /* device */, 00925 cl_kernel_work_group_info /* param_name */, 00926 size_t /* param_value_size */, 00927 void * /* param_value */, 00928 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 00929 00930 // Event Object APIs 00931 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00932 PFNCLWAITFOREVENTS)(cl_uint /* num_events */, 00933 const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0; 00934 00935 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00936 PFNCLGETEVENTINFO)(cl_event /* event */, 00937 cl_event_info /* param_name */, 00938 size_t /* param_value_size */, 00939 void * /* param_value */, 00940 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 00941 00942 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00943 PFNCLRETAINEVENT)(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; 00944 00945 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00946 PFNCLRELEASEEVENT)(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; 00947 00948 // Profiling APIs 00949 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00950 PFNCLGETEVENTPROFILINGINFO)(cl_event /* event */, 00951 cl_profiling_info /* param_name */, 00952 size_t /* param_value_size */, 00953 void * /* param_value */, 00954 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 00955 00956 // Flush and Finish APIs 00957 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00958 PFNCLFLUSH)(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; 00959 00960 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00961 PFNCLFINISH)(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; 00962 00963 // Enqueued Commands APIs 00964 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00965 PFNCLENQUEUEREADBUFFER)(cl_command_queue /* command_queue */, 00966 cl_mem /* buffer */, 00967 cl_bool /* blocking_read */, 00968 size_t /* offset */, 00969 size_t /* cb */, 00970 void * /* ptr */, 00971 cl_uint /* num_events_in_wait_list */, 00972 const cl_event * /* event_wait_list */, 00973 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 00974 00975 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00976 PFNCLENQUEUEWRITEBUFFER)(cl_command_queue /* command_queue */, 00977 cl_mem /* buffer */, 00978 cl_bool /* blocking_write */, 00979 size_t /* offset */, 00980 size_t /* cb */, 00981 const void * /* ptr */, 00982 cl_uint /* num_events_in_wait_list */, 00983 const cl_event * /* event_wait_list */, 00984 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 00985 00986 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00987 PFNCLENQUEUECOPYBUFFER)(cl_command_queue /* command_queue */, 00988 cl_mem /* src_buffer */, 00989 cl_mem /* dst_buffer */, 00990 size_t /* src_offset */, 00991 size_t /* dst_offset */, 00992 size_t /* cb */, 00993 cl_uint /* num_events_in_wait_list */, 00994 const cl_event * /* event_wait_list */, 00995 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 00996 00997 typedef CL_API_ENTRY cl_int (CL_API_CALL * 00998 PFNCLENQUEUEREADIMAGE)(cl_command_queue /* command_queue */, 00999 cl_mem /* image */, 01000 cl_bool /* blocking_read */, 01001 const size_t * /* origin[3] */, 01002 const size_t * /* region[3] */, 01003 size_t /* row_pitch */, 01004 size_t /* slice_pitch */, 01005 void * /* ptr */, 01006 cl_uint /* num_events_in_wait_list */, 01007 const cl_event * /* event_wait_list */, 01008 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 01009 01010 typedef CL_API_ENTRY cl_int (CL_API_CALL * 01011 PFNCLENQUEUEWRITEIMAGE)(cl_command_queue /* command_queue */, 01012 cl_mem /* image */, 01013 cl_bool /* blocking_write */, 01014 const size_t * /* origin[3] */, 01015 const size_t * /* region[3] */, 01016 size_t /* input_row_pitch */, 01017 size_t /* input_slice_pitch */, 01018 const void * /* ptr */, 01019 cl_uint /* num_events_in_wait_list */, 01020 const cl_event * /* event_wait_list */, 01021 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 01022 01023 typedef CL_API_ENTRY cl_int (CL_API_CALL * 01024 PFNCLENQUEUECOPYIMAGE)(cl_command_queue /* command_queue */, 01025 cl_mem /* src_image */, 01026 cl_mem /* dst_image */, 01027 const size_t * /* src_origin[3] */, 01028 const size_t * /* dst_origin[3] */, 01029 const size_t * /* region[3] */, 01030 cl_uint /* num_events_in_wait_list */, 01031 const cl_event * /* event_wait_list */, 01032 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 01033 01034 typedef CL_API_ENTRY cl_int (CL_API_CALL * 01035 PFNCLENQUEUECOPYIMAGETOBUFFER)(cl_command_queue /* command_queue */, 01036 cl_mem /* src_image */, 01037 cl_mem /* dst_buffer */, 01038 const size_t * /* src_origin[3] */, 01039 const size_t * /* region[3] */, 01040 size_t /* dst_offset */, 01041 cl_uint /* num_events_in_wait_list */, 01042 const cl_event * /* event_wait_list */, 01043 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 01044 01045 typedef CL_API_ENTRY cl_int (CL_API_CALL * 01046 PFNCLENQUEUECOPYBUFFERTOIMAGE)(cl_command_queue /* command_queue */, 01047 cl_mem /* src_buffer */, 01048 cl_mem /* dst_image */, 01049 size_t /* src_offset */, 01050 const size_t * /* dst_origin[3] */, 01051 const size_t * /* region[3] */, 01052 cl_uint /* num_events_in_wait_list */, 01053 const cl_event * /* event_wait_list */, 01054 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 01055 01056 typedef CL_API_ENTRY void * (CL_API_CALL * 01057 PFNCLENQUEUEMAPBUFFER)(cl_command_queue /* command_queue */, 01058 cl_mem /* buffer */, 01059 cl_bool /* blocking_map */, 01060 cl_map_flags /* map_flags */, 01061 size_t /* offset */, 01062 size_t /* cb */, 01063 cl_uint /* num_events_in_wait_list */, 01064 const cl_event * /* event_wait_list */, 01065 cl_event * /* event */, 01066 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 01067 01068 typedef CL_API_ENTRY void * (CL_API_CALL * 01069 PFNCLENQUEUEMAPIMAGE)(cl_command_queue /* command_queue */, 01070 cl_mem /* image */, 01071 cl_bool /* blocking_map */, 01072 cl_map_flags /* map_flags */, 01073 const size_t * /* origin[3] */, 01074 const size_t * /* region[3] */, 01075 size_t * /* image_row_pitch */, 01076 size_t * /* image_slice_pitch */, 01077 cl_uint /* num_events_in_wait_list */, 01078 const cl_event * /* event_wait_list */, 01079 cl_event * /* event */, 01080 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 01081 01082 typedef CL_API_ENTRY cl_int (CL_API_CALL * 01083 PFNCLENQUEUEUNMAPMEMOBJECT)(cl_command_queue /* command_queue */, 01084 cl_mem /* memobj */, 01085 void * /* mapped_ptr */, 01086 cl_uint /* num_events_in_wait_list */, 01087 const cl_event * /* event_wait_list */, 01088 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 01089 01090 typedef CL_API_ENTRY cl_int (CL_API_CALL * 01091 PFNCLENQUEUENDRANGEKERNEL)(cl_command_queue /* command_queue */, 01092 cl_kernel /* kernel */, 01093 cl_uint /* work_dim */, 01094 const size_t * /* global_work_offset */, 01095 const size_t * /* global_work_size */, 01096 const size_t * /* local_work_size */, 01097 cl_uint /* num_events_in_wait_list */, 01098 const cl_event * /* event_wait_list */, 01099 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 01100 01101 typedef CL_API_ENTRY cl_int (CL_API_CALL * 01102 PFNCLENQUEUETASK)(cl_command_queue /* command_queue */, 01103 cl_kernel /* kernel */, 01104 cl_uint /* num_events_in_wait_list */, 01105 const cl_event * /* event_wait_list */, 01106 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 01107 01108 typedef CL_API_ENTRY cl_int (CL_API_CALL * 01109 PFNCLENQUEUENATIVEKERNEL)(cl_command_queue /* command_queue */, 01110 void (*user_func)(void *), 01111 void * /* args */, 01112 size_t /* cb_args */, 01113 cl_uint /* num_mem_objects */, 01114 const cl_mem * /* mem_list */, 01115 const void ** /* args_mem_loc */, 01116 cl_uint /* num_events_in_wait_list */, 01117 const cl_event * /* event_wait_list */, 01118 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 01119 01120 typedef CL_API_ENTRY cl_int (CL_API_CALL * 01121 PFNCLENQUEUEMARKER)(cl_command_queue /* command_queue */, 01122 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; 01123 01124 typedef CL_API_ENTRY cl_int (CL_API_CALL * 01125 PFNCLENQUEUEWAITFOREVENTS)(cl_command_queue /* command_queue */, 01126 cl_uint /* num_events */, 01127 const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0; 01128 01129 typedef CL_API_ENTRY cl_int (CL_API_CALL * 01130 PFNCLENQUEUEBARRIER)(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; 01131 01132 // Extension function access 01133 // 01134 // Returns the extension function address for the given function name, 01135 // or NULL if a valid function can not be found. The client must 01136 // check to make sure the address is not NULL, before using or 01137 // calling the returned function address. 01138 // 01139 typedef CL_API_ENTRY void * (CL_API_CALL * PFNCLGETEXTENSIONFUNCTIONADDRESS)(const char * /* func_name */) CL_API_SUFFIX__VERSION_1_0; 01140 01141 01142 #define CLEW_STATIC 01143 01144 #ifdef CLEW_STATIC 01145 # define CLEWAPI extern 01146 #else 01147 # ifdef CLEW_BUILD 01148 # define CLEWAPI extern __declspec(dllexport) 01149 # else 01150 # define CLEWAPI extern __declspec(dllimport) 01151 # endif 01152 #endif 01153 01154 #if defined(_WIN32) 01155 #define CLEW_FUN_EXPORT extern 01156 #else 01157 #define CLEW_FUN_EXPORT CLEWAPI 01158 #endif 01159 01160 #define CLEW_GET_FUN(x) x 01161 01162 01163 // Variables holding function entry points 01164 CLEW_FUN_EXPORT PFNCLGETPLATFORMIDS __clewGetPlatformIDs ; 01165 CLEW_FUN_EXPORT PFNCLGETPLATFORMINFO __clewGetPlatformInfo ; 01166 CLEW_FUN_EXPORT PFNCLGETDEVICEIDS __clewGetDeviceIDs ; 01167 CLEW_FUN_EXPORT PFNCLGETDEVICEINFO __clewGetDeviceInfo ; 01168 CLEW_FUN_EXPORT PFNCLCREATECONTEXT __clewCreateContext ; 01169 CLEW_FUN_EXPORT PFNCLCREATECONTEXTFROMTYPE __clewCreateContextFromType ; 01170 CLEW_FUN_EXPORT PFNCLRETAINCONTEXT __clewRetainContext ; 01171 CLEW_FUN_EXPORT PFNCLRELEASECONTEXT __clewReleaseContext ; 01172 CLEW_FUN_EXPORT PFNCLGETCONTEXTINFO __clewGetContextInfo ; 01173 CLEW_FUN_EXPORT PFNCLCREATECOMMANDQUEUE __clewCreateCommandQueue ; 01174 CLEW_FUN_EXPORT PFNCLRETAINCOMMANDQUEUE __clewRetainCommandQueue ; 01175 CLEW_FUN_EXPORT PFNCLRELEASECOMMANDQUEUE __clewReleaseCommandQueue ; 01176 CLEW_FUN_EXPORT PFNCLGETCOMMANDQUEUEINFO __clewGetCommandQueueInfo ; 01177 CLEW_FUN_EXPORT PFNCLSETCOMMANDQUEUEPROPERTY __clewSetCommandQueueProperty ; 01178 CLEW_FUN_EXPORT PFNCLCREATEBUFFER __clewCreateBuffer ; 01179 CLEW_FUN_EXPORT PFNCLCREATEIMAGE2D __clewCreateImage2D ; 01180 CLEW_FUN_EXPORT PFNCLCREATEIMAGE3D __clewCreateImage3D ; 01181 CLEW_FUN_EXPORT PFNCLRETAINMEMOBJECT __clewRetainMemObject ; 01182 CLEW_FUN_EXPORT PFNCLRELEASEMEMOBJECT __clewReleaseMemObject ; 01183 CLEW_FUN_EXPORT PFNCLGETSUPPORTEDIMAGEFORMATS __clewGetSupportedImageFormats ; 01184 CLEW_FUN_EXPORT PFNCLGETMEMOBJECTINFO __clewGetMemObjectInfo ; 01185 CLEW_FUN_EXPORT PFNCLGETIMAGEINFO __clewGetImageInfo ; 01186 CLEW_FUN_EXPORT PFNCLCREATESAMPLER __clewCreateSampler ; 01187 CLEW_FUN_EXPORT PFNCLRETAINSAMPLER __clewRetainSampler ; 01188 CLEW_FUN_EXPORT PFNCLRELEASESAMPLER __clewReleaseSampler ; 01189 CLEW_FUN_EXPORT PFNCLGETSAMPLERINFO __clewGetSamplerInfo ; 01190 CLEW_FUN_EXPORT PFNCLCREATEPROGRAMWITHSOURCE __clewCreateProgramWithSource ; 01191 CLEW_FUN_EXPORT PFNCLCREATEPROGRAMWITHBINARY __clewCreateProgramWithBinary ; 01192 CLEW_FUN_EXPORT PFNCLRETAINPROGRAM __clewRetainProgram ; 01193 CLEW_FUN_EXPORT PFNCLRELEASEPROGRAM __clewReleaseProgram ; 01194 CLEW_FUN_EXPORT PFNCLBUILDPROGRAM __clewBuildProgram ; 01195 CLEW_FUN_EXPORT PFNCLUNLOADCOMPILER __clewUnloadCompiler ; 01196 CLEW_FUN_EXPORT PFNCLGETPROGRAMINFO __clewGetProgramInfo ; 01197 CLEW_FUN_EXPORT PFNCLGETPROGRAMBUILDINFO __clewGetProgramBuildInfo ; 01198 CLEW_FUN_EXPORT PFNCLCREATEKERNEL __clewCreateKernel ; 01199 CLEW_FUN_EXPORT PFNCLCREATEKERNELSINPROGRAM __clewCreateKernelsInProgram ; 01200 CLEW_FUN_EXPORT PFNCLRETAINKERNEL __clewRetainKernel ; 01201 CLEW_FUN_EXPORT PFNCLRELEASEKERNEL __clewReleaseKernel ; 01202 CLEW_FUN_EXPORT PFNCLSETKERNELARG __clewSetKernelArg ; 01203 CLEW_FUN_EXPORT PFNCLGETKERNELINFO __clewGetKernelInfo ; 01204 CLEW_FUN_EXPORT PFNCLGETKERNELWORKGROUPINFO __clewGetKernelWorkGroupInfo ; 01205 CLEW_FUN_EXPORT PFNCLWAITFOREVENTS __clewWaitForEvents ; 01206 CLEW_FUN_EXPORT PFNCLGETEVENTINFO __clewGetEventInfo ; 01207 CLEW_FUN_EXPORT PFNCLRETAINEVENT __clewRetainEvent ; 01208 CLEW_FUN_EXPORT PFNCLRELEASEEVENT __clewReleaseEvent ; 01209 CLEW_FUN_EXPORT PFNCLGETEVENTPROFILINGINFO __clewGetEventProfilingInfo ; 01210 CLEW_FUN_EXPORT PFNCLFLUSH __clewFlush ; 01211 CLEW_FUN_EXPORT PFNCLFINISH __clewFinish ; 01212 CLEW_FUN_EXPORT PFNCLENQUEUEREADBUFFER __clewEnqueueReadBuffer ; 01213 CLEW_FUN_EXPORT PFNCLENQUEUEWRITEBUFFER __clewEnqueueWriteBuffer ; 01214 CLEW_FUN_EXPORT PFNCLENQUEUECOPYBUFFER __clewEnqueueCopyBuffer ; 01215 CLEW_FUN_EXPORT PFNCLENQUEUEREADIMAGE __clewEnqueueReadImage ; 01216 CLEW_FUN_EXPORT PFNCLENQUEUEWRITEIMAGE __clewEnqueueWriteImage ; 01217 CLEW_FUN_EXPORT PFNCLENQUEUECOPYIMAGE __clewEnqueueCopyImage ; 01218 CLEW_FUN_EXPORT PFNCLENQUEUECOPYIMAGETOBUFFER __clewEnqueueCopyImageToBuffer ; 01219 CLEW_FUN_EXPORT PFNCLENQUEUECOPYBUFFERTOIMAGE __clewEnqueueCopyBufferToImage ; 01220 CLEW_FUN_EXPORT PFNCLENQUEUEMAPBUFFER __clewEnqueueMapBuffer ; 01221 CLEW_FUN_EXPORT PFNCLENQUEUEMAPIMAGE __clewEnqueueMapImage ; 01222 CLEW_FUN_EXPORT PFNCLENQUEUEUNMAPMEMOBJECT __clewEnqueueUnmapMemObject ; 01223 CLEW_FUN_EXPORT PFNCLENQUEUENDRANGEKERNEL __clewEnqueueNDRangeKernel ; 01224 CLEW_FUN_EXPORT PFNCLENQUEUETASK __clewEnqueueTask ; 01225 CLEW_FUN_EXPORT PFNCLENQUEUENATIVEKERNEL __clewEnqueueNativeKernel ; 01226 CLEW_FUN_EXPORT PFNCLENQUEUEMARKER __clewEnqueueMarker ; 01227 CLEW_FUN_EXPORT PFNCLENQUEUEWAITFOREVENTS __clewEnqueueWaitForEvents ; 01228 CLEW_FUN_EXPORT PFNCLENQUEUEBARRIER __clewEnqueueBarrier ; 01229 CLEW_FUN_EXPORT PFNCLGETEXTENSIONFUNCTIONADDRESS __clewGetExtensionFunctionAddress ; 01230 01231 01232 #define clGetPlatformIDs CLEW_GET_FUN(__clewGetPlatformIDs ) 01233 #define clGetPlatformInfo CLEW_GET_FUN(__clewGetPlatformInfo ) 01234 #define clGetDeviceIDs CLEW_GET_FUN(__clewGetDeviceIDs ) 01235 #define clGetDeviceInfo CLEW_GET_FUN(__clewGetDeviceInfo ) 01236 #define clCreateContext CLEW_GET_FUN(__clewCreateContext ) 01237 #define clCreateContextFromType CLEW_GET_FUN(__clewCreateContextFromType ) 01238 #define clRetainContext CLEW_GET_FUN(__clewRetainContext ) 01239 #define clReleaseContext CLEW_GET_FUN(__clewReleaseContext ) 01240 #define clGetContextInfo CLEW_GET_FUN(__clewGetContextInfo ) 01241 #define clCreateCommandQueue CLEW_GET_FUN(__clewCreateCommandQueue ) 01242 #define clRetainCommandQueue CLEW_GET_FUN(__clewRetainCommandQueue ) 01243 #define clReleaseCommandQueue CLEW_GET_FUN(__clewReleaseCommandQueue ) 01244 #define clGetCommandQueueInfo CLEW_GET_FUN(__clewGetCommandQueueInfo ) 01245 #define clSetCommandQueueProperty CLEW_GET_FUN(__clewSetCommandQueueProperty ) 01246 #define clCreateBuffer CLEW_GET_FUN(__clewCreateBuffer ) 01247 #define clCreateImage2D CLEW_GET_FUN(__clewCreateImage2D ) 01248 #define clCreateImage3D CLEW_GET_FUN(__clewCreateImage3D ) 01249 #define clRetainMemObject CLEW_GET_FUN(__clewRetainMemObject ) 01250 #define clReleaseMemObject CLEW_GET_FUN(__clewReleaseMemObject ) 01251 #define clGetSupportedImageFormats CLEW_GET_FUN(__clewGetSupportedImageFormats ) 01252 #define clGetMemObjectInfo CLEW_GET_FUN(__clewGetMemObjectInfo ) 01253 #define clGetImageInfo CLEW_GET_FUN(__clewGetImageInfo ) 01254 #define clCreateSampler CLEW_GET_FUN(__clewCreateSampler ) 01255 #define clRetainSampler CLEW_GET_FUN(__clewRetainSampler ) 01256 #define clReleaseSampler CLEW_GET_FUN(__clewReleaseSampler ) 01257 #define clGetSamplerInfo CLEW_GET_FUN(__clewGetSamplerInfo ) 01258 #define clCreateProgramWithSource CLEW_GET_FUN(__clewCreateProgramWithSource ) 01259 #define clCreateProgramWithBinary CLEW_GET_FUN(__clewCreateProgramWithBinary ) 01260 #define clRetainProgram CLEW_GET_FUN(__clewRetainProgram ) 01261 #define clReleaseProgram CLEW_GET_FUN(__clewReleaseProgram ) 01262 #define clBuildProgram CLEW_GET_FUN(__clewBuildProgram ) 01263 #define clUnloadCompiler CLEW_GET_FUN(__clewUnloadCompiler ) 01264 #define clGetProgramInfo CLEW_GET_FUN(__clewGetProgramInfo ) 01265 #define clGetProgramBuildInfo CLEW_GET_FUN(__clewGetProgramBuildInfo ) 01266 #define clCreateKernel CLEW_GET_FUN(__clewCreateKernel ) 01267 #define clCreateKernelsInProgram CLEW_GET_FUN(__clewCreateKernelsInProgram ) 01268 #define clRetainKernel CLEW_GET_FUN(__clewRetainKernel ) 01269 #define clReleaseKernel CLEW_GET_FUN(__clewReleaseKernel ) 01270 #define clSetKernelArg CLEW_GET_FUN(__clewSetKernelArg ) 01271 #define clGetKernelInfo CLEW_GET_FUN(__clewGetKernelInfo ) 01272 #define clGetKernelWorkGroupInfo CLEW_GET_FUN(__clewGetKernelWorkGroupInfo ) 01273 #define clWaitForEvents CLEW_GET_FUN(__clewWaitForEvents ) 01274 #define clGetEventInfo CLEW_GET_FUN(__clewGetEventInfo ) 01275 #define clRetainEvent CLEW_GET_FUN(__clewRetainEvent ) 01276 #define clReleaseEvent CLEW_GET_FUN(__clewReleaseEvent ) 01277 #define clGetEventProfilingInfo CLEW_GET_FUN(__clewGetEventProfilingInfo ) 01278 #define clFlush CLEW_GET_FUN(__clewFlush ) 01279 #define clFinish CLEW_GET_FUN(__clewFinish ) 01280 #define clEnqueueReadBuffer CLEW_GET_FUN(__clewEnqueueReadBuffer ) 01281 #define clEnqueueWriteBuffer CLEW_GET_FUN(__clewEnqueueWriteBuffer ) 01282 #define clEnqueueCopyBuffer CLEW_GET_FUN(__clewEnqueueCopyBuffer ) 01283 #define clEnqueueReadImage CLEW_GET_FUN(__clewEnqueueReadImage ) 01284 #define clEnqueueWriteImage CLEW_GET_FUN(__clewEnqueueWriteImage ) 01285 #define clEnqueueCopyImage CLEW_GET_FUN(__clewEnqueueCopyImage ) 01286 #define clEnqueueCopyImageToBuffer CLEW_GET_FUN(__clewEnqueueCopyImageToBuffer ) 01287 #define clEnqueueCopyBufferToImage CLEW_GET_FUN(__clewEnqueueCopyBufferToImage ) 01288 #define clEnqueueMapBuffer CLEW_GET_FUN(__clewEnqueueMapBuffer ) 01289 #define clEnqueueMapImage CLEW_GET_FUN(__clewEnqueueMapImage ) 01290 #define clEnqueueUnmapMemObject CLEW_GET_FUN(__clewEnqueueUnmapMemObject ) 01291 #define clEnqueueNDRangeKernel CLEW_GET_FUN(__clewEnqueueNDRangeKernel ) 01292 #define clEnqueueTask CLEW_GET_FUN(__clewEnqueueTask ) 01293 #define clEnqueueNativeKernel CLEW_GET_FUN(__clewEnqueueNativeKernel ) 01294 #define clEnqueueMarker CLEW_GET_FUN(__clewEnqueueMarker ) 01295 #define clEnqueueWaitForEvents CLEW_GET_FUN(__clewEnqueueWaitForEvents ) 01296 #define clEnqueueBarrier CLEW_GET_FUN(__clewEnqueueBarrier ) 01297 #define clGetExtensionFunctionAddress CLEW_GET_FUN(__clewGetExtensionFunctionAddress ) 01298 01299 #endif // CLCC_GENERATE_DOCUMENTATION 01300 01301 #define CLEW_SUCCESS 0 //!< Success error code 01302 #define CLEW_ERROR_OPEN_FAILED -1 //!< Error code for failing to open the dynamic library 01303 #define CLEW_ERROR_ATEXIT_FAILED -2 //!< Error code for failing to queue the closing of the dynamic library to atexit() 01304 01305 int clLibraryInit(void); 01306 const char *clErrorString(cl_int error); 01307 01308 CCL_NAMESPACE_END 01309 01310 #endif /* __UTIL_OPENCL_H__ */ 01311