comparison opencl/c/orgHeaders/cl.h @ 3:c78ffc9a7434 default tip

* corrected import declarations * fixed bug in Program
author Trass3r
date Thu, 15 Apr 2010 03:20:03 +0200
parents 3cea44337083
children
comparison
equal deleted inserted replaced
2:01d502efe0c4 3:c78ffc9a7434
19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 21 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
22 ******************************************************************************/ 22 ******************************************************************************/
23 23
24 /* $Revision: 9283 $ on $Date: 2009-10-14 10:18:57 -0700 (Wed, 14 Oct 2009) $ */ 24 /* $Revision: 10424 $ on $Date: 2010-02-17 14:34:49 -0800 (Wed, 17 Feb 2010) $ */
25 25
26 #ifndef __OPENCL_CL_H 26 #ifndef __OPENCL_CL_H
27 #define __OPENCL_CL_H 27 #define __OPENCL_CL_H
28 28
29 #ifdef __APPLE__ 29 #ifdef __APPLE__
89 89
90 90
91 91
92 /******************************************************************************/ 92 /******************************************************************************/
93 93
94 // Error Codes 94 /* Error Codes */
95 #define CL_SUCCESS 0 95 #define CL_SUCCESS 0
96 #define CL_DEVICE_NOT_FOUND -1 96 #define CL_DEVICE_NOT_FOUND -1
97 #define CL_DEVICE_NOT_AVAILABLE -2 97 #define CL_DEVICE_NOT_AVAILABLE -2
98 #define CL_COMPILER_NOT_AVAILABLE -3 98 #define CL_COMPILER_NOT_AVAILABLE -3
99 #define CL_MEM_OBJECT_ALLOCATION_FAILURE -4 99 #define CL_MEM_OBJECT_ALLOCATION_FAILURE -4
139 #define CL_INVALID_GL_OBJECT -60 139 #define CL_INVALID_GL_OBJECT -60
140 #define CL_INVALID_BUFFER_SIZE -61 140 #define CL_INVALID_BUFFER_SIZE -61
141 #define CL_INVALID_MIP_LEVEL -62 141 #define CL_INVALID_MIP_LEVEL -62
142 #define CL_INVALID_GLOBAL_WORK_SIZE -63 142 #define CL_INVALID_GLOBAL_WORK_SIZE -63
143 143
144 // OpenCL Version 144 /* OpenCL Version */
145 #define CL_VERSION_1_0 1 145 #define CL_VERSION_1_0 1
146 146
147 // cl_bool 147 /* cl_bool */
148 #define CL_FALSE 0 148 #define CL_FALSE 0
149 #define CL_TRUE 1 149 #define CL_TRUE 1
150 150
151 // cl_platform_info 151 /* cl_platform_info */
152 #define CL_PLATFORM_PROFILE 0x0900 152 #define CL_PLATFORM_PROFILE 0x0900
153 #define CL_PLATFORM_VERSION 0x0901 153 #define CL_PLATFORM_VERSION 0x0901
154 #define CL_PLATFORM_NAME 0x0902 154 #define CL_PLATFORM_NAME 0x0902
155 #define CL_PLATFORM_VENDOR 0x0903 155 #define CL_PLATFORM_VENDOR 0x0903
156 #define CL_PLATFORM_EXTENSIONS 0x0904 156 #define CL_PLATFORM_EXTENSIONS 0x0904
157 157
158 // cl_device_type - bitfield 158 /* cl_device_type - bitfield */
159 #define CL_DEVICE_TYPE_DEFAULT (1 << 0) 159 #define CL_DEVICE_TYPE_DEFAULT (1 << 0)
160 #define CL_DEVICE_TYPE_CPU (1 << 1) 160 #define CL_DEVICE_TYPE_CPU (1 << 1)
161 #define CL_DEVICE_TYPE_GPU (1 << 2) 161 #define CL_DEVICE_TYPE_GPU (1 << 2)
162 #define CL_DEVICE_TYPE_ACCELERATOR (1 << 3) 162 #define CL_DEVICE_TYPE_ACCELERATOR (1 << 3)
163 #define CL_DEVICE_TYPE_ALL 0xFFFFFFFF 163 #define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
164 164
165 // cl_device_info 165 /* cl_device_info */
166 #define CL_DEVICE_TYPE 0x1000 166 #define CL_DEVICE_TYPE 0x1000
167 #define CL_DEVICE_VENDOR_ID 0x1001 167 #define CL_DEVICE_VENDOR_ID 0x1001
168 #define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002 168 #define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
169 #define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003 169 #define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
170 #define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004 170 #define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
211 #define CL_DRIVER_VERSION 0x102D 211 #define CL_DRIVER_VERSION 0x102D
212 #define CL_DEVICE_PROFILE 0x102E 212 #define CL_DEVICE_PROFILE 0x102E
213 #define CL_DEVICE_VERSION 0x102F 213 #define CL_DEVICE_VERSION 0x102F
214 #define CL_DEVICE_EXTENSIONS 0x1030 214 #define CL_DEVICE_EXTENSIONS 0x1030
215 #define CL_DEVICE_PLATFORM 0x1031 215 #define CL_DEVICE_PLATFORM 0x1031
216 216 /* 0x1032 reserved for CL_DEVICE_DOUBLE_FP_CONFIG */
217 // cl_device_fp_config - bitfield 217 /* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */
218
219 /* cl_device_fp_config - bitfield */
218 #define CL_FP_DENORM (1 << 0) 220 #define CL_FP_DENORM (1 << 0)
219 #define CL_FP_INF_NAN (1 << 1) 221 #define CL_FP_INF_NAN (1 << 1)
220 #define CL_FP_ROUND_TO_NEAREST (1 << 2) 222 #define CL_FP_ROUND_TO_NEAREST (1 << 2)
221 #define CL_FP_ROUND_TO_ZERO (1 << 3) 223 #define CL_FP_ROUND_TO_ZERO (1 << 3)
222 #define CL_FP_ROUND_TO_INF (1 << 4) 224 #define CL_FP_ROUND_TO_INF (1 << 4)
223 #define CL_FP_FMA (1 << 5) 225 #define CL_FP_FMA (1 << 5)
224 226
225 // cl_device_mem_cache_type 227 /* cl_device_mem_cache_type */
226 #define CL_NONE 0x0 228 #define CL_NONE 0x0
227 #define CL_READ_ONLY_CACHE 0x1 229 #define CL_READ_ONLY_CACHE 0x1
228 #define CL_READ_WRITE_CACHE 0x2 230 #define CL_READ_WRITE_CACHE 0x2
229 231
230 // cl_device_local_mem_type 232 /* cl_device_local_mem_type */
231 #define CL_LOCAL 0x1 233 #define CL_LOCAL 0x1
232 #define CL_GLOBAL 0x2 234 #define CL_GLOBAL 0x2
233 235
234 // cl_device_exec_capabilities - bitfield 236 /* cl_device_exec_capabilities - bitfield */
235 #define CL_EXEC_KERNEL (1 << 0) 237 #define CL_EXEC_KERNEL (1 << 0)
236 #define CL_EXEC_NATIVE_KERNEL (1 << 1) 238 #define CL_EXEC_NATIVE_KERNEL (1 << 1)
237 239
238 // cl_command_queue_properties - bitfield 240 /* cl_command_queue_properties - bitfield */
239 #define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0) 241 #define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0)
240 #define CL_QUEUE_PROFILING_ENABLE (1 << 1) 242 #define CL_QUEUE_PROFILING_ENABLE (1 << 1)
241 243
242 // cl_context_info 244 /* cl_context_info */
243 #define CL_CONTEXT_REFERENCE_COUNT 0x1080 245 #define CL_CONTEXT_REFERENCE_COUNT 0x1080
244 #define CL_CONTEXT_DEVICES 0x1081 246 #define CL_CONTEXT_DEVICES 0x1081
245 #define CL_CONTEXT_PROPERTIES 0x1082 247 #define CL_CONTEXT_PROPERTIES 0x1082
246 248
247 // cl_context_properties 249 /* cl_context_info + cl_context_properties */
248 #define CL_CONTEXT_PLATFORM 0x1084 250 #define CL_CONTEXT_PLATFORM 0x1084
249 251
250 // cl_command_queue_info 252 /* cl_command_queue_info */
251 #define CL_QUEUE_CONTEXT 0x1090 253 #define CL_QUEUE_CONTEXT 0x1090
252 #define CL_QUEUE_DEVICE 0x1091 254 #define CL_QUEUE_DEVICE 0x1091
253 #define CL_QUEUE_REFERENCE_COUNT 0x1092 255 #define CL_QUEUE_REFERENCE_COUNT 0x1092
254 #define CL_QUEUE_PROPERTIES 0x1093 256 #define CL_QUEUE_PROPERTIES 0x1093
255 257
256 // cl_mem_flags - bitfield 258 /* cl_mem_flags - bitfield */
257 #define CL_MEM_READ_WRITE (1 << 0) 259 #define CL_MEM_READ_WRITE (1 << 0)
258 #define CL_MEM_WRITE_ONLY (1 << 1) 260 #define CL_MEM_WRITE_ONLY (1 << 1)
259 #define CL_MEM_READ_ONLY (1 << 2) 261 #define CL_MEM_READ_ONLY (1 << 2)
260 #define CL_MEM_USE_HOST_PTR (1 << 3) 262 #define CL_MEM_USE_HOST_PTR (1 << 3)
261 #define CL_MEM_ALLOC_HOST_PTR (1 << 4) 263 #define CL_MEM_ALLOC_HOST_PTR (1 << 4)
262 #define CL_MEM_COPY_HOST_PTR (1 << 5) 264 #define CL_MEM_COPY_HOST_PTR (1 << 5)
263 265
264 // cl_channel_order 266 /* cl_channel_order */
265 #define CL_R 0x10B0 267 #define CL_R 0x10B0
266 #define CL_A 0x10B1 268 #define CL_A 0x10B1
267 #define CL_RG 0x10B2 269 #define CL_RG 0x10B2
268 #define CL_RA 0x10B3 270 #define CL_RA 0x10B3
269 #define CL_RGB 0x10B4 271 #define CL_RGB 0x10B4
271 #define CL_BGRA 0x10B6 273 #define CL_BGRA 0x10B6
272 #define CL_ARGB 0x10B7 274 #define CL_ARGB 0x10B7
273 #define CL_INTENSITY 0x10B8 275 #define CL_INTENSITY 0x10B8
274 #define CL_LUMINANCE 0x10B9 276 #define CL_LUMINANCE 0x10B9
275 277
276 // cl_channel_type 278 /* cl_channel_type */
277 #define CL_SNORM_INT8 0x10D0 279 #define CL_SNORM_INT8 0x10D0
278 #define CL_SNORM_INT16 0x10D1 280 #define CL_SNORM_INT16 0x10D1
279 #define CL_UNORM_INT8 0x10D2 281 #define CL_UNORM_INT8 0x10D2
280 #define CL_UNORM_INT16 0x10D3 282 #define CL_UNORM_INT16 0x10D3
281 #define CL_UNORM_SHORT_565 0x10D4 283 #define CL_UNORM_SHORT_565 0x10D4
288 #define CL_UNSIGNED_INT16 0x10DB 290 #define CL_UNSIGNED_INT16 0x10DB
289 #define CL_UNSIGNED_INT32 0x10DC 291 #define CL_UNSIGNED_INT32 0x10DC
290 #define CL_HALF_FLOAT 0x10DD 292 #define CL_HALF_FLOAT 0x10DD
291 #define CL_FLOAT 0x10DE 293 #define CL_FLOAT 0x10DE
292 294
293 // cl_mem_object_type 295 /* cl_mem_object_type */
294 #define CL_MEM_OBJECT_BUFFER 0x10F0 296 #define CL_MEM_OBJECT_BUFFER 0x10F0
295 #define CL_MEM_OBJECT_IMAGE2D 0x10F1 297 #define CL_MEM_OBJECT_IMAGE2D 0x10F1
296 #define CL_MEM_OBJECT_IMAGE3D 0x10F2 298 #define CL_MEM_OBJECT_IMAGE3D 0x10F2
297 299
298 // cl_mem_info 300 /* cl_mem_info */
299 #define CL_MEM_TYPE 0x1100 301 #define CL_MEM_TYPE 0x1100
300 #define CL_MEM_FLAGS 0x1101 302 #define CL_MEM_FLAGS 0x1101
301 #define CL_MEM_SIZE 0x1102 303 #define CL_MEM_SIZE 0x1102
302 #define CL_MEM_HOST_PTR 0x1103 304 #define CL_MEM_HOST_PTR 0x1103
303 #define CL_MEM_MAP_COUNT 0x1104 305 #define CL_MEM_MAP_COUNT 0x1104
304 #define CL_MEM_REFERENCE_COUNT 0x1105 306 #define CL_MEM_REFERENCE_COUNT 0x1105
305 #define CL_MEM_CONTEXT 0x1106 307 #define CL_MEM_CONTEXT 0x1106
306 308
307 // cl_image_info 309 /* cl_image_info */
308 #define CL_IMAGE_FORMAT 0x1110 310 #define CL_IMAGE_FORMAT 0x1110
309 #define CL_IMAGE_ELEMENT_SIZE 0x1111 311 #define CL_IMAGE_ELEMENT_SIZE 0x1111
310 #define CL_IMAGE_ROW_PITCH 0x1112 312 #define CL_IMAGE_ROW_PITCH 0x1112
311 #define CL_IMAGE_SLICE_PITCH 0x1113 313 #define CL_IMAGE_SLICE_PITCH 0x1113
312 #define CL_IMAGE_WIDTH 0x1114 314 #define CL_IMAGE_WIDTH 0x1114
313 #define CL_IMAGE_HEIGHT 0x1115 315 #define CL_IMAGE_HEIGHT 0x1115
314 #define CL_IMAGE_DEPTH 0x1116 316 #define CL_IMAGE_DEPTH 0x1116
315 317
316 // cl_addressing_mode 318 /* cl_addressing_mode */
317 #define CL_ADDRESS_NONE 0x1130 319 #define CL_ADDRESS_NONE 0x1130
318 #define CL_ADDRESS_CLAMP_TO_EDGE 0x1131 320 #define CL_ADDRESS_CLAMP_TO_EDGE 0x1131
319 #define CL_ADDRESS_CLAMP 0x1132 321 #define CL_ADDRESS_CLAMP 0x1132
320 #define CL_ADDRESS_REPEAT 0x1133 322 #define CL_ADDRESS_REPEAT 0x1133
321 323
322 // cl_filter_mode 324 /* cl_filter_mode */
323 #define CL_FILTER_NEAREST 0x1140 325 #define CL_FILTER_NEAREST 0x1140
324 #define CL_FILTER_LINEAR 0x1141 326 #define CL_FILTER_LINEAR 0x1141
325 327
326 // cl_sampler_info 328 /* cl_sampler_info */
327 #define CL_SAMPLER_REFERENCE_COUNT 0x1150 329 #define CL_SAMPLER_REFERENCE_COUNT 0x1150
328 #define CL_SAMPLER_CONTEXT 0x1151 330 #define CL_SAMPLER_CONTEXT 0x1151
329 #define CL_SAMPLER_NORMALIZED_COORDS 0x1152 331 #define CL_SAMPLER_NORMALIZED_COORDS 0x1152
330 #define CL_SAMPLER_ADDRESSING_MODE 0x1153 332 #define CL_SAMPLER_ADDRESSING_MODE 0x1153
331 #define CL_SAMPLER_FILTER_MODE 0x1154 333 #define CL_SAMPLER_FILTER_MODE 0x1154
332 334
333 // cl_map_flags - bitfield 335 /* cl_map_flags - bitfield */
334 #define CL_MAP_READ (1 << 0) 336 #define CL_MAP_READ (1 << 0)
335 #define CL_MAP_WRITE (1 << 1) 337 #define CL_MAP_WRITE (1 << 1)
336 338
337 // cl_program_info 339 /* cl_program_info */
338 #define CL_PROGRAM_REFERENCE_COUNT 0x1160 340 #define CL_PROGRAM_REFERENCE_COUNT 0x1160
339 #define CL_PROGRAM_CONTEXT 0x1161 341 #define CL_PROGRAM_CONTEXT 0x1161
340 #define CL_PROGRAM_NUM_DEVICES 0x1162 342 #define CL_PROGRAM_NUM_DEVICES 0x1162
341 #define CL_PROGRAM_DEVICES 0x1163 343 #define CL_PROGRAM_DEVICES 0x1163
342 #define CL_PROGRAM_SOURCE 0x1164 344 #define CL_PROGRAM_SOURCE 0x1164
343 #define CL_PROGRAM_BINARY_SIZES 0x1165 345 #define CL_PROGRAM_BINARY_SIZES 0x1165
344 #define CL_PROGRAM_BINARIES 0x1166 346 #define CL_PROGRAM_BINARIES 0x1166
345 347
346 // cl_program_build_info 348 /* cl_program_build_info */
347 #define CL_PROGRAM_BUILD_STATUS 0x1181 349 #define CL_PROGRAM_BUILD_STATUS 0x1181
348 #define CL_PROGRAM_BUILD_OPTIONS 0x1182 350 #define CL_PROGRAM_BUILD_OPTIONS 0x1182
349 #define CL_PROGRAM_BUILD_LOG 0x1183 351 #define CL_PROGRAM_BUILD_LOG 0x1183
350 352
351 // cl_build_status 353 /* cl_build_status */
352 #define CL_BUILD_SUCCESS 0 354 #define CL_BUILD_SUCCESS 0
353 #define CL_BUILD_NONE -1 355 #define CL_BUILD_NONE -1
354 #define CL_BUILD_ERROR -2 356 #define CL_BUILD_ERROR -2
355 #define CL_BUILD_IN_PROGRESS -3 357 #define CL_BUILD_IN_PROGRESS -3
356 358
357 // cl_kernel_info 359 /* cl_kernel_info */
358 #define CL_KERNEL_FUNCTION_NAME 0x1190 360 #define CL_KERNEL_FUNCTION_NAME 0x1190
359 #define CL_KERNEL_NUM_ARGS 0x1191 361 #define CL_KERNEL_NUM_ARGS 0x1191
360 #define CL_KERNEL_REFERENCE_COUNT 0x1192 362 #define CL_KERNEL_REFERENCE_COUNT 0x1192
361 #define CL_KERNEL_CONTEXT 0x1193 363 #define CL_KERNEL_CONTEXT 0x1193
362 #define CL_KERNEL_PROGRAM 0x1194 364 #define CL_KERNEL_PROGRAM 0x1194
363 365
364 // cl_kernel_work_group_info 366 /* cl_kernel_work_group_info */
365 #define CL_KERNEL_WORK_GROUP_SIZE 0x11B0 367 #define CL_KERNEL_WORK_GROUP_SIZE 0x11B0
366 #define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1 368 #define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1
367 #define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2 369 #define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2
368 370
369 // cl_event_info 371 /* cl_event_info */
370 #define CL_EVENT_COMMAND_QUEUE 0x11D0 372 #define CL_EVENT_COMMAND_QUEUE 0x11D0
371 #define CL_EVENT_COMMAND_TYPE 0x11D1 373 #define CL_EVENT_COMMAND_TYPE 0x11D1
372 #define CL_EVENT_REFERENCE_COUNT 0x11D2 374 #define CL_EVENT_REFERENCE_COUNT 0x11D2
373 #define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3 375 #define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3
374 376
375 // cl_command_type 377 /* cl_command_type */
376 #define CL_COMMAND_NDRANGE_KERNEL 0x11F0 378 #define CL_COMMAND_NDRANGE_KERNEL 0x11F0
377 #define CL_COMMAND_TASK 0x11F1 379 #define CL_COMMAND_TASK 0x11F1
378 #define CL_COMMAND_NATIVE_KERNEL 0x11F2 380 #define CL_COMMAND_NATIVE_KERNEL 0x11F2
379 #define CL_COMMAND_READ_BUFFER 0x11F3 381 #define CL_COMMAND_READ_BUFFER 0x11F3
380 #define CL_COMMAND_WRITE_BUFFER 0x11F4 382 #define CL_COMMAND_WRITE_BUFFER 0x11F4
389 #define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD 391 #define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD
390 #define CL_COMMAND_MARKER 0x11FE 392 #define CL_COMMAND_MARKER 0x11FE
391 #define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF 393 #define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF
392 #define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200 394 #define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200
393 395
394 // command execution status 396 /* command execution status */
395 #define CL_COMPLETE 0x0 397 #define CL_COMPLETE 0x0
396 #define CL_RUNNING 0x1 398 #define CL_RUNNING 0x1
397 #define CL_SUBMITTED 0x2 399 #define CL_SUBMITTED 0x2
398 #define CL_QUEUED 0x3 400 #define CL_QUEUED 0x3
399 401
400 // cl_profiling_info 402 /* cl_profiling_info */
401 #define CL_PROFILING_COMMAND_QUEUED 0x1280 403 #define CL_PROFILING_COMMAND_QUEUED 0x1280
402 #define CL_PROFILING_COMMAND_SUBMIT 0x1281 404 #define CL_PROFILING_COMMAND_SUBMIT 0x1281
403 #define CL_PROFILING_COMMAND_START 0x1282 405 #define CL_PROFILING_COMMAND_START 0x1282
404 #define CL_PROFILING_COMMAND_END 0x1283 406 #define CL_PROFILING_COMMAND_END 0x1283
405 407
406 /********************************************************************************************************/ 408 /********************************************************************************************************/
407 409
408 // Platform API 410 /* Platform API */
409 extern CL_API_ENTRY cl_int CL_API_CALL 411 extern CL_API_ENTRY cl_int CL_API_CALL
410 clGetPlatformIDs(cl_uint /* num_entries */, 412 clGetPlatformIDs(cl_uint /* num_entries */,
411 cl_platform_id * /* platforms */, 413 cl_platform_id * /* platforms */,
412 cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0; 414 cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0;
413 415
416 cl_platform_info /* param_name */, 418 cl_platform_info /* param_name */,
417 size_t /* param_value_size */, 419 size_t /* param_value_size */,
418 void * /* param_value */, 420 void * /* param_value */,
419 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 421 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
420 422
421 // Device APIs 423 /* Device APIs */
422 extern CL_API_ENTRY cl_int CL_API_CALL 424 extern CL_API_ENTRY cl_int CL_API_CALL
423 clGetDeviceIDs(cl_platform_id /* platform */, 425 clGetDeviceIDs(cl_platform_id /* platform */,
424 cl_device_type /* device_type */, 426 cl_device_type /* device_type */,
425 cl_uint /* num_entries */, 427 cl_uint /* num_entries */,
426 cl_device_id * /* devices */, 428 cl_device_id * /* devices */,
431 cl_device_info /* param_name */, 433 cl_device_info /* param_name */,
432 size_t /* param_value_size */, 434 size_t /* param_value_size */,
433 void * /* param_value */, 435 void * /* param_value */,
434 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 436 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
435 437
436 // Context APIs 438 /* Context APIs */
437 extern CL_API_ENTRY cl_context CL_API_CALL 439 extern CL_API_ENTRY cl_context CL_API_CALL
438 clCreateContext(const cl_context_properties * /* properties */, 440 clCreateContext(const cl_context_properties * /* properties */,
439 cl_uint /* num_devices */, 441 cl_uint /* num_devices */,
440 const cl_device_id * /* devices */, 442 const cl_device_id * /* devices */,
441 void (*pfn_notify)(const char *, const void *, size_t, void *) /* pfn_notify */, 443 void (*pfn_notify)(const char *, const void *, size_t, void *) /* pfn_notify */,
460 cl_context_info /* param_name */, 462 cl_context_info /* param_name */,
461 size_t /* param_value_size */, 463 size_t /* param_value_size */,
462 void * /* param_value */, 464 void * /* param_value */,
463 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 465 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
464 466
465 // Command Queue APIs 467 /* Command Queue APIs */
466 extern CL_API_ENTRY cl_command_queue CL_API_CALL 468 extern CL_API_ENTRY cl_command_queue CL_API_CALL
467 clCreateCommandQueue(cl_context /* context */, 469 clCreateCommandQueue(cl_context /* context */,
468 cl_device_id /* device */, 470 cl_device_id /* device */,
469 cl_command_queue_properties /* properties */, 471 cl_command_queue_properties /* properties */,
470 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 472 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
486 clSetCommandQueueProperty(cl_command_queue /* command_queue */, 488 clSetCommandQueueProperty(cl_command_queue /* command_queue */,
487 cl_command_queue_properties /* properties */, 489 cl_command_queue_properties /* properties */,
488 cl_bool /* enable */, 490 cl_bool /* enable */,
489 cl_command_queue_properties * /* old_properties */) CL_API_SUFFIX__VERSION_1_0; 491 cl_command_queue_properties * /* old_properties */) CL_API_SUFFIX__VERSION_1_0;
490 492
491 // Memory Object APIs 493 /* Memory Object APIs */
492 extern CL_API_ENTRY cl_mem CL_API_CALL 494 extern CL_API_ENTRY cl_mem CL_API_CALL
493 clCreateBuffer(cl_context /* context */, 495 clCreateBuffer(cl_context /* context */,
494 cl_mem_flags /* flags */, 496 cl_mem_flags /* flags */,
495 size_t /* size */, 497 size_t /* size */,
496 void * /* host_ptr */, 498 void * /* host_ptr */,
544 cl_image_info /* param_name */, 546 cl_image_info /* param_name */,
545 size_t /* param_value_size */, 547 size_t /* param_value_size */,
546 void * /* param_value */, 548 void * /* param_value */,
547 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 549 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
548 550
549 // Sampler APIs 551 /* Sampler APIs */
550 extern CL_API_ENTRY cl_sampler CL_API_CALL 552 extern CL_API_ENTRY cl_sampler CL_API_CALL
551 clCreateSampler(cl_context /* context */, 553 clCreateSampler(cl_context /* context */,
552 cl_bool /* normalized_coords */, 554 cl_bool /* normalized_coords */,
553 cl_addressing_mode /* addressing_mode */, 555 cl_addressing_mode /* addressing_mode */,
554 cl_filter_mode /* filter_mode */, 556 cl_filter_mode /* filter_mode */,
565 cl_sampler_info /* param_name */, 567 cl_sampler_info /* param_name */,
566 size_t /* param_value_size */, 568 size_t /* param_value_size */,
567 void * /* param_value */, 569 void * /* param_value */,
568 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 570 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
569 571
570 // Program Object APIs 572 /* Program Object APIs */
571 extern CL_API_ENTRY cl_program CL_API_CALL 573 extern CL_API_ENTRY cl_program CL_API_CALL
572 clCreateProgramWithSource(cl_context /* context */, 574 clCreateProgramWithSource(cl_context /* context */,
573 cl_uint /* count */, 575 cl_uint /* count */,
574 const char ** /* strings */, 576 const char ** /* strings */,
575 const size_t * /* lengths */, 577 const size_t * /* lengths */,
614 cl_program_build_info /* param_name */, 616 cl_program_build_info /* param_name */,
615 size_t /* param_value_size */, 617 size_t /* param_value_size */,
616 void * /* param_value */, 618 void * /* param_value */,
617 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 619 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
618 620
619 // Kernel Object APIs 621 /* Kernel Object APIs */
620 extern CL_API_ENTRY cl_kernel CL_API_CALL 622 extern CL_API_ENTRY cl_kernel CL_API_CALL
621 clCreateKernel(cl_program /* program */, 623 clCreateKernel(cl_program /* program */,
622 const char * /* kernel_name */, 624 const char * /* kernel_name */,
623 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; 625 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
624 626
653 cl_kernel_work_group_info /* param_name */, 655 cl_kernel_work_group_info /* param_name */,
654 size_t /* param_value_size */, 656 size_t /* param_value_size */,
655 void * /* param_value */, 657 void * /* param_value */,
656 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 658 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
657 659
658 // Event Object APIs 660 /* Event Object APIs */
659 extern CL_API_ENTRY cl_int CL_API_CALL 661 extern CL_API_ENTRY cl_int CL_API_CALL
660 clWaitForEvents(cl_uint /* num_events */, 662 clWaitForEvents(cl_uint /* num_events */,
661 const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0; 663 const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
662 664
663 extern CL_API_ENTRY cl_int CL_API_CALL 665 extern CL_API_ENTRY cl_int CL_API_CALL
671 clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; 673 clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
672 674
673 extern CL_API_ENTRY cl_int CL_API_CALL 675 extern CL_API_ENTRY cl_int CL_API_CALL
674 clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; 676 clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
675 677
676 // Profiling APIs 678 /* Profiling APIs */
677 extern CL_API_ENTRY cl_int CL_API_CALL 679 extern CL_API_ENTRY cl_int CL_API_CALL
678 clGetEventProfilingInfo(cl_event /* event */, 680 clGetEventProfilingInfo(cl_event /* event */,
679 cl_profiling_info /* param_name */, 681 cl_profiling_info /* param_name */,
680 size_t /* param_value_size */, 682 size_t /* param_value_size */,
681 void * /* param_value */, 683 void * /* param_value */,
682 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; 684 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
683 685
684 // Flush and Finish APIs 686 /* Flush and Finish APIs */
685 extern CL_API_ENTRY cl_int CL_API_CALL 687 extern CL_API_ENTRY cl_int CL_API_CALL
686 clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; 688 clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
687 689
688 extern CL_API_ENTRY cl_int CL_API_CALL 690 extern CL_API_ENTRY cl_int CL_API_CALL
689 clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; 691 clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
690 692
691 // Enqueued Commands APIs 693 /* Enqueued Commands APIs */
692 extern CL_API_ENTRY cl_int CL_API_CALL 694 extern CL_API_ENTRY cl_int CL_API_CALL
693 clEnqueueReadBuffer(cl_command_queue /* command_queue */, 695 clEnqueueReadBuffer(cl_command_queue /* command_queue */,
694 cl_mem /* buffer */, 696 cl_mem /* buffer */,
695 cl_bool /* blocking_read */, 697 cl_bool /* blocking_read */,
696 size_t /* offset */, 698 size_t /* offset */,
855 const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0; 857 const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
856 858
857 extern CL_API_ENTRY cl_int CL_API_CALL 859 extern CL_API_ENTRY cl_int CL_API_CALL
858 clEnqueueBarrier(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; 860 clEnqueueBarrier(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
859 861
860 // Extension function access 862 /* Extension function access
861 // 863 *
862 // Returns the extension function address for the given function name, 864 * Returns the extension function address for the given function name,
863 // or NULL if a valid function can not be found. The client must 865 * or NULL if a valid function can not be found. The client must
864 // check to make sure the address is not NULL, before using or 866 * check to make sure the address is not NULL, before using or
865 // calling the returned function address. 867 * calling the returned function address.
866 // 868 */
867 extern CL_API_ENTRY void * CL_API_CALL clGetExtensionFunctionAddress(const char * /* func_name */) CL_API_SUFFIX__VERSION_1_0; 869 extern CL_API_ENTRY void * CL_API_CALL clGetExtensionFunctionAddress(const char * /* func_name */) CL_API_SUFFIX__VERSION_1_0;
868 870
869 #ifdef __cplusplus 871 #ifdef __cplusplus
870 } 872 }
871 #endif 873 #endif
872 874
873 #endif // __OPENCL_CL_H 875 #endif /* __OPENCL_CL_H */
876