cl.h 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998
  1. /*******************************************************************************
  2. * Copyright (c) 2008-2010 The Khronos Group Inc.
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and/or associated documentation files (the
  6. * "Materials"), to deal in the Materials without restriction, including
  7. * without limitation the rights to use, copy, modify, merge, publish,
  8. * distribute, sublicense, and/or sell copies of the Materials, and to
  9. * permit persons to whom the Materials are furnished to do so, subject to
  10. * the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included
  13. * in all copies or substantial portions of the Materials.
  14. *
  15. * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  16. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  17. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  18. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  19. * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  20. * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  21. * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
  22. ******************************************************************************/
  23. /* $Revision: 11985 $ on $Date: 2010-07-15 11:16:06 -0700 (Thu, 15 Jul 2010) $ */
  24. #ifndef __OPENCL_CL_H
  25. #define __OPENCL_CL_H
  26. #ifdef __APPLE__
  27. #include <OpenCL/cl_platform.h>
  28. #else
  29. #include <cl_platform.h>
  30. #endif
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. /******************************************************************************/
  35. typedef struct _cl_platform_id * cl_platform_id;
  36. typedef struct _cl_device_id * cl_device_id;
  37. typedef struct _cl_context * cl_context;
  38. typedef struct _cl_command_queue * cl_command_queue;
  39. typedef struct _cl_mem * cl_mem;
  40. typedef struct _cl_program * cl_program;
  41. typedef struct _cl_kernel * cl_kernel;
  42. typedef struct _cl_event * cl_event;
  43. typedef struct _cl_sampler * cl_sampler;
  44. 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. */
  45. typedef cl_ulong cl_bitfield;
  46. typedef cl_bitfield cl_device_type;
  47. typedef cl_uint cl_platform_info;
  48. typedef cl_uint cl_device_info;
  49. typedef cl_bitfield cl_device_fp_config;
  50. typedef cl_uint cl_device_mem_cache_type;
  51. typedef cl_uint cl_device_local_mem_type;
  52. typedef cl_bitfield cl_device_exec_capabilities;
  53. typedef cl_bitfield cl_command_queue_properties;
  54. typedef intptr_t cl_context_properties;
  55. typedef cl_uint cl_context_info;
  56. typedef cl_uint cl_command_queue_info;
  57. typedef cl_uint cl_channel_order;
  58. typedef cl_uint cl_channel_type;
  59. typedef cl_bitfield cl_mem_flags;
  60. typedef cl_uint cl_mem_object_type;
  61. typedef cl_uint cl_mem_info;
  62. typedef cl_uint cl_image_info;
  63. typedef cl_uint cl_buffer_create_type;
  64. typedef cl_uint cl_addressing_mode;
  65. typedef cl_uint cl_filter_mode;
  66. typedef cl_uint cl_sampler_info;
  67. typedef cl_bitfield cl_map_flags;
  68. typedef cl_uint cl_program_info;
  69. typedef cl_uint cl_program_build_info;
  70. typedef cl_int cl_build_status;
  71. typedef cl_uint cl_kernel_info;
  72. typedef cl_uint cl_kernel_work_group_info;
  73. typedef cl_uint cl_event_info;
  74. typedef cl_uint cl_command_type;
  75. typedef cl_uint cl_profiling_info;
  76. typedef struct _cl_image_format {
  77. cl_channel_order image_channel_order;
  78. cl_channel_type image_channel_data_type;
  79. } cl_image_format;
  80. typedef struct _cl_buffer_region {
  81. size_t origin;
  82. size_t size;
  83. } cl_buffer_region;
  84. /******************************************************************************/
  85. /* Error Codes */
  86. #define CL_SUCCESS 0
  87. #define CL_DEVICE_NOT_FOUND -1
  88. #define CL_DEVICE_NOT_AVAILABLE -2
  89. #define CL_COMPILER_NOT_AVAILABLE -3
  90. #define CL_MEM_OBJECT_ALLOCATION_FAILURE -4
  91. #define CL_OUT_OF_RESOURCES -5
  92. #define CL_OUT_OF_HOST_MEMORY -6
  93. #define CL_PROFILING_INFO_NOT_AVAILABLE -7
  94. #define CL_MEM_COPY_OVERLAP -8
  95. #define CL_IMAGE_FORMAT_MISMATCH -9
  96. #define CL_IMAGE_FORMAT_NOT_SUPPORTED -10
  97. #define CL_BUILD_PROGRAM_FAILURE -11
  98. #define CL_MAP_FAILURE -12
  99. #define CL_MISALIGNED_SUB_BUFFER_OFFSET -13
  100. #define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14
  101. #define CL_INVALID_VALUE -30
  102. #define CL_INVALID_DEVICE_TYPE -31
  103. #define CL_INVALID_PLATFORM -32
  104. #define CL_INVALID_DEVICE -33
  105. #define CL_INVALID_CONTEXT -34
  106. #define CL_INVALID_QUEUE_PROPERTIES -35
  107. #define CL_INVALID_COMMAND_QUEUE -36
  108. #define CL_INVALID_HOST_PTR -37
  109. #define CL_INVALID_MEM_OBJECT -38
  110. #define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39
  111. #define CL_INVALID_IMAGE_SIZE -40
  112. #define CL_INVALID_SAMPLER -41
  113. #define CL_INVALID_BINARY -42
  114. #define CL_INVALID_BUILD_OPTIONS -43
  115. #define CL_INVALID_PROGRAM -44
  116. #define CL_INVALID_PROGRAM_EXECUTABLE -45
  117. #define CL_INVALID_KERNEL_NAME -46
  118. #define CL_INVALID_KERNEL_DEFINITION -47
  119. #define CL_INVALID_KERNEL -48
  120. #define CL_INVALID_ARG_INDEX -49
  121. #define CL_INVALID_ARG_VALUE -50
  122. #define CL_INVALID_ARG_SIZE -51
  123. #define CL_INVALID_KERNEL_ARGS -52
  124. #define CL_INVALID_WORK_DIMENSION -53
  125. #define CL_INVALID_WORK_GROUP_SIZE -54
  126. #define CL_INVALID_WORK_ITEM_SIZE -55
  127. #define CL_INVALID_GLOBAL_OFFSET -56
  128. #define CL_INVALID_EVENT_WAIT_LIST -57
  129. #define CL_INVALID_EVENT -58
  130. #define CL_INVALID_OPERATION -59
  131. #define CL_INVALID_GL_OBJECT -60
  132. #define CL_INVALID_BUFFER_SIZE -61
  133. #define CL_INVALID_MIP_LEVEL -62
  134. #define CL_INVALID_GLOBAL_WORK_SIZE -63
  135. #define CL_INVALID_PROPERTY -64
  136. /* OpenCL Version */
  137. #define CL_VERSION_1_0 1
  138. #define CL_VERSION_1_1 1
  139. /* cl_bool */
  140. #define CL_FALSE 0
  141. #define CL_TRUE 1
  142. /* cl_platform_info */
  143. #define CL_PLATFORM_PROFILE 0x0900
  144. #define CL_PLATFORM_VERSION 0x0901
  145. #define CL_PLATFORM_NAME 0x0902
  146. #define CL_PLATFORM_VENDOR 0x0903
  147. #define CL_PLATFORM_EXTENSIONS 0x0904
  148. /* cl_device_type - bitfield */
  149. #define CL_DEVICE_TYPE_DEFAULT (1 << 0)
  150. #define CL_DEVICE_TYPE_CPU (1 << 1)
  151. #define CL_DEVICE_TYPE_GPU (1 << 2)
  152. #define CL_DEVICE_TYPE_ACCELERATOR (1 << 3)
  153. #define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
  154. /* cl_device_info */
  155. #define CL_DEVICE_TYPE 0x1000
  156. #define CL_DEVICE_VENDOR_ID 0x1001
  157. #define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
  158. #define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
  159. #define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
  160. #define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
  161. #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
  162. #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
  163. #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
  164. #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009
  165. #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A
  166. #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B
  167. #define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C
  168. #define CL_DEVICE_ADDRESS_BITS 0x100D
  169. #define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E
  170. #define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F
  171. #define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010
  172. #define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011
  173. #define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012
  174. #define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013
  175. #define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014
  176. #define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015
  177. #define CL_DEVICE_IMAGE_SUPPORT 0x1016
  178. #define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017
  179. #define CL_DEVICE_MAX_SAMPLERS 0x1018
  180. #define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019
  181. #define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A
  182. #define CL_DEVICE_SINGLE_FP_CONFIG 0x101B
  183. #define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C
  184. #define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D
  185. #define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E
  186. #define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F
  187. #define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020
  188. #define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021
  189. #define CL_DEVICE_LOCAL_MEM_TYPE 0x1022
  190. #define CL_DEVICE_LOCAL_MEM_SIZE 0x1023
  191. #define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024
  192. #define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025
  193. #define CL_DEVICE_ENDIAN_LITTLE 0x1026
  194. #define CL_DEVICE_AVAILABLE 0x1027
  195. #define CL_DEVICE_COMPILER_AVAILABLE 0x1028
  196. #define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029
  197. #define CL_DEVICE_QUEUE_PROPERTIES 0x102A
  198. #define CL_DEVICE_NAME 0x102B
  199. #define CL_DEVICE_VENDOR 0x102C
  200. #define CL_DRIVER_VERSION 0x102D
  201. #define CL_DEVICE_PROFILE 0x102E
  202. #define CL_DEVICE_VERSION 0x102F
  203. #define CL_DEVICE_EXTENSIONS 0x1030
  204. #define CL_DEVICE_PLATFORM 0x1031
  205. /* 0x1032 reserved for CL_DEVICE_DOUBLE_FP_CONFIG */
  206. /* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */
  207. #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
  208. #define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035
  209. #define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
  210. #define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
  211. #define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
  212. #define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039
  213. #define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A
  214. #define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B
  215. #define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
  216. #define CL_DEVICE_OPENCL_C_VERSION 0x103D
  217. /* cl_device_fp_config - bitfield */
  218. #define CL_FP_DENORM (1 << 0)
  219. #define CL_FP_INF_NAN (1 << 1)
  220. #define CL_FP_ROUND_TO_NEAREST (1 << 2)
  221. #define CL_FP_ROUND_TO_ZERO (1 << 3)
  222. #define CL_FP_ROUND_TO_INF (1 << 4)
  223. #define CL_FP_FMA (1 << 5)
  224. #define CL_FP_SOFT_FLOAT (1 << 6)
  225. /* cl_device_mem_cache_type */
  226. #define CL_NONE 0x0
  227. #define CL_READ_ONLY_CACHE 0x1
  228. #define CL_READ_WRITE_CACHE 0x2
  229. /* cl_device_local_mem_type */
  230. #define CL_LOCAL 0x1
  231. #define CL_GLOBAL 0x2
  232. /* cl_device_exec_capabilities - bitfield */
  233. #define CL_EXEC_KERNEL (1 << 0)
  234. #define CL_EXEC_NATIVE_KERNEL (1 << 1)
  235. /* cl_command_queue_properties - bitfield */
  236. #define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0)
  237. #define CL_QUEUE_PROFILING_ENABLE (1 << 1)
  238. /* cl_context_info */
  239. #define CL_CONTEXT_REFERENCE_COUNT 0x1080
  240. #define CL_CONTEXT_DEVICES 0x1081
  241. #define CL_CONTEXT_PROPERTIES 0x1082
  242. #define CL_CONTEXT_NUM_DEVICES 0x1083
  243. /* cl_context_info + cl_context_properties */
  244. #define CL_CONTEXT_PLATFORM 0x1084
  245. /* cl_command_queue_info */
  246. #define CL_QUEUE_CONTEXT 0x1090
  247. #define CL_QUEUE_DEVICE 0x1091
  248. #define CL_QUEUE_REFERENCE_COUNT 0x1092
  249. #define CL_QUEUE_PROPERTIES 0x1093
  250. /* cl_mem_flags - bitfield */
  251. #define CL_MEM_READ_WRITE (1 << 0)
  252. #define CL_MEM_WRITE_ONLY (1 << 1)
  253. #define CL_MEM_READ_ONLY (1 << 2)
  254. #define CL_MEM_USE_HOST_PTR (1 << 3)
  255. #define CL_MEM_ALLOC_HOST_PTR (1 << 4)
  256. #define CL_MEM_COPY_HOST_PTR (1 << 5)
  257. /* cl_channel_order */
  258. #define CL_R 0x10B0
  259. #define CL_A 0x10B1
  260. #define CL_RG 0x10B2
  261. #define CL_RA 0x10B3
  262. #define CL_RGB 0x10B4
  263. #define CL_RGBA 0x10B5
  264. #define CL_BGRA 0x10B6
  265. #define CL_ARGB 0x10B7
  266. #define CL_INTENSITY 0x10B8
  267. #define CL_LUMINANCE 0x10B9
  268. #define CL_Rx 0x10BA
  269. #define CL_RGx 0x10BB
  270. #define CL_RGBx 0x10BC
  271. /* cl_channel_type */
  272. #define CL_SNORM_INT8 0x10D0
  273. #define CL_SNORM_INT16 0x10D1
  274. #define CL_UNORM_INT8 0x10D2
  275. #define CL_UNORM_INT16 0x10D3
  276. #define CL_UNORM_SHORT_565 0x10D4
  277. #define CL_UNORM_SHORT_555 0x10D5
  278. #define CL_UNORM_INT_101010 0x10D6
  279. #define CL_SIGNED_INT8 0x10D7
  280. #define CL_SIGNED_INT16 0x10D8
  281. #define CL_SIGNED_INT32 0x10D9
  282. #define CL_UNSIGNED_INT8 0x10DA
  283. #define CL_UNSIGNED_INT16 0x10DB
  284. #define CL_UNSIGNED_INT32 0x10DC
  285. #define CL_HALF_FLOAT 0x10DD
  286. #define CL_FLOAT 0x10DE
  287. /* cl_mem_object_type */
  288. #define CL_MEM_OBJECT_BUFFER 0x10F0
  289. #define CL_MEM_OBJECT_IMAGE2D 0x10F1
  290. #define CL_MEM_OBJECT_IMAGE3D 0x10F2
  291. /* cl_mem_info */
  292. #define CL_MEM_TYPE 0x1100
  293. #define CL_MEM_FLAGS 0x1101
  294. #define CL_MEM_SIZE 0x1102
  295. #define CL_MEM_HOST_PTR 0x1103
  296. #define CL_MEM_MAP_COUNT 0x1104
  297. #define CL_MEM_REFERENCE_COUNT 0x1105
  298. #define CL_MEM_CONTEXT 0x1106
  299. #define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107
  300. #define CL_MEM_OFFSET 0x1108
  301. /* cl_image_info */
  302. #define CL_IMAGE_FORMAT 0x1110
  303. #define CL_IMAGE_ELEMENT_SIZE 0x1111
  304. #define CL_IMAGE_ROW_PITCH 0x1112
  305. #define CL_IMAGE_SLICE_PITCH 0x1113
  306. #define CL_IMAGE_WIDTH 0x1114
  307. #define CL_IMAGE_HEIGHT 0x1115
  308. #define CL_IMAGE_DEPTH 0x1116
  309. /* cl_addressing_mode */
  310. #define CL_ADDRESS_NONE 0x1130
  311. #define CL_ADDRESS_CLAMP_TO_EDGE 0x1131
  312. #define CL_ADDRESS_CLAMP 0x1132
  313. #define CL_ADDRESS_REPEAT 0x1133
  314. #define CL_ADDRESS_MIRRORED_REPEAT 0x1134
  315. /* cl_filter_mode */
  316. #define CL_FILTER_NEAREST 0x1140
  317. #define CL_FILTER_LINEAR 0x1141
  318. /* cl_sampler_info */
  319. #define CL_SAMPLER_REFERENCE_COUNT 0x1150
  320. #define CL_SAMPLER_CONTEXT 0x1151
  321. #define CL_SAMPLER_NORMALIZED_COORDS 0x1152
  322. #define CL_SAMPLER_ADDRESSING_MODE 0x1153
  323. #define CL_SAMPLER_FILTER_MODE 0x1154
  324. /* cl_map_flags - bitfield */
  325. #define CL_MAP_READ (1 << 0)
  326. #define CL_MAP_WRITE (1 << 1)
  327. /* cl_program_info */
  328. #define CL_PROGRAM_REFERENCE_COUNT 0x1160
  329. #define CL_PROGRAM_CONTEXT 0x1161
  330. #define CL_PROGRAM_NUM_DEVICES 0x1162
  331. #define CL_PROGRAM_DEVICES 0x1163
  332. #define CL_PROGRAM_SOURCE 0x1164
  333. #define CL_PROGRAM_BINARY_SIZES 0x1165
  334. #define CL_PROGRAM_BINARIES 0x1166
  335. /* cl_program_build_info */
  336. #define CL_PROGRAM_BUILD_STATUS 0x1181
  337. #define CL_PROGRAM_BUILD_OPTIONS 0x1182
  338. #define CL_PROGRAM_BUILD_LOG 0x1183
  339. /* cl_build_status */
  340. #define CL_BUILD_SUCCESS 0
  341. #define CL_BUILD_NONE -1
  342. #define CL_BUILD_ERROR -2
  343. #define CL_BUILD_IN_PROGRESS -3
  344. /* cl_kernel_info */
  345. #define CL_KERNEL_FUNCTION_NAME 0x1190
  346. #define CL_KERNEL_NUM_ARGS 0x1191
  347. #define CL_KERNEL_REFERENCE_COUNT 0x1192
  348. #define CL_KERNEL_CONTEXT 0x1193
  349. #define CL_KERNEL_PROGRAM 0x1194
  350. /* cl_kernel_work_group_info */
  351. #define CL_KERNEL_WORK_GROUP_SIZE 0x11B0
  352. #define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1
  353. #define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2
  354. #define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
  355. #define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4
  356. /* cl_event_info */
  357. #define CL_EVENT_COMMAND_QUEUE 0x11D0
  358. #define CL_EVENT_COMMAND_TYPE 0x11D1
  359. #define CL_EVENT_REFERENCE_COUNT 0x11D2
  360. #define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3
  361. #define CL_EVENT_CONTEXT 0x11D4
  362. /* cl_command_type */
  363. #define CL_COMMAND_NDRANGE_KERNEL 0x11F0
  364. #define CL_COMMAND_TASK 0x11F1
  365. #define CL_COMMAND_NATIVE_KERNEL 0x11F2
  366. #define CL_COMMAND_READ_BUFFER 0x11F3
  367. #define CL_COMMAND_WRITE_BUFFER 0x11F4
  368. #define CL_COMMAND_COPY_BUFFER 0x11F5
  369. #define CL_COMMAND_READ_IMAGE 0x11F6
  370. #define CL_COMMAND_WRITE_IMAGE 0x11F7
  371. #define CL_COMMAND_COPY_IMAGE 0x11F8
  372. #define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9
  373. #define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA
  374. #define CL_COMMAND_MAP_BUFFER 0x11FB
  375. #define CL_COMMAND_MAP_IMAGE 0x11FC
  376. #define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD
  377. #define CL_COMMAND_MARKER 0x11FE
  378. #define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF
  379. #define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200
  380. #define CL_COMMAND_READ_BUFFER_RECT 0x1201
  381. #define CL_COMMAND_WRITE_BUFFER_RECT 0x1202
  382. #define CL_COMMAND_COPY_BUFFER_RECT 0x1203
  383. #define CL_COMMAND_USER 0x1204
  384. /* command execution status */
  385. #define CL_COMPLETE 0x0
  386. #define CL_RUNNING 0x1
  387. #define CL_SUBMITTED 0x2
  388. #define CL_QUEUED 0x3
  389. /* cl_buffer_create_type */
  390. #define CL_BUFFER_CREATE_TYPE_REGION 0x1220
  391. /* cl_profiling_info */
  392. #define CL_PROFILING_COMMAND_QUEUED 0x1280
  393. #define CL_PROFILING_COMMAND_SUBMIT 0x1281
  394. #define CL_PROFILING_COMMAND_START 0x1282
  395. #define CL_PROFILING_COMMAND_END 0x1283
  396. /********************************************************************************************************/
  397. /* Platform API */
  398. extern CL_API_ENTRY cl_int CL_API_CALL
  399. clGetPlatformIDs(cl_uint /* num_entries */,
  400. cl_platform_id * /* platforms */,
  401. cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0;
  402. extern CL_API_ENTRY cl_int CL_API_CALL
  403. clGetPlatformInfo(cl_platform_id /* platform */,
  404. cl_platform_info /* param_name */,
  405. size_t /* param_value_size */,
  406. void * /* param_value */,
  407. size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
  408. /* Device APIs */
  409. extern CL_API_ENTRY cl_int CL_API_CALL
  410. clGetDeviceIDs(cl_platform_id /* platform */,
  411. cl_device_type /* device_type */,
  412. cl_uint /* num_entries */,
  413. cl_device_id * /* devices */,
  414. cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0;
  415. extern CL_API_ENTRY cl_int CL_API_CALL
  416. clGetDeviceInfo(cl_device_id /* device */,
  417. cl_device_info /* param_name */,
  418. size_t /* param_value_size */,
  419. void * /* param_value */,
  420. size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
  421. /* Context APIs */
  422. extern CL_API_ENTRY cl_context CL_API_CALL
  423. clCreateContext(const cl_context_properties * /* properties */,
  424. cl_uint /* num_devices */,
  425. const cl_device_id * /* devices */,
  426. void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
  427. void * /* user_data */,
  428. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
  429. extern CL_API_ENTRY cl_context CL_API_CALL
  430. clCreateContextFromType(const cl_context_properties * /* properties */,
  431. cl_device_type /* device_type */,
  432. void (CL_CALLBACK * /* pfn_notify*/ )(const char *, const void *, size_t, void *),
  433. void * /* user_data */,
  434. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
  435. extern CL_API_ENTRY cl_int CL_API_CALL
  436. clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
  437. extern CL_API_ENTRY cl_int CL_API_CALL
  438. clReleaseContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
  439. extern CL_API_ENTRY cl_int CL_API_CALL
  440. clGetContextInfo(cl_context /* context */,
  441. cl_context_info /* param_name */,
  442. size_t /* param_value_size */,
  443. void * /* param_value */,
  444. size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
  445. /* Command Queue APIs */
  446. extern CL_API_ENTRY cl_command_queue CL_API_CALL
  447. clCreateCommandQueue(cl_context /* context */,
  448. cl_device_id /* device */,
  449. cl_command_queue_properties /* properties */,
  450. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
  451. extern CL_API_ENTRY cl_int CL_API_CALL
  452. clRetainCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
  453. extern CL_API_ENTRY cl_int CL_API_CALL
  454. clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
  455. extern CL_API_ENTRY cl_int CL_API_CALL
  456. clGetCommandQueueInfo(cl_command_queue /* command_queue */,
  457. cl_command_queue_info /* param_name */,
  458. size_t /* param_value_size */,
  459. void * /* param_value */,
  460. size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
  461. #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
  462. #warning CL_USE_DEPRECATED_OPENCL_1_0_APIS is defined. These APIs are unsupported and untested in OpenCL 1.1!
  463. /*
  464. * WARNING:
  465. * This API introduces mutable state into the OpenCL implementation. It has been REMOVED
  466. * to better facilitate thread safety. The 1.0 API is not thread safe. It is not tested by the
  467. * OpenCL 1.1 conformance test, and consequently may not work or may not work dependably.
  468. * It is likely to be non-performant. Use of this API is not advised. Use at your own risk.
  469. *
  470. * Software developers previously relying on this API are instructed to set the command queue
  471. * properties when creating the queue, instead.
  472. */
  473. extern CL_API_ENTRY cl_int CL_API_CALL
  474. clSetCommandQueueProperty(cl_command_queue /* command_queue */,
  475. cl_command_queue_properties /* properties */,
  476. cl_bool /* enable */,
  477. cl_command_queue_properties * /* old_properties */) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED;
  478. #endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */
  479. /* Memory Object APIs */
  480. extern CL_API_ENTRY cl_mem CL_API_CALL
  481. clCreateBuffer(cl_context /* context */,
  482. cl_mem_flags /* flags */,
  483. size_t /* size */,
  484. void * /* host_ptr */,
  485. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
  486. extern CL_API_ENTRY cl_mem CL_API_CALL
  487. clCreateSubBuffer(cl_mem /* buffer */,
  488. cl_mem_flags /* flags */,
  489. cl_buffer_create_type /* buffer_create_type */,
  490. const void * /* buffer_create_info */,
  491. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
  492. extern CL_API_ENTRY cl_mem CL_API_CALL
  493. clCreateImage2D(cl_context /* context */,
  494. cl_mem_flags /* flags */,
  495. const cl_image_format * /* image_format */,
  496. size_t /* image_width */,
  497. size_t /* image_height */,
  498. size_t /* image_row_pitch */,
  499. void * /* host_ptr */,
  500. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
  501. extern CL_API_ENTRY cl_mem CL_API_CALL
  502. clCreateImage3D(cl_context /* context */,
  503. cl_mem_flags /* flags */,
  504. const cl_image_format * /* image_format */,
  505. size_t /* image_width */,
  506. size_t /* image_height */,
  507. size_t /* image_depth */,
  508. size_t /* image_row_pitch */,
  509. size_t /* image_slice_pitch */,
  510. void * /* host_ptr */,
  511. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
  512. extern CL_API_ENTRY cl_int CL_API_CALL
  513. clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
  514. extern CL_API_ENTRY cl_int CL_API_CALL
  515. clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
  516. extern CL_API_ENTRY cl_int CL_API_CALL
  517. clGetSupportedImageFormats(cl_context /* context */,
  518. cl_mem_flags /* flags */,
  519. cl_mem_object_type /* image_type */,
  520. cl_uint /* num_entries */,
  521. cl_image_format * /* image_formats */,
  522. cl_uint * /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0;
  523. extern CL_API_ENTRY cl_int CL_API_CALL
  524. clGetMemObjectInfo(cl_mem /* memobj */,
  525. cl_mem_info /* param_name */,
  526. size_t /* param_value_size */,
  527. void * /* param_value */,
  528. size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
  529. extern CL_API_ENTRY cl_int CL_API_CALL
  530. clGetImageInfo(cl_mem /* image */,
  531. cl_image_info /* param_name */,
  532. size_t /* param_value_size */,
  533. void * /* param_value */,
  534. size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
  535. extern CL_API_ENTRY cl_int CL_API_CALL
  536. clSetMemObjectDestructorCallback( cl_mem /* memobj */,
  537. void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
  538. void * /*user_data */ ) CL_API_SUFFIX__VERSION_1_1;
  539. /* Sampler APIs */
  540. extern CL_API_ENTRY cl_sampler CL_API_CALL
  541. clCreateSampler(cl_context /* context */,
  542. cl_bool /* normalized_coords */,
  543. cl_addressing_mode /* addressing_mode */,
  544. cl_filter_mode /* filter_mode */,
  545. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
  546. extern CL_API_ENTRY cl_int CL_API_CALL
  547. clRetainSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
  548. extern CL_API_ENTRY cl_int CL_API_CALL
  549. clReleaseSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
  550. extern CL_API_ENTRY cl_int CL_API_CALL
  551. clGetSamplerInfo(cl_sampler /* sampler */,
  552. cl_sampler_info /* param_name */,
  553. size_t /* param_value_size */,
  554. void * /* param_value */,
  555. size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
  556. /* Program Object APIs */
  557. extern CL_API_ENTRY cl_program CL_API_CALL
  558. clCreateProgramWithSource(cl_context /* context */,
  559. cl_uint /* count */,
  560. const char ** /* strings */,
  561. const size_t * /* lengths */,
  562. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
  563. extern CL_API_ENTRY cl_program CL_API_CALL
  564. clCreateProgramWithBinary(cl_context /* context */,
  565. cl_uint /* num_devices */,
  566. const cl_device_id * /* device_list */,
  567. const size_t * /* lengths */,
  568. const unsigned char ** /* binaries */,
  569. cl_int * /* binary_status */,
  570. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
  571. extern CL_API_ENTRY cl_int CL_API_CALL
  572. clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
  573. extern CL_API_ENTRY cl_int CL_API_CALL
  574. clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
  575. extern CL_API_ENTRY cl_int CL_API_CALL
  576. clBuildProgram(cl_program /* program */,
  577. cl_uint /* num_devices */,
  578. const cl_device_id * /* device_list */,
  579. const char * /* options */,
  580. void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
  581. void * /* user_data */) CL_API_SUFFIX__VERSION_1_0;
  582. extern CL_API_ENTRY cl_int CL_API_CALL
  583. clUnloadCompiler(void) CL_API_SUFFIX__VERSION_1_0;
  584. extern CL_API_ENTRY cl_int CL_API_CALL
  585. clGetProgramInfo(cl_program /* program */,
  586. cl_program_info /* param_name */,
  587. size_t /* param_value_size */,
  588. void * /* param_value */,
  589. size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
  590. extern CL_API_ENTRY cl_int CL_API_CALL
  591. clGetProgramBuildInfo(cl_program /* program */,
  592. cl_device_id /* device */,
  593. cl_program_build_info /* param_name */,
  594. size_t /* param_value_size */,
  595. void * /* param_value */,
  596. size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
  597. /* Kernel Object APIs */
  598. extern CL_API_ENTRY cl_kernel CL_API_CALL
  599. clCreateKernel(cl_program /* program */,
  600. const char * /* kernel_name */,
  601. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
  602. extern CL_API_ENTRY cl_int CL_API_CALL
  603. clCreateKernelsInProgram(cl_program /* program */,
  604. cl_uint /* num_kernels */,
  605. cl_kernel * /* kernels */,
  606. cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0;
  607. extern CL_API_ENTRY cl_int CL_API_CALL
  608. clRetainKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
  609. extern CL_API_ENTRY cl_int CL_API_CALL
  610. clReleaseKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
  611. extern CL_API_ENTRY cl_int CL_API_CALL
  612. clSetKernelArg(cl_kernel /* kernel */,
  613. cl_uint /* arg_index */,
  614. size_t /* arg_size */,
  615. const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0;
  616. extern CL_API_ENTRY cl_int CL_API_CALL
  617. clGetKernelInfo(cl_kernel /* kernel */,
  618. cl_kernel_info /* param_name */,
  619. size_t /* param_value_size */,
  620. void * /* param_value */,
  621. size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
  622. extern CL_API_ENTRY cl_int CL_API_CALL
  623. clGetKernelWorkGroupInfo(cl_kernel /* kernel */,
  624. cl_device_id /* device */,
  625. cl_kernel_work_group_info /* param_name */,
  626. size_t /* param_value_size */,
  627. void * /* param_value */,
  628. size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
  629. /* Event Object APIs */
  630. extern CL_API_ENTRY cl_int CL_API_CALL
  631. clWaitForEvents(cl_uint /* num_events */,
  632. const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
  633. extern CL_API_ENTRY cl_int CL_API_CALL
  634. clGetEventInfo(cl_event /* event */,
  635. cl_event_info /* param_name */,
  636. size_t /* param_value_size */,
  637. void * /* param_value */,
  638. size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
  639. extern CL_API_ENTRY cl_event CL_API_CALL
  640. clCreateUserEvent(cl_context /* context */,
  641. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
  642. extern CL_API_ENTRY cl_int CL_API_CALL
  643. clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
  644. extern CL_API_ENTRY cl_int CL_API_CALL
  645. clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
  646. extern CL_API_ENTRY cl_int CL_API_CALL
  647. clSetUserEventStatus(cl_event /* event */,
  648. cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
  649. extern CL_API_ENTRY cl_int CL_API_CALL
  650. clSetEventCallback( cl_event /* event */,
  651. cl_int /* command_exec_callback_type */,
  652. void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
  653. void * /* user_data */) CL_API_SUFFIX__VERSION_1_1;
  654. /* Profiling APIs */
  655. extern CL_API_ENTRY cl_int CL_API_CALL
  656. clGetEventProfilingInfo(cl_event /* event */,
  657. cl_profiling_info /* param_name */,
  658. size_t /* param_value_size */,
  659. void * /* param_value */,
  660. size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
  661. /* Flush and Finish APIs */
  662. extern CL_API_ENTRY cl_int CL_API_CALL
  663. clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
  664. extern CL_API_ENTRY cl_int CL_API_CALL
  665. clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
  666. /* Enqueued Commands APIs */
  667. extern CL_API_ENTRY cl_int CL_API_CALL
  668. clEnqueueReadBuffer(cl_command_queue /* command_queue */,
  669. cl_mem /* buffer */,
  670. cl_bool /* blocking_read */,
  671. size_t /* offset */,
  672. size_t /* cb */,
  673. void * /* ptr */,
  674. cl_uint /* num_events_in_wait_list */,
  675. const cl_event * /* event_wait_list */,
  676. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
  677. extern CL_API_ENTRY cl_int CL_API_CALL
  678. clEnqueueReadBufferRect(cl_command_queue /* command_queue */,
  679. cl_mem /* buffer */,
  680. cl_bool /* blocking_read */,
  681. const size_t * /* buffer_origin */,
  682. const size_t * /* host_origin */,
  683. const size_t * /* region */,
  684. size_t /* buffer_row_pitch */,
  685. size_t /* buffer_slice_pitch */,
  686. size_t /* host_row_pitch */,
  687. size_t /* host_slice_pitch */,
  688. void * /* ptr */,
  689. cl_uint /* num_events_in_wait_list */,
  690. const cl_event * /* event_wait_list */,
  691. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
  692. extern CL_API_ENTRY cl_int CL_API_CALL
  693. clEnqueueWriteBuffer(cl_command_queue /* command_queue */,
  694. cl_mem /* buffer */,
  695. cl_bool /* blocking_write */,
  696. size_t /* offset */,
  697. size_t /* cb */,
  698. const void * /* ptr */,
  699. cl_uint /* num_events_in_wait_list */,
  700. const cl_event * /* event_wait_list */,
  701. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
  702. extern CL_API_ENTRY cl_int CL_API_CALL
  703. clEnqueueWriteBufferRect(cl_command_queue /* command_queue */,
  704. cl_mem /* buffer */,
  705. cl_bool /* blocking_write */,
  706. const size_t * /* buffer_origin */,
  707. const size_t * /* host_origin */,
  708. const size_t * /* region */,
  709. size_t /* buffer_row_pitch */,
  710. size_t /* buffer_slice_pitch */,
  711. size_t /* host_row_pitch */,
  712. size_t /* host_slice_pitch */,
  713. const void * /* ptr */,
  714. cl_uint /* num_events_in_wait_list */,
  715. const cl_event * /* event_wait_list */,
  716. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
  717. extern CL_API_ENTRY cl_int CL_API_CALL
  718. clEnqueueCopyBuffer(cl_command_queue /* command_queue */,
  719. cl_mem /* src_buffer */,
  720. cl_mem /* dst_buffer */,
  721. size_t /* src_offset */,
  722. size_t /* dst_offset */,
  723. size_t /* cb */,
  724. cl_uint /* num_events_in_wait_list */,
  725. const cl_event * /* event_wait_list */,
  726. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
  727. extern CL_API_ENTRY cl_int CL_API_CALL
  728. clEnqueueCopyBufferRect(cl_command_queue /* command_queue */,
  729. cl_mem /* src_buffer */,
  730. cl_mem /* dst_buffer */,
  731. const size_t * /* src_origin */,
  732. const size_t * /* dst_origin */,
  733. const size_t * /* region */,
  734. size_t /* src_row_pitch */,
  735. size_t /* src_slice_pitch */,
  736. size_t /* dst_row_pitch */,
  737. size_t /* dst_slice_pitch */,
  738. cl_uint /* num_events_in_wait_list */,
  739. const cl_event * /* event_wait_list */,
  740. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
  741. extern CL_API_ENTRY cl_int CL_API_CALL
  742. clEnqueueReadImage(cl_command_queue /* command_queue */,
  743. cl_mem /* image */,
  744. cl_bool /* blocking_read */,
  745. const size_t * /* origin[3] */,
  746. const size_t * /* region[3] */,
  747. size_t /* row_pitch */,
  748. size_t /* slice_pitch */,
  749. void * /* ptr */,
  750. cl_uint /* num_events_in_wait_list */,
  751. const cl_event * /* event_wait_list */,
  752. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
  753. extern CL_API_ENTRY cl_int CL_API_CALL
  754. clEnqueueWriteImage(cl_command_queue /* command_queue */,
  755. cl_mem /* image */,
  756. cl_bool /* blocking_write */,
  757. const size_t * /* origin[3] */,
  758. const size_t * /* region[3] */,
  759. size_t /* input_row_pitch */,
  760. size_t /* input_slice_pitch */,
  761. const void * /* ptr */,
  762. cl_uint /* num_events_in_wait_list */,
  763. const cl_event * /* event_wait_list */,
  764. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
  765. extern CL_API_ENTRY cl_int CL_API_CALL
  766. clEnqueueCopyImage(cl_command_queue /* command_queue */,
  767. cl_mem /* src_image */,
  768. cl_mem /* dst_image */,
  769. const size_t * /* src_origin[3] */,
  770. const size_t * /* dst_origin[3] */,
  771. const size_t * /* region[3] */,
  772. cl_uint /* num_events_in_wait_list */,
  773. const cl_event * /* event_wait_list */,
  774. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
  775. extern CL_API_ENTRY cl_int CL_API_CALL
  776. clEnqueueCopyImageToBuffer(cl_command_queue /* command_queue */,
  777. cl_mem /* src_image */,
  778. cl_mem /* dst_buffer */,
  779. const size_t * /* src_origin[3] */,
  780. const size_t * /* region[3] */,
  781. size_t /* dst_offset */,
  782. cl_uint /* num_events_in_wait_list */,
  783. const cl_event * /* event_wait_list */,
  784. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
  785. extern CL_API_ENTRY cl_int CL_API_CALL
  786. clEnqueueCopyBufferToImage(cl_command_queue /* command_queue */,
  787. cl_mem /* src_buffer */,
  788. cl_mem /* dst_image */,
  789. size_t /* src_offset */,
  790. const size_t * /* dst_origin[3] */,
  791. const size_t * /* region[3] */,
  792. cl_uint /* num_events_in_wait_list */,
  793. const cl_event * /* event_wait_list */,
  794. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
  795. extern CL_API_ENTRY void * CL_API_CALL
  796. clEnqueueMapBuffer(cl_command_queue /* command_queue */,
  797. cl_mem /* buffer */,
  798. cl_bool /* blocking_map */,
  799. cl_map_flags /* map_flags */,
  800. size_t /* offset */,
  801. size_t /* cb */,
  802. cl_uint /* num_events_in_wait_list */,
  803. const cl_event * /* event_wait_list */,
  804. cl_event * /* event */,
  805. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
  806. extern CL_API_ENTRY void * CL_API_CALL
  807. clEnqueueMapImage(cl_command_queue /* command_queue */,
  808. cl_mem /* image */,
  809. cl_bool /* blocking_map */,
  810. cl_map_flags /* map_flags */,
  811. const size_t * /* origin[3] */,
  812. const size_t * /* region[3] */,
  813. size_t * /* image_row_pitch */,
  814. size_t * /* image_slice_pitch */,
  815. cl_uint /* num_events_in_wait_list */,
  816. const cl_event * /* event_wait_list */,
  817. cl_event * /* event */,
  818. cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
  819. extern CL_API_ENTRY cl_int CL_API_CALL
  820. clEnqueueUnmapMemObject(cl_command_queue /* command_queue */,
  821. cl_mem /* memobj */,
  822. void * /* mapped_ptr */,
  823. cl_uint /* num_events_in_wait_list */,
  824. const cl_event * /* event_wait_list */,
  825. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
  826. extern CL_API_ENTRY cl_int CL_API_CALL
  827. clEnqueueNDRangeKernel(cl_command_queue /* command_queue */,
  828. cl_kernel /* kernel */,
  829. cl_uint /* work_dim */,
  830. const size_t * /* global_work_offset */,
  831. const size_t * /* global_work_size */,
  832. const size_t * /* local_work_size */,
  833. cl_uint /* num_events_in_wait_list */,
  834. const cl_event * /* event_wait_list */,
  835. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
  836. extern CL_API_ENTRY cl_int CL_API_CALL
  837. clEnqueueTask(cl_command_queue /* command_queue */,
  838. cl_kernel /* kernel */,
  839. cl_uint /* num_events_in_wait_list */,
  840. const cl_event * /* event_wait_list */,
  841. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
  842. extern CL_API_ENTRY cl_int CL_API_CALL
  843. clEnqueueNativeKernel(cl_command_queue /* command_queue */,
  844. void (CL_CALLBACK *user_func)(void *),
  845. void * /* args */,
  846. size_t /* cb_args */,
  847. cl_uint /* num_mem_objects */,
  848. const cl_mem * /* mem_list */,
  849. const void ** /* args_mem_loc */,
  850. cl_uint /* num_events_in_wait_list */,
  851. const cl_event * /* event_wait_list */,
  852. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
  853. extern CL_API_ENTRY cl_int CL_API_CALL
  854. clEnqueueMarker(cl_command_queue /* command_queue */,
  855. cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
  856. extern CL_API_ENTRY cl_int CL_API_CALL
  857. clEnqueueWaitForEvents(cl_command_queue /* command_queue */,
  858. cl_uint /* num_events */,
  859. const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
  860. extern CL_API_ENTRY cl_int CL_API_CALL
  861. clEnqueueBarrier(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
  862. /* Extension function access
  863. *
  864. * Returns the extension function address for the given function name,
  865. * or NULL if a valid function can not be found. The client must
  866. * check to make sure the address is not NULL, before using or
  867. * calling the returned function address.
  868. */
  869. extern CL_API_ENTRY void * CL_API_CALL clGetExtensionFunctionAddress(const char * /* func_name */) CL_API_SUFFIX__VERSION_1_0;
  870. #ifdef __cplusplus
  871. }
  872. #endif
  873. #endif /* __OPENCL_CL_H */