ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/OpenCL/OpenCL.pm
(Generate patch)

Comparing OpenCL/OpenCL.pm (file contents):
Revision 1.42 by root, Fri Apr 20 11:05:46 2012 UTC vs.
Revision 1.45 by root, Sat Apr 21 17:50:27 2012 UTC

336=item * Structures are often specified by flattening out their components 336=item * Structures are often specified by flattening out their components
337as with short vectors, and returned as arrayrefs. 337as with short vectors, and returned as arrayrefs.
338 338
339=item * When enqueuing commands, the wait list is specified by adding 339=item * When enqueuing commands, the wait list is specified by adding
340extra arguments to the function - anywhere a C<$wait_events...> argument 340extra arguments to the function - anywhere a C<$wait_events...> argument
341is documented this can be any number of event objects. 341is documented this can be any number of event objects. As an extsnion
342implemented by this module, C<undef> values will be ignored in the event
343list.
342 344
343=item * When enqueuing commands, if the enqueue method is called in void 345=item * When enqueuing commands, if the enqueue method is called in void
344context, no event is created. In all other contexts an event is returned 346context, no event is created. In all other contexts an event is returned
345by the method. 347by the method.
346 348
748 750
749=item @device_partition_property_exts = $device->affinity_domains_ext 751=item @device_partition_property_exts = $device->affinity_domains_ext
750 752
751Calls C<clGetDeviceInfo> with C<CL_DEVICE_AFFINITY_DOMAINS_EXT> and returns the result. 753Calls C<clGetDeviceInfo> with C<CL_DEVICE_AFFINITY_DOMAINS_EXT> and returns the result.
752 754
753=item $uint = $device->reference_count_ext 755=item $uint = $device->reference_count_ext
754 756
755Calls C<clGetDeviceInfo> with C<CL_DEVICE_REFERENCE_COUNT_EXT > and returns the result. 757Calls C<clGetDeviceInfo> with C<CL_DEVICE_REFERENCE_COUNT_EXT > and returns the result.
756 758
757=item @device_partition_property_exts = $device->partition_style_ext 759=item @device_partition_property_exts = $device->partition_style_ext
758 760
769=item $queue = $ctx->queue ($device, $properties) 771=item $queue = $ctx->queue ($device, $properties)
770 772
771Create a new OpenCL::Queue object from the context and the given device. 773Create a new OpenCL::Queue object from the context and the given device.
772 774
773L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateCommandQueue.html> 775L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateCommandQueue.html>
776
777Example: create an out-of-order queue.
778
779 $queue = $ctx->queue ($device, OpenCL::QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE);
774 780
775=item $ev = $ctx->user_event 781=item $ev = $ctx->user_event
776 782
777Creates a new OpenCL::UserEvent object. 783Creates a new OpenCL::UserEvent object.
778 784
889for completion, unless the method is called in void context, in which case 895for completion, unless the method is called in void context, in which case
890no event object is created. 896no event object is created.
891 897
892They also allow you to specify any number of other event objects that this 898They also allow you to specify any number of other event objects that this
893request has to wait for before it starts executing, by simply passing the 899request has to wait for before it starts executing, by simply passing the
894event objects as extra parameters to the enqueue methods. 900event objects as extra parameters to the enqueue methods. To simplify
901program design, this module ignores any C<undef> values in the list of
902events. This makes it possible to code operations such as this, without
903having to put a valid event object into C<$event> first:
904
905 $event = $queue->enqueue_xxx (..., $event);
895 906
896Queues execute in-order by default, without any parallelism, so in most 907Queues execute in-order by default, without any parallelism, so in most
897cases (i.e. you use only one queue) it's not necessary to wait for or 908cases (i.e. you use only one queue) it's not necessary to wait for or
898create event objects. 909create event objects, althoguh an our of order queue is often a bit
910faster.
899 911
900=over 4 912=over 4
901 913
902=item $ev = $queue->enqueue_read_buffer ($buffer, $blocking, $offset, $len, $data, $wait_events...) 914=item $ev = $queue->enqueue_read_buffer ($buffer, $blocking, $offset, $len, $data, $wait_events...)
903 915
1474package OpenCL; 1486package OpenCL;
1475 1487
1476use common::sense; 1488use common::sense;
1477 1489
1478BEGIN { 1490BEGIN {
1479 our $VERSION = '0.95'; 1491 our $VERSION = '0.96';
1480 1492
1481 require XSLoader; 1493 require XSLoader;
1482 XSLoader::load (__PACKAGE__, $VERSION); 1494 XSLoader::load (__PACKAGE__, $VERSION);
1483 1495
1484 @OpenCL::Buffer::ISA = 1496 @OpenCL::Buffer::ISA =

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines