… | |
… | |
101 | |
101 | |
102 | Best run this once to get a feel for the platforms and devices in your |
102 | Best run this once to get a feel for the platforms and devices in your |
103 | system. |
103 | system. |
104 | |
104 | |
105 | for my $platform (OpenCL::platforms) { |
105 | for my $platform (OpenCL::platforms) { |
106 | printf "platform: %s\n", $platform->info (OpenCL::PLATFORM_NAME); |
106 | printf "platform: %s\n", $platform->name; |
107 | printf "extensions: %s\n", $platform->info (OpenCL::PLATFORM_EXTENSIONS); |
107 | printf "extensions: %s\n", $platform->extensions; |
108 | for my $device ($platform->devices) { |
108 | for my $device ($platform->devices) { |
109 | printf "+ device: %s\n", $device->info (OpenCL::DEVICE_NAME); |
109 | printf "+ device: %s\n", $device->name; |
110 | my $ctx = $device->context; |
110 | my $ctx = $platform->context (undef, [$device]); |
111 | # do stuff |
111 | # do stuff |
112 | } |
112 | } |
113 | } |
113 | } |
114 | |
114 | |
115 | =head2 Get a useful context and a command queue. |
115 | =head2 Get a useful context and a command queue. |
… | |
… | |
149 | |
149 | |
150 | =head2 Create and build a program, then create a kernel out of one of its |
150 | =head2 Create and build a program, then create a kernel out of one of its |
151 | functions. |
151 | functions. |
152 | |
152 | |
153 | my $src = ' |
153 | my $src = ' |
154 | __kernel void |
154 | kernel void |
155 | squareit (__global float *input, __global float *output) |
155 | squareit (global float *input, global float *output) |
156 | { |
156 | { |
157 | $id = get_global_id (0); |
157 | $id = get_global_id (0); |
158 | output [id] = input [id] * input [id]; |
158 | output [id] = input [id] * input [id]; |
159 | } |
159 | } |
160 | '; |
160 | '; |
161 | |
161 | |
162 | my $prog = $ctx->program_with_source ($src); |
162 | my $prog = $ctx->program_with_source ($src); |
163 | |
163 | |
164 | # build croaks on compile errors, so catch it and print the compile errors |
164 | # build croaks on compile errors, so catch it and print the compile errors |
165 | eval { $prog->build ($dev); 1 } |
165 | eval { $prog->build ($dev); 1 } |
166 | or die $prog->build_info ($dev, OpenCL::PROGRAM_BUILD_LOG); |
166 | or die $prog->build_log; |
167 | |
167 | |
168 | my $kernel = $prog->kernel ("squareit"); |
168 | my $kernel = $prog->kernel ("squareit"); |
169 | |
169 | |
170 | =head2 Create some input and output float buffers, then call the |
170 | =head2 Create some input and output float buffers, then call the |
171 | 'squareit' kernel on them. |
171 | 'squareit' kernel on them. |
… | |
… | |
271 | ulong IV - Q |
271 | ulong IV - Q |
272 | float NV float f |
272 | float NV float f |
273 | half IV ushort S |
273 | half IV ushort S |
274 | double NV double d |
274 | double NV double d |
275 | |
275 | |
|
|
276 | =head2 GLX SUPPORT |
|
|
277 | |
|
|
278 | Due to the sad state that OpenGL support is in in Perl (mostly the OpenGL |
|
|
279 | module, which has little to no documentation and has little to no support |
|
|
280 | for glx), this module, as a special extension, treats context creation |
|
|
281 | properties C<OpenCL::GLX_DISPLAY_KHR> and C<OpenCL::GL_CONTEXT_KHR> |
|
|
282 | specially: If either or both of these are C<undef>, then the OpenCL |
|
|
283 | module tries to dynamically resolve C<glxGetCurrentDisplay> and |
|
|
284 | C<glxGetCurrentContext>, call these functions and use their return values |
|
|
285 | instead. |
|
|
286 | |
|
|
287 | For this to work, the OpenGL library must be loaded, a GLX context must |
|
|
288 | have been created and be made current, and C<dlsym> must be available and |
|
|
289 | capable of finding the function via C<RTLD_DEFAULT>. |
|
|
290 | |
276 | =head2 THE OpenCL PACKAGE |
291 | =head2 THE OpenCL PACKAGE |
277 | |
292 | |
278 | =over 4 |
293 | =over 4 |
279 | |
294 | |
280 | =item $int = OpenCL::errno |
295 | =item $int = OpenCL::errno |
… | |
… | |
286 | |
301 | |
287 | Comverts an error value into a human readable string. |
302 | Comverts an error value into a human readable string. |
288 | |
303 | |
289 | =item $str = OpenCL::enum2str $enum |
304 | =item $str = OpenCL::enum2str $enum |
290 | |
305 | |
291 | Converts most enum values (inof parameter names, image format constants, |
306 | Converts most enum values (of parameter names, image format constants, |
292 | object types, addressing and filter modes, command types etc.) into a |
307 | object types, addressing and filter modes, command types etc.) into a |
293 | human readbale string. When confronted with some random integer it can be |
308 | human readable string. When confronted with some random integer it can be |
294 | very helpful to pass it through this function to maybe get some readable |
309 | very helpful to pass it through this function to maybe get some readable |
295 | string out of it. |
310 | string out of it. |
296 | |
311 | |
297 | =item @platforms = OpenCL::platforms |
312 | =item @platforms = OpenCL::platforms |
298 | |
313 | |
… | |
… | |
326 | |
341 | |
327 | Tries to create a context. Never worked for me, and you need devices explicitly anyway. |
342 | Tries to create a context. Never worked for me, and you need devices explicitly anyway. |
328 | |
343 | |
329 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html> |
344 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html> |
330 | |
345 | |
331 | =item $ctx = $device->context ($properties = undef, @$devices, $notify = undef) |
346 | =item $ctx = $platform->context ($properties = undef, @$devices, $notify = undef) |
332 | |
347 | |
333 | Create a new OpenCL::Context object using the given device object(s)- a |
348 | Create a new OpenCL::Context object using the given device object(s)- a |
334 | CL_CONTEXT_PLATFORM property is supplied automatically. |
349 | CL_CONTEXT_PLATFORM property is supplied automatically. |
335 | |
350 | |
336 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContext.html> |
351 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContext.html> |
… | |
… | |
348 | |
363 | |
349 | =for gengetinfo begin platform |
364 | =for gengetinfo begin platform |
350 | |
365 | |
351 | =item $string = $platform->profile |
366 | =item $string = $platform->profile |
352 | |
367 | |
353 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_PROFILE> and returns the result(s). |
368 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_PROFILE> and returns the result. |
354 | |
369 | |
355 | =item $string = $platform->version |
370 | =item $string = $platform->version |
356 | |
371 | |
357 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VERSION> and returns the result(s). |
372 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VERSION> and returns the result. |
358 | |
373 | |
359 | =item $string = $platform->name |
374 | =item $string = $platform->name |
360 | |
375 | |
361 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_NAME> and returns the result(s). |
376 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_NAME> and returns the result. |
362 | |
377 | |
363 | =item $string = $platform->vendor |
378 | =item $string = $platform->vendor |
364 | |
379 | |
365 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VENDOR> and returns the result(s). |
380 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VENDOR> and returns the result. |
366 | |
381 | |
367 | =item $string = $platform->extensions |
382 | =item $string = $platform->extensions |
368 | |
383 | |
369 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_EXTENSIONS> and returns the result(s). |
384 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_EXTENSIONS> and returns the result. |
370 | |
385 | |
371 | =for gengetinfo end platform |
386 | =for gengetinfo end platform |
372 | |
387 | |
373 | =back |
388 | =back |
374 | |
389 | |
… | |
… | |
384 | |
399 | |
385 | =for gengetinfo begin device |
400 | =for gengetinfo begin device |
386 | |
401 | |
387 | =item $device_type = $device->type |
402 | =item $device_type = $device->type |
388 | |
403 | |
389 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_TYPE> and returns the result(s). |
404 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_TYPE> and returns the result. |
390 | |
405 | |
391 | =item $uint = $device->vendor_id |
406 | =item $uint = $device->vendor_id |
392 | |
407 | |
393 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_VENDOR_ID> and returns the result(s). |
408 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_VENDOR_ID> and returns the result. |
394 | |
409 | |
395 | =item $uint = $device->max_compute_units |
410 | =item $uint = $device->max_compute_units |
396 | |
411 | |
397 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_COMPUTE_UNITS> and returns the result(s). |
412 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_COMPUTE_UNITS> and returns the result. |
398 | |
413 | |
399 | =item $uint = $device->max_work_item_dimensions |
414 | =item $uint = $device->max_work_item_dimensions |
400 | |
415 | |
401 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS> and returns the result(s). |
416 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS> and returns the result. |
402 | |
417 | |
403 | =item $int = $device->max_work_group_size |
418 | =item $int = $device->max_work_group_size |
404 | |
419 | |
405 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_GROUP_SIZE> and returns the result(s). |
420 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_GROUP_SIZE> and returns the result. |
406 | |
421 | |
407 | =item @ints = $device->max_work_item_sizes |
422 | =item @ints = $device->max_work_item_sizes |
408 | |
423 | |
409 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_ITEM_SIZES> and returns the result(s). |
424 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_ITEM_SIZES> and returns the result. |
410 | |
425 | |
411 | =item $uint = $device->preferred_vector_width_char |
426 | =item $uint = $device->preferred_vector_width_char |
412 | |
427 | |
413 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR> and returns the result(s). |
428 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR> and returns the result. |
414 | |
429 | |
415 | =item $uint = $device->preferred_vector_width_short |
430 | =item $uint = $device->preferred_vector_width_short |
416 | |
431 | |
417 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT> and returns the result(s). |
432 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT> and returns the result. |
418 | |
433 | |
419 | =item $uint = $device->preferred_vector_width_int |
434 | =item $uint = $device->preferred_vector_width_int |
420 | |
435 | |
421 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT> and returns the result(s). |
436 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT> and returns the result. |
422 | |
437 | |
423 | =item $uint = $device->preferred_vector_width_long |
438 | =item $uint = $device->preferred_vector_width_long |
424 | |
439 | |
425 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG> and returns the result(s). |
440 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG> and returns the result. |
426 | |
441 | |
427 | =item $uint = $device->preferred_vector_width_float |
442 | =item $uint = $device->preferred_vector_width_float |
428 | |
443 | |
429 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT> and returns the result(s). |
444 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT> and returns the result. |
430 | |
445 | |
431 | =item $uint = $device->preferred_vector_width_double |
446 | =item $uint = $device->preferred_vector_width_double |
432 | |
447 | |
433 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE> and returns the result(s). |
448 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE> and returns the result. |
434 | |
449 | |
435 | =item $uint = $device->max_clock_frequency |
450 | =item $uint = $device->max_clock_frequency |
436 | |
451 | |
437 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CLOCK_FREQUENCY> and returns the result(s). |
452 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CLOCK_FREQUENCY> and returns the result. |
438 | |
453 | |
439 | =item $bitfield = $device->address_bits |
454 | =item $bitfield = $device->address_bits |
440 | |
455 | |
441 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_ADDRESS_BITS> and returns the result(s). |
456 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_ADDRESS_BITS> and returns the result. |
442 | |
457 | |
443 | =item $uint = $device->max_read_image_args |
458 | =item $uint = $device->max_read_image_args |
444 | |
459 | |
445 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_READ_IMAGE_ARGS> and returns the result(s). |
460 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_READ_IMAGE_ARGS> and returns the result. |
446 | |
461 | |
447 | =item $uint = $device->max_write_image_args |
462 | =item $uint = $device->max_write_image_args |
448 | |
463 | |
449 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WRITE_IMAGE_ARGS> and returns the result(s). |
464 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WRITE_IMAGE_ARGS> and returns the result. |
450 | |
465 | |
451 | =item $ulong = $device->max_mem_alloc_size |
466 | =item $ulong = $device->max_mem_alloc_size |
452 | |
467 | |
453 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_MEM_ALLOC_SIZE> and returns the result(s). |
468 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_MEM_ALLOC_SIZE> and returns the result. |
454 | |
469 | |
455 | =item $int = $device->image2d_max_width |
470 | =item $int = $device->image2d_max_width |
456 | |
471 | |
457 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE2D_MAX_WIDTH> and returns the result(s). |
472 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE2D_MAX_WIDTH> and returns the result. |
458 | |
473 | |
459 | =item $int = $device->image2d_max_height |
474 | =item $int = $device->image2d_max_height |
460 | |
475 | |
461 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE2D_MAX_HEIGHT> and returns the result(s). |
476 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE2D_MAX_HEIGHT> and returns the result. |
462 | |
477 | |
463 | =item $int = $device->image3d_max_width |
478 | =item $int = $device->image3d_max_width |
464 | |
479 | |
465 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_WIDTH> and returns the result(s). |
480 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_WIDTH> and returns the result. |
466 | |
481 | |
467 | =item $int = $device->image3d_max_height |
482 | =item $int = $device->image3d_max_height |
468 | |
483 | |
469 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_HEIGHT> and returns the result(s). |
484 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_HEIGHT> and returns the result. |
470 | |
485 | |
471 | =item $int = $device->image3d_max_depth |
486 | =item $int = $device->image3d_max_depth |
472 | |
487 | |
473 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_DEPTH> and returns the result(s). |
488 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_DEPTH> and returns the result. |
474 | |
489 | |
475 | =item $uint = $device->image_support |
490 | =item $uint = $device->image_support |
476 | |
491 | |
477 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE_SUPPORT> and returns the result(s). |
492 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE_SUPPORT> and returns the result. |
478 | |
493 | |
479 | =item $int = $device->max_parameter_size |
494 | =item $int = $device->max_parameter_size |
480 | |
495 | |
481 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_PARAMETER_SIZE> and returns the result(s). |
496 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_PARAMETER_SIZE> and returns the result. |
482 | |
497 | |
483 | =item $uint = $device->max_samplers |
498 | =item $uint = $device->max_samplers |
484 | |
499 | |
485 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_SAMPLERS> and returns the result(s). |
500 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_SAMPLERS> and returns the result. |
486 | |
501 | |
487 | =item $uint = $device->mem_base_addr_align |
502 | =item $uint = $device->mem_base_addr_align |
488 | |
503 | |
489 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MEM_BASE_ADDR_ALIGN> and returns the result(s). |
504 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MEM_BASE_ADDR_ALIGN> and returns the result. |
490 | |
505 | |
491 | =item $uint = $device->min_data_type_align_size |
506 | =item $uint = $device->min_data_type_align_size |
492 | |
507 | |
493 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE> and returns the result(s). |
508 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE> and returns the result. |
494 | |
509 | |
495 | =item $device_fp_config = $device->single_fp_config |
510 | =item $device_fp_config = $device->single_fp_config |
496 | |
511 | |
497 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_SINGLE_FP_CONFIG> and returns the result(s). |
512 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_SINGLE_FP_CONFIG> and returns the result. |
498 | |
513 | |
499 | =item $device_mem_cache_type = $device->global_mem_cache_type |
514 | =item $device_mem_cache_type = $device->global_mem_cache_type |
500 | |
515 | |
501 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHE_TYPE> and returns the result(s). |
516 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHE_TYPE> and returns the result. |
502 | |
517 | |
503 | =item $uint = $device->global_mem_cacheline_size |
518 | =item $uint = $device->global_mem_cacheline_size |
504 | |
519 | |
505 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE> and returns the result(s). |
520 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE> and returns the result. |
506 | |
521 | |
507 | =item $ulong = $device->global_mem_cache_size |
522 | =item $ulong = $device->global_mem_cache_size |
508 | |
523 | |
509 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHE_SIZE> and returns the result(s). |
524 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHE_SIZE> and returns the result. |
510 | |
525 | |
511 | =item $ulong = $device->global_mem_size |
526 | =item $ulong = $device->global_mem_size |
512 | |
527 | |
513 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_SIZE> and returns the result(s). |
528 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_SIZE> and returns the result. |
514 | |
529 | |
515 | =item $ulong = $device->max_constant_buffer_size |
530 | =item $ulong = $device->max_constant_buffer_size |
516 | |
531 | |
517 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE> and returns the result(s). |
532 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE> and returns the result. |
518 | |
533 | |
519 | =item $uint = $device->max_constant_args |
534 | =item $uint = $device->max_constant_args |
520 | |
535 | |
521 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CONSTANT_ARGS> and returns the result(s). |
536 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CONSTANT_ARGS> and returns the result. |
522 | |
537 | |
523 | =item $device_local_mem_type = $device->local_mem_type |
538 | =item $device_local_mem_type = $device->local_mem_type |
524 | |
539 | |
525 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_LOCAL_MEM_TYPE> and returns the result(s). |
540 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_LOCAL_MEM_TYPE> and returns the result. |
526 | |
541 | |
527 | =item $ulong = $device->local_mem_size |
542 | =item $ulong = $device->local_mem_size |
528 | |
543 | |
529 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_LOCAL_MEM_SIZE> and returns the result(s). |
544 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_LOCAL_MEM_SIZE> and returns the result. |
530 | |
545 | |
531 | =item $boolean = $device->error_correction_support |
546 | =item $boolean = $device->error_correction_support |
532 | |
547 | |
533 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_ERROR_CORRECTION_SUPPORT> and returns the result(s). |
548 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_ERROR_CORRECTION_SUPPORT> and returns the result. |
534 | |
549 | |
535 | =item $int = $device->profiling_timer_resolution |
550 | =item $int = $device->profiling_timer_resolution |
536 | |
551 | |
537 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PROFILING_TIMER_RESOLUTION> and returns the result(s). |
552 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PROFILING_TIMER_RESOLUTION> and returns the result. |
538 | |
553 | |
539 | =item $boolean = $device->endian_little |
554 | =item $boolean = $device->endian_little |
540 | |
555 | |
541 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_ENDIAN_LITTLE> and returns the result(s). |
556 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_ENDIAN_LITTLE> and returns the result. |
542 | |
557 | |
543 | =item $boolean = $device->available |
558 | =item $boolean = $device->available |
544 | |
559 | |
545 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_AVAILABLE> and returns the result(s). |
560 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_AVAILABLE> and returns the result. |
546 | |
561 | |
547 | =item $boolean = $device->compiler_available |
562 | =item $boolean = $device->compiler_available |
548 | |
563 | |
549 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_COMPILER_AVAILABLE> and returns the result(s). |
564 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_COMPILER_AVAILABLE> and returns the result. |
550 | |
565 | |
551 | =item $device_exec_capabilities = $device->execution_capabilities |
566 | =item $device_exec_capabilities = $device->execution_capabilities |
552 | |
567 | |
553 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_EXECUTION_CAPABILITIES> and returns the result(s). |
568 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_EXECUTION_CAPABILITIES> and returns the result. |
554 | |
569 | |
555 | =item $command_queue_properties = $device->properties |
570 | =item $command_queue_properties = $device->properties |
556 | |
571 | |
557 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_QUEUE_PROPERTIES> and returns the result(s). |
572 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_QUEUE_PROPERTIES> and returns the result. |
558 | |
573 | |
559 | =item $ = $device->platform |
574 | =item $ = $device->platform |
560 | |
575 | |
561 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PLATFORM> and returns the result(s). |
576 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PLATFORM> and returns the result. |
562 | |
577 | |
563 | =item $string = $device->name |
578 | =item $string = $device->name |
564 | |
579 | |
565 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NAME> and returns the result(s). |
580 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NAME> and returns the result. |
566 | |
581 | |
567 | =item $string = $device->vendor |
582 | =item $string = $device->vendor |
568 | |
583 | |
569 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_VENDOR> and returns the result(s). |
584 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_VENDOR> and returns the result. |
570 | |
585 | |
571 | =item $string = $device->driver_version |
586 | =item $string = $device->driver_version |
572 | |
587 | |
573 | Calls C<clGetDeviceInfo> with C<CL_DRIVER_VERSION> and returns the result(s). |
588 | Calls C<clGetDeviceInfo> with C<CL_DRIVER_VERSION> and returns the result. |
574 | |
589 | |
575 | =item $string = $device->profile |
590 | =item $string = $device->profile |
576 | |
591 | |
577 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PROFILE> and returns the result(s). |
592 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PROFILE> and returns the result. |
578 | |
593 | |
579 | =item $string = $device->version |
594 | =item $string = $device->version |
580 | |
595 | |
581 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_VERSION> and returns the result(s). |
596 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_VERSION> and returns the result. |
582 | |
597 | |
583 | =item $string = $device->extensions |
598 | =item $string = $device->extensions |
584 | |
599 | |
585 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_EXTENSIONS> and returns the result(s). |
600 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_EXTENSIONS> and returns the result. |
586 | |
601 | |
587 | =item $uint = $device->preferred_vector_width_half |
602 | =item $uint = $device->preferred_vector_width_half |
588 | |
603 | |
589 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF> and returns the result(s). |
604 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF> and returns the result. |
590 | |
605 | |
591 | =item $uint = $device->native_vector_width_char |
606 | =item $uint = $device->native_vector_width_char |
592 | |
607 | |
593 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR> and returns the result(s). |
608 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR> and returns the result. |
594 | |
609 | |
595 | =item $uint = $device->native_vector_width_short |
610 | =item $uint = $device->native_vector_width_short |
596 | |
611 | |
597 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT> and returns the result(s). |
612 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT> and returns the result. |
598 | |
613 | |
599 | =item $uint = $device->native_vector_width_int |
614 | =item $uint = $device->native_vector_width_int |
600 | |
615 | |
601 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_INT> and returns the result(s). |
616 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_INT> and returns the result. |
602 | |
617 | |
603 | =item $uint = $device->native_vector_width_long |
618 | =item $uint = $device->native_vector_width_long |
604 | |
619 | |
605 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG> and returns the result(s). |
620 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG> and returns the result. |
606 | |
621 | |
607 | =item $uint = $device->native_vector_width_float |
622 | =item $uint = $device->native_vector_width_float |
608 | |
623 | |
609 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT> and returns the result(s). |
624 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT> and returns the result. |
610 | |
625 | |
611 | =item $uint = $device->native_vector_width_double |
626 | =item $uint = $device->native_vector_width_double |
612 | |
627 | |
613 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE> and returns the result(s). |
628 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE> and returns the result. |
614 | |
629 | |
615 | =item $uint = $device->native_vector_width_half |
630 | =item $uint = $device->native_vector_width_half |
616 | |
631 | |
617 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF> and returns the result(s). |
632 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF> and returns the result. |
618 | |
633 | |
619 | =item $device_fp_config = $device->double_fp_config |
634 | =item $device_fp_config = $device->double_fp_config |
620 | |
635 | |
621 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_DOUBLE_FP_CONFIG> and returns the result(s). |
636 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_DOUBLE_FP_CONFIG> and returns the result. |
622 | |
637 | |
623 | =item $device_fp_config = $device->half_fp_config |
638 | =item $device_fp_config = $device->half_fp_config |
624 | |
639 | |
625 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_HALF_FP_CONFIG> and returns the result(s). |
640 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_HALF_FP_CONFIG> and returns the result. |
626 | |
641 | |
627 | =item $boolean = $device->host_unified_memory |
642 | =item $boolean = $device->host_unified_memory |
628 | |
643 | |
629 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_HOST_UNIFIED_MEMORY> and returns the result(s). |
644 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_HOST_UNIFIED_MEMORY> and returns the result. |
630 | |
645 | |
631 | =item $device = $device->parent_device_ext |
646 | =item $device = $device->parent_device_ext |
632 | |
647 | |
633 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARENT_DEVICE_EXT> and returns the result(s). |
648 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARENT_DEVICE_EXT> and returns the result. |
634 | |
649 | |
635 | =item @device_partition_property_exts = $device->partition_types_ext |
650 | =item @device_partition_property_exts = $device->partition_types_ext |
636 | |
651 | |
637 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARTITION_TYPES_EXT> and returns the result(s). |
652 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARTITION_TYPES_EXT> and returns the result. |
638 | |
653 | |
639 | =item @device_partition_property_exts = $device->affinity_domains_ext |
654 | =item @device_partition_property_exts = $device->affinity_domains_ext |
640 | |
655 | |
641 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_AFFINITY_DOMAINS_EXT> and returns the result(s). |
656 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_AFFINITY_DOMAINS_EXT> and returns the result. |
642 | |
657 | |
643 | =item $uint = $device->reference_count_ext |
658 | =item $uint = $device->reference_count_ext |
644 | |
659 | |
645 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_REFERENCE_COUNT_EXT > and returns the result(s). |
660 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_REFERENCE_COUNT_EXT > and returns the result. |
646 | |
661 | |
647 | =item @device_partition_property_exts = $device->partition_style_ext |
662 | =item @device_partition_property_exts = $device->partition_style_ext |
648 | |
663 | |
649 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARTITION_STYLE_EXT> and returns the result(s). |
664 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARTITION_STYLE_EXT> and returns the result. |
650 | |
665 | |
651 | =for gengetinfo end device |
666 | =for gengetinfo end device |
652 | |
667 | |
653 | =back |
668 | =back |
654 | |
669 | |
… | |
… | |
668 | |
683 | |
669 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateUserEvent.html> |
684 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateUserEvent.html> |
670 | |
685 | |
671 | =item $buf = $ctx->buffer ($flags, $len) |
686 | =item $buf = $ctx->buffer ($flags, $len) |
672 | |
687 | |
673 | Creates a new OpenCL::Buffer object with the given flags and octet-size. |
688 | Creates a new OpenCL::Buffer (actually OpenCL::BufferObj) object with the |
|
|
689 | given flags and octet-size. |
674 | |
690 | |
675 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateBuffer.html> |
691 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateBuffer.html> |
676 | |
692 | |
677 | =item $buf = $ctx->buffer_sv ($flags, $data) |
693 | =item $buf = $ctx->buffer_sv ($flags, $data) |
678 | |
694 | |
679 | Creates a new OpenCL::Buffer object and initialise it with the given data values. |
695 | Creates a new OpenCL::Buffer (actually OpenCL::BufferObj) object and |
|
|
696 | initialise it with the given data values. |
680 | |
697 | |
681 | =item $img = $ctx->image2d ($flags, $channel_order, $channel_type, $width, $height, $row_pitch = 0, $data = undef) |
698 | =item $img = $ctx->image2d ($flags, $channel_order, $channel_type, $width, $height, $row_pitch = 0, $data = undef) |
682 | |
699 | |
683 | Creates a new OpenCL::Image2D object and optionally initialises it with the given data values. |
700 | Creates a new OpenCL::Image2D object and optionally initialises it with |
|
|
701 | the given data values. |
684 | |
702 | |
685 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage2D.html> |
703 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage2D.html> |
686 | |
704 | |
687 | =item $img = $ctx->image3d ($flags, $channel_order, $channel_type, $width, $height, $depth, $row_pitch = 0, $slice_pitch = 0, $data = undef) |
705 | =item $img = $ctx->image3d ($flags, $channel_order, $channel_type, $width, $height, $depth, $row_pitch = 0, $slice_pitch = 0, $data = undef) |
688 | |
706 | |
689 | Creates a new OpenCL::Image3D object and optionally initialises it with the given data values. |
707 | Creates a new OpenCL::Image3D object and optionally initialises it with |
|
|
708 | the given data values. |
690 | |
709 | |
691 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage3D.html> |
710 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage3D.html> |
|
|
711 | |
|
|
712 | =item $buffer = $ctx->gl_buffer ($flags, $bufobj) |
|
|
713 | |
|
|
714 | Creates a new OpenCL::Buffer (actually OpenCL::BufferObj) object that refers to the given |
|
|
715 | OpenGL buffer object. |
|
|
716 | |
|
|
717 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateFromGLBuffer.html |
|
|
718 | |
|
|
719 | =item $ctx->gl_texture2d ($flags, $target, $miplevel, $texture) |
|
|
720 | |
|
|
721 | Creates a new OpenCL::Image2D object that refers to the given OpenGL |
|
|
722 | 2D texture object. |
|
|
723 | |
|
|
724 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateFromGLTexture2D.html |
|
|
725 | |
|
|
726 | =item $ctx->gl_texture3d ($flags, $target, $miplevel, $texture) |
|
|
727 | |
|
|
728 | Creates a new OpenCL::Image3D object that refers to the given OpenGL |
|
|
729 | 3D texture object. |
|
|
730 | |
|
|
731 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateFromGLTexture3D.html |
|
|
732 | |
|
|
733 | =item $ctx->gl_renderbuffer ($flags, $renderbuffer) |
|
|
734 | |
|
|
735 | Creates a new OpenCL::Image2D object that refers to the given OpenGL |
|
|
736 | render buffer. |
|
|
737 | |
|
|
738 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateFromGLRenderbuffer.html |
692 | |
739 | |
693 | =item @formats = $ctx->supported_image_formats ($flags, $image_type) |
740 | =item @formats = $ctx->supported_image_formats ($flags, $image_type) |
694 | |
741 | |
695 | Returns a list of matching image formats - each format is an arrayref with |
742 | Returns a list of matching image formats - each format is an arrayref with |
696 | two values, $channel_order and $channel_type, in it. |
743 | two values, $channel_order and $channel_type, in it. |
… | |
… | |
717 | |
764 | |
718 | =for gengetinfo begin context |
765 | =for gengetinfo begin context |
719 | |
766 | |
720 | =item $uint = $context->reference_count |
767 | =item $uint = $context->reference_count |
721 | |
768 | |
722 | Calls C<clGetContextInfo> with C<CL_CONTEXT_REFERENCE_COUNT> and returns the result(s). |
769 | Calls C<clGetContextInfo> with C<CL_CONTEXT_REFERENCE_COUNT> and returns the result. |
723 | |
770 | |
724 | =item @devices = $context->devices |
771 | =item @devices = $context->devices |
725 | |
772 | |
726 | Calls C<clGetContextInfo> with C<CL_CONTEXT_DEVICES> and returns the result(s). |
773 | Calls C<clGetContextInfo> with C<CL_CONTEXT_DEVICES> and returns the result. |
727 | |
774 | |
728 | =item @property_ints = $context->properties |
775 | =item @property_ints = $context->properties |
729 | |
776 | |
730 | Calls C<clGetContextInfo> with C<CL_CONTEXT_PROPERTIES> and returns the result(s). |
777 | Calls C<clGetContextInfo> with C<CL_CONTEXT_PROPERTIES> and returns the result. |
731 | |
778 | |
732 | =item $uint = $context->num_devices |
779 | =item $uint = $context->num_devices |
733 | |
780 | |
734 | Calls C<clGetContextInfo> with C<CL_CONTEXT_NUM_DEVICES> and returns the result(s). |
781 | Calls C<clGetContextInfo> with C<CL_CONTEXT_NUM_DEVICES> and returns the result. |
735 | |
782 | |
736 | =for gengetinfo end context |
783 | =for gengetinfo end context |
737 | |
784 | |
738 | =back |
785 | =back |
739 | |
786 | |
… | |
… | |
771 | |
818 | |
772 | =item $ev = $queue->enqueue_copy_buffer ($src, $dst, $src_offset, $dst_offset, $len, $wait_events...) |
819 | =item $ev = $queue->enqueue_copy_buffer ($src, $dst, $src_offset, $dst_offset, $len, $wait_events...) |
773 | |
820 | |
774 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBuffer.html> |
821 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBuffer.html> |
775 | |
822 | |
|
|
823 | =item $ev = $queue->enqueue_read_buffer_rect (OpenCL::Memory buf, cl_bool blocking, $buf_x, $buf_y, $buf_z, $host_x, $host_y, $host_z, $width, $height, $depth, $buf_row_pitch, $buf_slice_pitch, $host_row_pitch, $host_slice_pitch, $data, $wait_events...) |
|
|
824 | |
|
|
825 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadBufferRect.html |
|
|
826 | |
|
|
827 | =item $ev = $queue->enqueue_write_buffer_rect (OpenCL::Memory buf, cl_bool blocking, $buf_x, $buf_y, $buf_z, $host_x, $host_y, $host_z, $width, $height, $depth, $buf_row_pitch, $buf_slice_pitch, $host_row_pitch, $host_slice_pitch, $data, $wait_events...) |
|
|
828 | |
|
|
829 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBufferRect.html |
|
|
830 | |
776 | =item $ev = $queue->enqueue_read_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) |
831 | =item $ev = $queue->enqueue_read_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) |
777 | |
832 | |
|
|
833 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferRect.html> |
|
|
834 | |
|
|
835 | =item $ev = $queue->enqueue_copy_buffer_to_image ($src_buffer, $dst_image, $src_offset, $dst_x, $dst_y, $dst_z, $width, $height, $depth, $wait_events...) |
|
|
836 | |
778 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadImage.html> |
837 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadImage.html> |
779 | |
838 | |
780 | =item $ev = $queue->enqueue_write_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) |
839 | =item $ev = $queue->enqueue_write_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) |
781 | |
840 | |
782 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteImage.html> |
841 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteImage.html> |
783 | |
842 | |
|
|
843 | =item $ev = $queue->enqueue_copy_image ($src_image, $dst_image, $src_x, $src_y, $src_z, $dst_x, $dst_y, $dst_z, $width, $height, $depth, $wait_events...) |
|
|
844 | |
|
|
845 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImage.html> |
|
|
846 | |
|
|
847 | =item $ev = $queue->enqueue_copy_image_to_buffer ($src_image, $dst_image, $src_x, $src_y, $src_z, $width, $height, $depth, $dst_offset, $wait_events...) |
|
|
848 | |
|
|
849 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImageToBuffer.html> |
|
|
850 | |
784 | =item $ev = $queue->enqueue_copy_buffer_rect ($src, $dst, $src_x, $src_y, $src_z, $dst_x, $dst_y, $dst_z, $width, $height, $depth, $src_row_pitch, $src_slice_pitch, $dst_row_pitch, $dst_slice_pitch, $wait_event...) |
851 | =item $ev = $queue->enqueue_copy_buffer_rect ($src, $dst, $src_x, $src_y, $src_z, $dst_x, $dst_y, $dst_z, $width, $height, $depth, $src_row_pitch, $src_slice_pitch, $dst_row_pitch, $dst_slice_pitch, $wait_event...) |
785 | |
852 | |
786 | Yeah. |
853 | Yeah. |
787 | |
854 | |
788 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferRect.html> |
|
|
789 | |
|
|
790 | =item $ev = $queue->enqueue_copy_buffer_to_image ($src_buffer, $dst_image, $src_offset, $dst_x, $dst_y, $dst_z, $width, $height, $depth, $wait_events...) |
|
|
791 | |
|
|
792 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferToImage.html>. |
855 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferToImage.html>. |
793 | |
|
|
794 | =item $ev = $queue->enqueue_copy_image ($src_image, $dst_image, $src_x, $src_y, $src_z, $dst_x, $dst_y, $dst_z, $width, $height, $depth, $wait_events...) |
|
|
795 | |
|
|
796 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImage.html> |
|
|
797 | |
|
|
798 | =item $ev = $queue->enqueue_copy_image_to_buffer ($src_image, $dst_image, $src_x, $src_y, $src_z, $width, $height, $depth, $dst_offset, $wait_events...) |
|
|
799 | |
|
|
800 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImageToBuffer.html> |
|
|
801 | |
856 | |
802 | =item $ev = $queue->enqueue_task ($kernel, $wait_events...) |
857 | =item $ev = $queue->enqueue_task ($kernel, $wait_events...) |
803 | |
858 | |
804 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueTask.html> |
859 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueTask.html> |
805 | |
860 | |
… | |
… | |
819 | reference to an array of local work sizes, with the same number of |
874 | reference to an array of local work sizes, with the same number of |
820 | elements as @$global_work_size. |
875 | elements as @$global_work_size. |
821 | |
876 | |
822 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueNDRangeKernel.html> |
877 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueNDRangeKernel.html> |
823 | |
878 | |
824 | =item $ev = $queue->enqueue_marker |
879 | =item $ev = $queue->enqueue_marker ($wait_events...) |
825 | |
880 | |
826 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueMarker.html> |
881 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueMarker.html> |
827 | |
882 | |
|
|
883 | =item $ev = $queue->enqueue_acquire_gl_objects ([object, ...], $wait_events...) |
|
|
884 | |
|
|
885 | Enqueues a list (an array-ref of OpenCL::Memory objects) to be acquired |
|
|
886 | for subsequent OpenCL usage. |
|
|
887 | |
|
|
888 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueAcquireGLObjects.html> |
|
|
889 | |
|
|
890 | =item $ev = $queue->enqueue_release_gl_objects ([object, ...], $wait_events...) |
|
|
891 | |
|
|
892 | Enqueues a list (an array-ref of OpenCL::Memory objects) to be released |
|
|
893 | for subsequent OpenGL usage. |
|
|
894 | |
|
|
895 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReleaseGLObjects.html> |
|
|
896 | |
828 | =item $ev = $queue->enqueue_wait_for_events ($wait_events...) |
897 | =item $ev = $queue->enqueue_wait_for_events ($wait_events...) |
829 | |
898 | |
830 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWaitForEvents.html> |
899 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWaitForEvents.html> |
831 | |
900 | |
832 | =item $queue->enqueue_barrier |
901 | =item $queue->enqueue_barrier |
… | |
… | |
849 | |
918 | |
850 | =for gengetinfo begin command_queue |
919 | =for gengetinfo begin command_queue |
851 | |
920 | |
852 | =item $ctx = $command_queue->context |
921 | =item $ctx = $command_queue->context |
853 | |
922 | |
854 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_CONTEXT> and returns the result(s). |
923 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_CONTEXT> and returns the result. |
855 | |
924 | |
856 | =item $device = $command_queue->device |
925 | =item $device = $command_queue->device |
857 | |
926 | |
858 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_DEVICE> and returns the result(s). |
927 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_DEVICE> and returns the result. |
859 | |
928 | |
860 | =item $uint = $command_queue->reference_count |
929 | =item $uint = $command_queue->reference_count |
861 | |
930 | |
862 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_REFERENCE_COUNT> and returns the result(s). |
931 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_REFERENCE_COUNT> and returns the result. |
863 | |
932 | |
864 | =item $command_queue_properties = $command_queue->properties |
933 | =item $command_queue_properties = $command_queue->properties |
865 | |
934 | |
866 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_PROPERTIES> and returns the result(s). |
935 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_PROPERTIES> and returns the result. |
867 | |
936 | |
868 | =for gengetinfo end command_queue |
937 | =for gengetinfo end command_queue |
869 | |
938 | |
870 | =back |
939 | =back |
871 | |
940 | |
… | |
… | |
884 | |
953 | |
885 | =for gengetinfo begin mem |
954 | =for gengetinfo begin mem |
886 | |
955 | |
887 | =item $mem_object_type = $mem->type |
956 | =item $mem_object_type = $mem->type |
888 | |
957 | |
889 | Calls C<clGetMemObjectInfo> with C<CL_MEM_TYPE> and returns the result(s). |
958 | Calls C<clGetMemObjectInfo> with C<CL_MEM_TYPE> and returns the result. |
890 | |
959 | |
891 | =item $mem_flags = $mem->flags |
960 | =item $mem_flags = $mem->flags |
892 | |
961 | |
893 | Calls C<clGetMemObjectInfo> with C<CL_MEM_FLAGS> and returns the result(s). |
962 | Calls C<clGetMemObjectInfo> with C<CL_MEM_FLAGS> and returns the result. |
894 | |
963 | |
895 | =item $int = $mem->size |
964 | =item $int = $mem->size |
896 | |
965 | |
897 | Calls C<clGetMemObjectInfo> with C<CL_MEM_SIZE> and returns the result(s). |
966 | Calls C<clGetMemObjectInfo> with C<CL_MEM_SIZE> and returns the result. |
898 | |
967 | |
899 | =item $ptr_value = $mem->host_ptr |
968 | =item $ptr_value = $mem->host_ptr |
900 | |
969 | |
901 | Calls C<clGetMemObjectInfo> with C<CL_MEM_HOST_PTR> and returns the result(s). |
970 | Calls C<clGetMemObjectInfo> with C<CL_MEM_HOST_PTR> and returns the result. |
902 | |
971 | |
903 | =item $uint = $mem->map_count |
972 | =item $uint = $mem->map_count |
904 | |
973 | |
905 | Calls C<clGetMemObjectInfo> with C<CL_MEM_MAP_COUNT> and returns the result(s). |
974 | Calls C<clGetMemObjectInfo> with C<CL_MEM_MAP_COUNT> and returns the result. |
906 | |
975 | |
907 | =item $uint = $mem->reference_count |
976 | =item $uint = $mem->reference_count |
908 | |
977 | |
909 | Calls C<clGetMemObjectInfo> with C<CL_MEM_REFERENCE_COUNT> and returns the result(s). |
978 | Calls C<clGetMemObjectInfo> with C<CL_MEM_REFERENCE_COUNT> and returns the result. |
910 | |
979 | |
911 | =item $ctx = $mem->context |
980 | =item $ctx = $mem->context |
912 | |
981 | |
913 | Calls C<clGetMemObjectInfo> with C<CL_MEM_CONTEXT> and returns the result(s). |
982 | Calls C<clGetMemObjectInfo> with C<CL_MEM_CONTEXT> and returns the result. |
914 | |
983 | |
915 | =item $mem = $mem->associated_memobject |
984 | =item $mem = $mem->associated_memobject |
916 | |
985 | |
917 | Calls C<clGetMemObjectInfo> with C<CL_MEM_ASSOCIATED_MEMOBJECT> and returns the result(s). |
986 | Calls C<clGetMemObjectInfo> with C<CL_MEM_ASSOCIATED_MEMOBJECT> and returns the result. |
918 | |
987 | |
919 | =item $int = $mem->offset |
988 | =item $int = $mem->offset |
920 | |
989 | |
921 | Calls C<clGetMemObjectInfo> with C<CL_MEM_OFFSET> and returns the result(s). |
990 | Calls C<clGetMemObjectInfo> with C<CL_MEM_OFFSET> and returns the result. |
922 | |
991 | |
923 | =for gengetinfo end mem |
992 | =for gengetinfo end mem |
|
|
993 | |
|
|
994 | =item ($type, $name) = $mem->gl_object_info |
|
|
995 | |
|
|
996 | Returns the OpenGL object type (e.g. OpenCL::GL_OBJECT_TEXTURE2D) and the |
|
|
997 | object "name" (e.g. the texture name) used to create this memory object. |
|
|
998 | |
|
|
999 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetGLObjectInfo.html> |
|
|
1000 | |
|
|
1001 | =back |
|
|
1002 | |
|
|
1003 | =head2 THE OpenCL::Buffer CLASS |
|
|
1004 | |
|
|
1005 | This is a subclass of OpenCL::Memory, and the superclass of |
|
|
1006 | OpenCL::BufferObj. Its purpose is simply to distinguish between buffers |
|
|
1007 | and sub-buffers. |
|
|
1008 | |
|
|
1009 | =head2 THE OpenCL::BufferObj CLASS |
|
|
1010 | |
|
|
1011 | This is a subclass of OpenCL::Buffer and thus OpenCL::Memory. It exists |
|
|
1012 | because one cna create sub buffers of OpenLC::BufferObj objects, but not |
|
|
1013 | sub buffers from these sub buffers. |
|
|
1014 | |
|
|
1015 | =over 4 |
|
|
1016 | |
|
|
1017 | =item $subbuf = $buf_obj->sub_buffer_region ($flags, $origin, $size) |
|
|
1018 | |
|
|
1019 | Creates an OpenCL::Buffer objects from this buffer and returns it. The |
|
|
1020 | C<buffer_create_type> is assumed to be C<CL_BUFFER_CREATE_TYPE_REGION>. |
|
|
1021 | |
|
|
1022 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateSubBuffer.html> |
924 | |
1023 | |
925 | =back |
1024 | =back |
926 | |
1025 | |
927 | =head2 THE OpenCL::Image CLASS |
1026 | =head2 THE OpenCL::Image CLASS |
928 | |
1027 | |
… | |
… | |
941 | |
1040 | |
942 | =for gengetinfo begin image |
1041 | =for gengetinfo begin image |
943 | |
1042 | |
944 | =item $int = $image->element_size |
1043 | =item $int = $image->element_size |
945 | |
1044 | |
946 | Calls C<clGetImageInfo> with C<CL_IMAGE_ELEMENT_SIZE> and returns the result(s). |
1045 | Calls C<clGetImageInfo> with C<CL_IMAGE_ELEMENT_SIZE> and returns the result. |
947 | |
1046 | |
948 | =item $int = $image->row_pitch |
1047 | =item $int = $image->row_pitch |
949 | |
1048 | |
950 | Calls C<clGetImageInfo> with C<CL_IMAGE_ROW_PITCH> and returns the result(s). |
1049 | Calls C<clGetImageInfo> with C<CL_IMAGE_ROW_PITCH> and returns the result. |
951 | |
1050 | |
952 | =item $int = $image->slice_pitch |
1051 | =item $int = $image->slice_pitch |
953 | |
1052 | |
954 | Calls C<clGetImageInfo> with C<CL_IMAGE_SLICE_PITCH> and returns the result(s). |
1053 | Calls C<clGetImageInfo> with C<CL_IMAGE_SLICE_PITCH> and returns the result. |
955 | |
1054 | |
956 | =item $int = $image->width |
1055 | =item $int = $image->width |
957 | |
1056 | |
958 | Calls C<clGetImageInfo> with C<CL_IMAGE_WIDTH> and returns the result(s). |
1057 | Calls C<clGetImageInfo> with C<CL_IMAGE_WIDTH> and returns the result. |
959 | |
1058 | |
960 | =item $int = $image->height |
1059 | =item $int = $image->height |
961 | |
1060 | |
962 | Calls C<clGetImageInfo> with C<CL_IMAGE_HEIGHT> and returns the result(s). |
1061 | Calls C<clGetImageInfo> with C<CL_IMAGE_HEIGHT> and returns the result. |
963 | |
1062 | |
964 | =item $int = $image->depth |
1063 | =item $int = $image->depth |
965 | |
1064 | |
966 | Calls C<clGetImageInfo> with C<CL_IMAGE_DEPTH> and returns the result(s). |
1065 | Calls C<clGetImageInfo> with C<CL_IMAGE_DEPTH> and returns the result. |
967 | |
1066 | |
968 | =for gengetinfo end image |
1067 | =for gengetinfo end image |
969 | |
1068 | |
|
|
1069 | =for gengetinfo begin gl_texture |
|
|
1070 | |
|
|
1071 | =item $GLenum = $gl_texture->target |
|
|
1072 | |
|
|
1073 | Calls C<clGetGLTextureInfo> with C<CL_GL_TEXTURE_TARGET> and returns the result. |
|
|
1074 | |
|
|
1075 | =item $GLint = $gl_texture->gl_mipmap_level |
|
|
1076 | |
|
|
1077 | Calls C<clGetGLTextureInfo> with C<CL_GL_MIPMAP_LEVEL> and returns the result. |
|
|
1078 | |
|
|
1079 | =for gengetinfo end gl_texture |
|
|
1080 | |
970 | =back |
1081 | =back |
971 | |
1082 | |
972 | =head2 THE OpenCL::Sampler CLASS |
1083 | =head2 THE OpenCL::Sampler CLASS |
973 | |
1084 | |
974 | =over 4 |
1085 | =over 4 |
… | |
… | |
981 | |
1092 | |
982 | =for gengetinfo begin sampler |
1093 | =for gengetinfo begin sampler |
983 | |
1094 | |
984 | =item $uint = $sampler->reference_count |
1095 | =item $uint = $sampler->reference_count |
985 | |
1096 | |
986 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_REFERENCE_COUNT> and returns the result(s). |
1097 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_REFERENCE_COUNT> and returns the result. |
987 | |
1098 | |
988 | =item $ctx = $sampler->context |
1099 | =item $ctx = $sampler->context |
989 | |
1100 | |
990 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_CONTEXT> and returns the result(s). |
1101 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_CONTEXT> and returns the result. |
991 | |
1102 | |
992 | =item $addressing_mode = $sampler->normalized_coords |
1103 | =item $addressing_mode = $sampler->normalized_coords |
993 | |
1104 | |
994 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_NORMALIZED_COORDS> and returns the result(s). |
1105 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_NORMALIZED_COORDS> and returns the result. |
995 | |
1106 | |
996 | =item $filter_mode = $sampler->addressing_mode |
1107 | =item $filter_mode = $sampler->addressing_mode |
997 | |
1108 | |
998 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_ADDRESSING_MODE> and returns the result(s). |
1109 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_ADDRESSING_MODE> and returns the result. |
999 | |
1110 | |
1000 | =item $boolean = $sampler->filter_mode |
1111 | =item $boolean = $sampler->filter_mode |
1001 | |
1112 | |
1002 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_FILTER_MODE> and returns the result(s). |
1113 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_FILTER_MODE> and returns the result. |
1003 | |
1114 | |
1004 | =for gengetinfo end sampler |
1115 | =for gengetinfo end sampler |
1005 | |
1116 | |
1006 | =back |
1117 | =back |
1007 | |
1118 | |
… | |
… | |
1031 | |
1142 | |
1032 | =for gengetinfo begin program_build |
1143 | =for gengetinfo begin program_build |
1033 | |
1144 | |
1034 | =item $build_status = $program->build_status ($device) |
1145 | =item $build_status = $program->build_status ($device) |
1035 | |
1146 | |
1036 | Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_STATUS> and returns the result(s). |
1147 | Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_STATUS> and returns the result. |
1037 | |
1148 | |
1038 | =item $string = $program->build_options ($device) |
1149 | =item $string = $program->build_options ($device) |
1039 | |
1150 | |
1040 | Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_OPTIONS> and returns the result(s). |
1151 | Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_OPTIONS> and returns the result. |
1041 | |
1152 | |
1042 | =item $string = $program->build_log ($device) |
1153 | =item $string = $program->build_log ($device) |
1043 | |
1154 | |
1044 | Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_LOG> and returns the result(s). |
1155 | Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_LOG> and returns the result. |
1045 | |
1156 | |
1046 | =for gengetinfo end program_build |
1157 | =for gengetinfo end program_build |
1047 | |
1158 | |
1048 | =item $packed_value = $program->info ($name) |
1159 | =item $packed_value = $program->info ($name) |
1049 | |
1160 | |
… | |
… | |
1053 | |
1164 | |
1054 | =for gengetinfo begin program |
1165 | =for gengetinfo begin program |
1055 | |
1166 | |
1056 | =item $uint = $program->reference_count |
1167 | =item $uint = $program->reference_count |
1057 | |
1168 | |
1058 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_REFERENCE_COUNT> and returns the result(s). |
1169 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_REFERENCE_COUNT> and returns the result. |
1059 | |
1170 | |
1060 | =item $ctx = $program->context |
1171 | =item $ctx = $program->context |
1061 | |
1172 | |
1062 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_CONTEXT> and returns the result(s). |
1173 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_CONTEXT> and returns the result. |
1063 | |
1174 | |
1064 | =item $uint = $program->num_devices |
1175 | =item $uint = $program->num_devices |
1065 | |
1176 | |
1066 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_NUM_DEVICES> and returns the result(s). |
1177 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_NUM_DEVICES> and returns the result. |
1067 | |
1178 | |
1068 | =item @devices = $program->devices |
1179 | =item @devices = $program->devices |
1069 | |
1180 | |
1070 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_DEVICES> and returns the result(s). |
1181 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_DEVICES> and returns the result. |
1071 | |
1182 | |
1072 | =item $string = $program->source |
1183 | =item $string = $program->source |
1073 | |
1184 | |
1074 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_SOURCE> and returns the result(s). |
1185 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_SOURCE> and returns the result. |
1075 | |
1186 | |
1076 | =item @ints = $program->binary_sizes |
1187 | =item @ints = $program->binary_sizes |
1077 | |
1188 | |
1078 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_BINARY_SIZES> and returns the result(s). |
1189 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_BINARY_SIZES> and returns the result. |
1079 | |
1190 | |
1080 | =for gengetinfo end program |
1191 | =for gengetinfo end program |
1081 | |
1192 | |
1082 | =item @blobs = $program->binaries |
1193 | =item @blobs = $program->binaries |
1083 | |
1194 | |
… | |
… | |
1104 | |
1215 | |
1105 | =for gengetinfo begin kernel |
1216 | =for gengetinfo begin kernel |
1106 | |
1217 | |
1107 | =item $string = $kernel->function_name |
1218 | =item $string = $kernel->function_name |
1108 | |
1219 | |
1109 | Calls C<clGetKernelInfo> with C<CL_KERNEL_FUNCTION_NAME> and returns the result(s). |
1220 | Calls C<clGetKernelInfo> with C<CL_KERNEL_FUNCTION_NAME> and returns the result. |
1110 | |
1221 | |
1111 | =item $uint = $kernel->num_args |
1222 | =item $uint = $kernel->num_args |
1112 | |
1223 | |
1113 | Calls C<clGetKernelInfo> with C<CL_KERNEL_NUM_ARGS> and returns the result(s). |
1224 | Calls C<clGetKernelInfo> with C<CL_KERNEL_NUM_ARGS> and returns the result. |
1114 | |
1225 | |
1115 | =item $uint = $kernel->reference_count |
1226 | =item $uint = $kernel->reference_count |
1116 | |
1227 | |
1117 | Calls C<clGetKernelInfo> with C<CL_KERNEL_REFERENCE_COUNT> and returns the result(s). |
1228 | Calls C<clGetKernelInfo> with C<CL_KERNEL_REFERENCE_COUNT> and returns the result. |
1118 | |
1229 | |
1119 | =item $ctx = $kernel->context |
1230 | =item $ctx = $kernel->context |
1120 | |
1231 | |
1121 | Calls C<clGetKernelInfo> with C<CL_KERNEL_CONTEXT> and returns the result(s). |
1232 | Calls C<clGetKernelInfo> with C<CL_KERNEL_CONTEXT> and returns the result. |
1122 | |
1233 | |
1123 | =item $program = $kernel->program |
1234 | =item $program = $kernel->program |
1124 | |
1235 | |
1125 | Calls C<clGetKernelInfo> with C<CL_KERNEL_PROGRAM> and returns the result(s). |
1236 | Calls C<clGetKernelInfo> with C<CL_KERNEL_PROGRAM> and returns the result. |
1126 | |
1237 | |
1127 | =for gengetinfo end kernel |
1238 | =for gengetinfo end kernel |
1128 | |
1239 | |
1129 | =item $packed_value = $kernel->work_group_info ($device, $name) |
1240 | =item $packed_value = $kernel->work_group_info ($device, $name) |
1130 | |
1241 | |
… | |
… | |
1137 | |
1248 | |
1138 | =for gengetinfo begin kernel_work_group |
1249 | =for gengetinfo begin kernel_work_group |
1139 | |
1250 | |
1140 | =item $int = $kernel->work_group_size ($device) |
1251 | =item $int = $kernel->work_group_size ($device) |
1141 | |
1252 | |
1142 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_WORK_GROUP_SIZE> and returns the result(s). |
1253 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_WORK_GROUP_SIZE> and returns the result. |
1143 | |
1254 | |
1144 | =item @ints = $kernel->compile_work_group_size ($device) |
1255 | =item @ints = $kernel->compile_work_group_size ($device) |
1145 | |
1256 | |
1146 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_COMPILE_WORK_GROUP_SIZE> and returns the result(s). |
1257 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_COMPILE_WORK_GROUP_SIZE> and returns the result. |
1147 | |
1258 | |
1148 | =item $ulong = $kernel->local_mem_size ($device) |
1259 | =item $ulong = $kernel->local_mem_size ($device) |
1149 | |
1260 | |
1150 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_LOCAL_MEM_SIZE> and returns the result(s). |
1261 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_LOCAL_MEM_SIZE> and returns the result. |
1151 | |
1262 | |
1152 | =item $int = $kernel->preferred_work_group_size_multiple ($device) |
1263 | =item $int = $kernel->preferred_work_group_size_multiple ($device) |
1153 | |
1264 | |
1154 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE> and returns the result(s). |
1265 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE> and returns the result. |
1155 | |
1266 | |
1156 | =item $ulong = $kernel->private_mem_size ($device) |
1267 | =item $ulong = $kernel->private_mem_size ($device) |
1157 | |
1268 | |
1158 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result(s). |
1269 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result. |
1159 | |
1270 | |
1160 | =for gengetinfo end kernel_work_group |
1271 | =for gengetinfo end kernel_work_group |
1161 | |
1272 | |
1162 | =item $kernel->set_TYPE ($index, $value) |
1273 | =item $kernel->set_TYPE ($index, $value) |
1163 | |
1274 | |
… | |
… | |
1197 | |
1308 | |
1198 | =for gengetinfo begin event |
1309 | =for gengetinfo begin event |
1199 | |
1310 | |
1200 | =item $queue = $event->command_queue |
1311 | =item $queue = $event->command_queue |
1201 | |
1312 | |
1202 | Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_QUEUE> and returns the result(s). |
1313 | Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_QUEUE> and returns the result. |
1203 | |
1314 | |
1204 | =item $command_type = $event->command_type |
1315 | =item $command_type = $event->command_type |
1205 | |
1316 | |
1206 | Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_TYPE> and returns the result(s). |
1317 | Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_TYPE> and returns the result. |
1207 | |
1318 | |
1208 | =item $uint = $event->reference_count |
1319 | =item $uint = $event->reference_count |
1209 | |
1320 | |
1210 | Calls C<clGetEventInfo> with C<CL_EVENT_REFERENCE_COUNT> and returns the result(s). |
1321 | Calls C<clGetEventInfo> with C<CL_EVENT_REFERENCE_COUNT> and returns the result. |
1211 | |
1322 | |
1212 | =item $uint = $event->command_execution_status |
1323 | =item $uint = $event->command_execution_status |
1213 | |
1324 | |
1214 | Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_EXECUTION_STATUS> and returns the result(s). |
1325 | Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_EXECUTION_STATUS> and returns the result. |
1215 | |
1326 | |
1216 | =item $ctx = $event->context |
1327 | =item $ctx = $event->context |
1217 | |
1328 | |
1218 | Calls C<clGetEventInfo> with C<CL_EVENT_CONTEXT> and returns the result(s). |
1329 | Calls C<clGetEventInfo> with C<CL_EVENT_CONTEXT> and returns the result. |
1219 | |
1330 | |
1220 | =for gengetinfo end event |
1331 | =for gengetinfo end event |
1221 | |
1332 | |
1222 | =item $packed_value = $ev->profiling_info ($name) |
1333 | =item $packed_value = $ev->profiling_info ($name) |
1223 | |
1334 | |
… | |
… | |
1230 | |
1341 | |
1231 | =for gengetinfo begin profiling |
1342 | =for gengetinfo begin profiling |
1232 | |
1343 | |
1233 | =item $ulong = $event->profiling_command_queued |
1344 | =item $ulong = $event->profiling_command_queued |
1234 | |
1345 | |
1235 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_QUEUED> and returns the result(s). |
1346 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_QUEUED> and returns the result. |
1236 | |
1347 | |
1237 | =item $ulong = $event->profiling_command_submit |
1348 | =item $ulong = $event->profiling_command_submit |
1238 | |
1349 | |
1239 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_SUBMIT> and returns the result(s). |
1350 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_SUBMIT> and returns the result. |
1240 | |
1351 | |
1241 | =item $ulong = $event->profiling_command_start |
1352 | =item $ulong = $event->profiling_command_start |
1242 | |
1353 | |
1243 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_START> and returns the result(s). |
1354 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_START> and returns the result. |
1244 | |
1355 | |
1245 | =item $ulong = $event->profiling_command_end |
1356 | =item $ulong = $event->profiling_command_end |
1246 | |
1357 | |
1247 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_END> and returns the result(s). |
1358 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_END> and returns the result. |
1248 | |
1359 | |
1249 | =for gengetinfo end profiling |
1360 | =for gengetinfo end profiling |
1250 | |
1361 | |
1251 | =back |
1362 | =back |
1252 | |
1363 | |
… | |
… | |
1267 | package OpenCL; |
1378 | package OpenCL; |
1268 | |
1379 | |
1269 | use common::sense; |
1380 | use common::sense; |
1270 | |
1381 | |
1271 | BEGIN { |
1382 | BEGIN { |
1272 | our $VERSION = '0.55'; |
1383 | our $VERSION = '0.92'; |
1273 | |
1384 | |
1274 | require XSLoader; |
1385 | require XSLoader; |
1275 | XSLoader::load (__PACKAGE__, $VERSION); |
1386 | XSLoader::load (__PACKAGE__, $VERSION); |
1276 | |
1387 | |
1277 | @OpenCL::Buffer::ISA = |
1388 | @OpenCL::Buffer::ISA = |
1278 | @OpenCL::Image::ISA = OpenCL::Memory::; |
1389 | @OpenCL::Image::ISA = OpenCL::Memory::; |
1279 | |
1390 | |
|
|
1391 | @OpenCL::BufferObj::ISA = OpenCL::Buffer::; |
|
|
1392 | |
1280 | @OpenCL::Image2D::ISA = |
1393 | @OpenCL::Image2D::ISA = |
1281 | @OpenCL::Image3D::ISA = OpenCL::Image::; |
1394 | @OpenCL::Image3D::ISA = OpenCL::Image::; |
1282 | |
1395 | |
1283 | @OpenCL::UserEvent::ISA = OpenCL::Event::; |
1396 | @OpenCL::UserEvent::ISA = OpenCL::Event::; |
1284 | } |
1397 | } |
1285 | |
1398 | |
1286 | 1; |
1399 | 1; |
1287 | |
1400 | |
1288 | =head1 AUTHOR |
1401 | =head1 AUTHOR |