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

Comparing OpenCL/OpenCL.pm (file contents):
Revision 1.77 by root, Sat May 5 12:54:03 2012 UTC vs.
Revision 1.86 by root, Mon May 7 01:00:31 2012 UTC

28specific device ("compiling and linking"), also binary programs. For each 28specific device ("compiling and linking"), also binary programs. For each
29kernel function in a program you can then create an OpenCL::Kernel object 29kernel function in a program you can then create an OpenCL::Kernel object
30which represents basically a function call with argument values. 30which represents basically a function call with argument values.
31 31
32OpenCL::Memory objects of various flavours: OpenCL::Buffer objects (flat 32OpenCL::Memory objects of various flavours: OpenCL::Buffer objects (flat
33memory areas, think arrays or structs) and OpenCL::Image objects (think 2d 33memory areas, think arrays or structs) and OpenCL::Image objects (think 2D
34or 3d array) for bulk data and input and output for kernels. 34or 3D array) for bulk data and input and output for kernels.
35 35
36OpenCL::Sampler objects, which are kind of like texture filter modes in 36OpenCL::Sampler objects, which are kind of like texture filter modes in
37OpenGL. 37OpenGL.
38 38
39OpenCL::Queue objects - command queues, which allow you to submit memory 39OpenCL::Queue objects - command queues, which allow you to submit memory
96initialised at creation time). 96initialised at creation time).
97 97
98Enqueue the kernel execution. 98Enqueue the kernel execution.
99 99
100Enqueue buffer reads for your output buffer to read results. 100Enqueue buffer reads for your output buffer to read results.
101
102=head1 OPENCL 1.1 VS. OPENCL 1.2
103
104This module supports both OpenCL version 1.1 and 1.2, although the OpenCL
1051.2 interface hasn't been tested much for lack of availability of an
106actual implementation.
107
108Every function or method in this manual page that interfaces to a
109particular OpenCL function has a link to the its C manual page.
110
111If the link contains a F<1.1>, then this function is an OpenCL 1.1
112function. Most but not all also exist in OpenCL 1.2, and this module
113tries to emulate the missing ones for you, when told to do so at
114compiletime. You cna check whether a function was removed in OpenCL 1.2 by
115replacing the F<1.1> component in the URL by F<1.2>.
116
117If the link contains a F<1.2>, then this is a OpenCL 1.2-only
118function. Even if the module was compiled with OpenCL 1.2 header files
119and has an 1.2 OpenCL library, calling such a function on a platform that
120doesn't implement 1.2 causes undefined behaviour, usually a crash (But
121this is not guaranteed).
122
123You can find out whether this module was compiled to prefer 1.1
124functionality by ooking at C<OpenCL::PREFER_1_1> - if it is true, then
1251.1 functions generally are implemented using 1.1 OpenCL functions. If it
126is false, then 1.1 functions missing from 1.2 are emulated by calling 1.2
127fucntions.
128
129This is a somewhat sorry state of affairs, but the Khronos group choose to
130make every release of OpenCL source and binary incompatible with previous
131releases.
132 101
133=head1 EXAMPLES 102=head1 EXAMPLES
134 103
135=head2 Enumerate all devices and get contexts for them. 104=head2 Enumerate all devices and get contexts for them.
136 105
244 $ev->wait; 213 $ev->wait;
245 214
246=head2 Use the OpenGL module to share a texture between OpenCL and OpenGL and draw some julia 215=head2 Use the OpenGL module to share a texture between OpenCL and OpenGL and draw some julia
247set flight effect. 216set flight effect.
248 217
249This is quite a long example to get you going - you can download it from 218This is quite a long example to get you going - you can also download it
250L<http://cvs.schmorp.de/OpenCL/examples/juliaflight>. 219from L<http://cvs.schmorp.de/OpenCL/examples/juliaflight>.
251 220
252 use OpenGL ":all"; 221 use OpenGL ":all";
253 use OpenCL; 222 use OpenCL;
254 223
255 my $S = $ARGV[0] || 256; # window/texture size, smaller is faster 224 my $S = $ARGV[0] || 256; # window/texture size, smaller is faster
419 388
420=item * When enqueuing commands, if the enqueue method is called in void 389=item * When enqueuing commands, if the enqueue method is called in void
421context, no event is created. In all other contexts an event is returned 390context, no event is created. In all other contexts an event is returned
422by the method. 391by the method.
423 392
424=item * This module expects all functions to return C<CL_SUCCESS>. If any 393=item * This module expects all functions to return C<OpenCL::SUCCESS>. If any
425other status is returned the function will throw an exception, so you 394other status is returned the function will throw an exception, so you
426don't normally have to to any error checking. 395don't normally have to to any error checking.
427 396
428=back 397=back
398
399=head2 CONSTANTS
400
401All C<CL_xxx> constants that this module supports are always available
402in the C<OpenCL> namespace as C<OpenCL::xxx> (i.e. without the C<CL_>
403prefix). Constants which are not defined in the header files used during
404compilation, or otherwise are not available, will have the value C<0> (in
405some cases, this will make them indistinguishable from real constants,
406sorry).
407
408The latest version of this module knows and exports the constants
409listed in L<http://cvs.schmorp.de/OpenCL/constiv.h>.
410
411=head2 OPENCL 1.1 VS. OPENCL 1.2
412
413This module supports both OpenCL version 1.1 and 1.2, although the OpenCL
4141.2 interface hasn't been tested much for lack of availability of an
415actual implementation.
416
417Every function or method in this manual page that interfaces to a
418particular OpenCL function has a link to the its C manual page.
419
420If the link contains a F<1.1>, then this function is an OpenCL 1.1
421function. Most but not all also exist in OpenCL 1.2, and this module
422tries to emulate the missing ones for you, when told to do so at
423compiletime. You can check whether a function was removed in OpenCL 1.2 by
424replacing the F<1.1> component in the URL by F<1.2>.
425
426If the link contains a F<1.2>, then this is a OpenCL 1.2-only
427function. Even if the module was compiled with OpenCL 1.2 header files
428and has an 1.2 OpenCL library, calling such a function on a platform that
429doesn't implement 1.2 causes undefined behaviour, usually a crash (But
430this is not guaranteed).
431
432You can find out whether this module was compiled to prefer 1.1
433functionality by ooking at C<OpenCL::PREFER_1_1> - if it is true, then
4341.1 functions generally are implemented using 1.1 OpenCL functions. If it
435is false, then 1.1 functions missing from 1.2 are emulated by calling 1.2
436fucntions.
437
438This is a somewhat sorry state of affairs, but the Khronos group choose to
439make every release of OpenCL source and binary incompatible with previous
440releases.
429 441
430=head2 PERL AND OPENCL TYPES 442=head2 PERL AND OPENCL TYPES
431 443
432This handy(?) table lists OpenCL types and their perl, PDL and pack/unpack 444This handy(?) table lists OpenCL types and their perl, PDL and pack/unpack
433format equivalents: 445format equivalents:
585use Async::Interrupt (); 597use Async::Interrupt ();
586 598
587our $POLL_FUNC; # set by XS 599our $POLL_FUNC; # set by XS
588 600
589BEGIN { 601BEGIN {
590 our $VERSION = '0.99'; 602 our $VERSION = '1.0';
591 603
592 require XSLoader; 604 require XSLoader;
593 XSLoader::load (__PACKAGE__, $VERSION); 605 XSLoader::load (__PACKAGE__, $VERSION);
594 606
595 @OpenCL::Platform::ISA = 607 @OpenCL::Platform::ISA =
631The last error returned by a function - it's only valid after an error occured 643The last error returned by a function - it's only valid after an error occured
632and before calling another OpenCL function. 644and before calling another OpenCL function.
633 645
634=item $str = OpenCL::err2str [$errval] 646=item $str = OpenCL::err2str [$errval]
635 647
636Converts an error value into a human readable string. IF no error value is 648Converts an error value into a human readable string. If no error value is
637given, then the last error will be used (as returned by OpenCL::errno). 649given, then the last error will be used (as returned by OpenCL::errno).
650
651The latest version of this module knows the error constants
652listed in L<http://cvs.schmorp.de/OpenCL/errstr.h>.
638 653
639=item $str = OpenCL::enum2str $enum 654=item $str = OpenCL::enum2str $enum
640 655
641Converts most enum values (of parameter names, image format constants, 656Converts most enum values (of parameter names, image format constants,
642object types, addressing and filter modes, command types etc.) into a 657object types, addressing and filter modes, command types etc.) into a
643human readable string. When confronted with some random integer it can be 658human readable string. When confronted with some random integer it can be
644very helpful to pass it through this function to maybe get some readable 659very helpful to pass it through this function to maybe get some readable
645string out of it. 660string out of it.
646 661
662The latest version of this module knows the enumaration constants
663listed in L<http://cvs.schmorp.de/OpenCL/enumstr.h>.
664
647=item @platforms = OpenCL::platforms 665=item @platforms = OpenCL::platforms
648 666
649Returns all available OpenCL::Platform objects. 667Returns all available OpenCL::Platform objects.
650 668
651L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetPlatformIDs.html> 669L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetPlatformIDs.html>
752L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html> 770L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html>
753 771
754=item $ctx = $platform->context ($properties, \@devices, $callback->($err, $pvt) = $print_stderr) 772=item $ctx = $platform->context ($properties, \@devices, $callback->($err, $pvt) = $print_stderr)
755 773
756Create a new OpenCL::Context object using the given device object(s)- a 774Create a new OpenCL::Context object using the given device object(s)- a
757CL_CONTEXT_PLATFORM property is supplied automatically. 775OpenCL::CONTEXT_PLATFORM property is supplied automatically.
758 776
759L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContext.html> 777L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContext.html>
760 778
761=item $packed_value = $platform->info ($name) 779=item $packed_value = $platform->info ($name)
762 780
807=over 4 825=over 4
808 826
809=item $packed_value = $device->info ($name) 827=item $packed_value = $device->info ($name)
810 828
811See C<< $platform->info >> for details. 829See C<< $platform->info >> for details.
830
831type: OpenCL::DEVICE_TYPE_DEFAULT, OpenCL::DEVICE_TYPE_CPU,
832OpenCL::DEVICE_TYPE_GPU, OpenCL::DEVICE_TYPE_ACCELERATOR,
833OpenCL::DEVICE_TYPE_CUSTOM, OpenCL::DEVICE_TYPE_ALL.
834
835fp_config: OpenCL::FP_DENORM, OpenCL::FP_INF_NAN, OpenCL::FP_ROUND_TO_NEAREST,
836OpenCL::FP_ROUND_TO_ZERO, OpenCL::FP_ROUND_TO_INF, OpenCL::FP_FMA,
837OpenCL::FP_SOFT_FLOAT, OpenCL::FP_CORRECTLY_ROUNDED_DIVIDE_SQRT.
838
839mem_cache_type: OpenCL::NONE, OpenCL::READ_ONLY_CACHE, OpenCL::READ_WRITE_CACHE.
840
841local_mem_type: OpenCL::LOCAL, OpenCL::GLOBAL.
842
843exec_capabilities: OpenCL::EXEC_KERNEL, OpenCL::EXEC_NATIVE_KERNEL.
844
845command_queue_properties: OpenCL::QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE,
846OpenCL::QUEUE_PROFILING_ENABLE.
847
848partition_properties: OpenCL::DEVICE_PARTITION_EQUALLY,
849OpenCL::DEVICE_PARTITION_BY_COUNTS, OpenCL::DEVICE_PARTITION_BY_COUNTS_LIST_END,
850OpenCL::DEVICE_PARTITION_BY_AFFINITY_DOMAIN.
851
852affinity_domain: OpenCL::DEVICE_AFFINITY_DOMAIN_NUMA,
853OpenCL::DEVICE_AFFINITY_DOMAIN_L4_CACHE, OpenCL::DEVICE_AFFINITY_DOMAIN_L3_CACHE,
854OpenCL::DEVICE_AFFINITY_DOMAIN_L2_CACHE, OpenCL::DEVICE_AFFINITY_DOMAIN_L1_CACHE,
855OpenCL::DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE.
812 856
813L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetDeviceInfo.html> 857L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetDeviceInfo.html>
814 858
815=item @devices = $device->sub_devices (\@properties) 859=item @devices = $device->sub_devices (\@properties)
816 860
1196OpenCL::UNORM_INT16, OpenCL::UNORM_SHORT_565, OpenCL::UNORM_SHORT_555, 1240OpenCL::UNORM_INT16, OpenCL::UNORM_SHORT_565, OpenCL::UNORM_SHORT_555,
1197OpenCL::UNORM_INT_101010, OpenCL::SIGNED_INT8, OpenCL::SIGNED_INT16, 1241OpenCL::UNORM_INT_101010, OpenCL::SIGNED_INT8, OpenCL::SIGNED_INT16,
1198OpenCL::SIGNED_INT32, OpenCL::UNSIGNED_INT8, OpenCL::UNSIGNED_INT16, 1242OpenCL::SIGNED_INT32, OpenCL::UNSIGNED_INT8, OpenCL::UNSIGNED_INT16,
1199OpenCL::UNSIGNED_INT32, OpenCL::HALF_FLOAT, OpenCL::FLOAT. 1243OpenCL::UNSIGNED_INT32, OpenCL::HALF_FLOAT, OpenCL::FLOAT.
1200 1244
1201
1202type: OpenCL::MEM_OBJECT_BUFFER, OpenCL::MEM_OBJECT_IMAGE2D, 1245type: OpenCL::MEM_OBJECT_BUFFER, OpenCL::MEM_OBJECT_IMAGE2D,
1203OpenCL::MEM_OBJECT_IMAGE3D, OpenCL::MEM_OBJECT_IMAGE2D_ARRAY, 1246OpenCL::MEM_OBJECT_IMAGE3D, OpenCL::MEM_OBJECT_IMAGE2D_ARRAY,
1204OpenCL::MEM_OBJECT_IMAGE1D, OpenCL::MEM_OBJECT_IMAGE1D_ARRAY, 1247OpenCL::MEM_OBJECT_IMAGE1D, OpenCL::MEM_OBJECT_IMAGE1D_ARRAY,
1205OpenCL::MEM_OBJECT_IMAGE1D_BUFFER. 1248OpenCL::MEM_OBJECT_IMAGE1D_BUFFER.
1206 1249
1381 1424
1382=item $ev = $queue->copy_buffer ($src, $dst, $src_offset, $dst_offset, $len, $wait_events...) 1425=item $ev = $queue->copy_buffer ($src, $dst, $src_offset, $dst_offset, $len, $wait_events...)
1383 1426
1384L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBuffer.html> 1427L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBuffer.html>
1385 1428
1386=item $ev = $queue->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...) 1429$eue->read_buffer_rect ($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...)
1387 1430
1388http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadBufferRect.html 1431http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadBufferRect.html
1389 1432
1390=item $ev = $queue->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...) 1433=item $ev = $queue->write_buffer_rect ($buf, $blocking, $buf_y, $host_x, $host_z, $height, $buf_row_pitch, $host_row_pitch, $data, $wait_events...)
1391 1434
1392http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBufferRect.html 1435http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBufferRect.html
1393 1436
1394=item $ev = $queue->copy_buffer_to_image ($src_buffer, $dst_image, $src_offset, $dst_x, $dst_y, $dst_z, $width, $height, $depth, $wait_events...) 1437=item $ev = $queue->copy_buffer_to_image ($src_buffer, $dst_image, $src_offset, $dst_x, $dst_y, $dst_z, $width, $height, $depth, $wait_events...)
1395 1438
1579it. You are not necessarily meant to do it this way, this example just 1622it. You are not necessarily meant to do it this way, this example just
1580shows you the accessors to use :) 1623shows you the accessors to use :)
1581 1624
1582 my $mapped = $queue->map_image ($image, 1, OpenCL::MAP_WRITE); 1625 my $mapped = $queue->map_image ($image, 1, OpenCL::MAP_WRITE);
1583 1626
1584 $mapped->set ($_ * $mapped->row_pitch, pack "C", 5) 1627 $mapped->write ($_ * $mapped->row_pitch, pack "C", 5)
1585 for 0..$image->height; 1628 for 0 .. $mapped->height - 1;
1586 1629
1587 $mapped->unmap;. 1630 $mapped->unmap;.
1588 $mapped->wait; # only needed for out of order queues normally 1631 $mapped->wait; # only needed for out of order queues normally
1589 1632
1590=item $ev = $queue->unmap ($mapped, $wait_events...) 1633=item $ev = $queue->unmap ($mapped, $wait_events...)
1610 1653
1611See C<< $platform->info >> for details. 1654See C<< $platform->info >> for details.
1612 1655
1613L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetMemObjectInfo.html> 1656L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetMemObjectInfo.html>
1614 1657
1658=item $memory->destructor_callback ($cb->())
1659
1660Sets a callback that will be invoked after the memory object is destructed.
1661
1662L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clSetMemObjectDestructorCallback.html>
1663
1615=for gengetinfo begin mem 1664=for gengetinfo begin mem
1616 1665
1617=item $mem_object_type = $mem->type 1666=item $mem_object_type = $mem->type
1618 1667
1619Calls C<clGetMemObjectInfo> with C<OpenCL::MEM_TYPE> and returns the result. 1668Calls C<clGetMemObjectInfo> with C<OpenCL::MEM_TYPE> and returns the result.
1676=over 4 1725=over 4
1677 1726
1678=item $subbuf = $buf_obj->sub_buffer_region ($flags, $origin, $size) 1727=item $subbuf = $buf_obj->sub_buffer_region ($flags, $origin, $size)
1679 1728
1680Creates an OpenCL::Buffer objects from this buffer and returns it. The 1729Creates an OpenCL::Buffer objects from this buffer and returns it. The
1681C<buffer_create_type> is assumed to be C<CL_BUFFER_CREATE_TYPE_REGION>. 1730C<buffer_create_type> is assumed to be C<OpenCL::BUFFER_CREATE_TYPE_REGION>.
1682 1731
1683L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateSubBuffer.html> 1732L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateSubBuffer.html>
1684 1733
1685=back 1734=back
1686 1735
1702L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetImageInfo.html> 1751L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetImageInfo.html>
1703 1752
1704=item ($channel_order, $channel_data_type) = $image->format 1753=item ($channel_order, $channel_data_type) = $image->format
1705 1754
1706Returns the channel order and type used to create the image by calling 1755Returns the channel order and type used to create the image by calling
1707C<clGetImageInfo> with C<CL_IMAGE_FORMAT>. 1756C<clGetImageInfo> with C<OpenCL::IMAGE_FORMAT>.
1708 1757
1709=for gengetinfo begin image 1758=for gengetinfo begin image
1710 1759
1711=item $int = $image->element_size 1760=item $int = $image->element_size
1712 1761
1835=item $packed_value = $program->build_info ($device, $name) 1884=item $packed_value = $program->build_info ($device, $name)
1836 1885
1837Similar to C<< $platform->info >>, but returns build info for a previous 1886Similar to C<< $platform->info >>, but returns build info for a previous
1838build attempt for the given device. 1887build attempt for the given device.
1839 1888
1889binary_type: OpenCL::PROGRAM_BINARY_TYPE_NONE,
1890OpenCL::PROGRAM_BINARY_TYPE_COMPILED_OBJECT,
1891OpenCL::PROGRAM_BINARY_TYPE_LIBRARY,
1892OpenCL::PROGRAM_BINARY_TYPE_EXECUTABLE.
1893
1840L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetBuildInfo.html> 1894L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetBuildInfo.html>
1841 1895
1842=item $kernel = $program->kernel ($function_name) 1896=item $kernel = $program->kernel ($function_name)
1843 1897
1844Creates an OpenCL::Kernel object out of the named C<__kernel> function in 1898Creates an OpenCL::Kernel object out of the named C<__kernel> function in
1863Calls C<clGetProgramBuildInfo> with C<OpenCL::PROGRAM_BUILD_OPTIONS> and returns the result. 1917Calls C<clGetProgramBuildInfo> with C<OpenCL::PROGRAM_BUILD_OPTIONS> and returns the result.
1864 1918
1865=item $string = $program->build_log ($device) 1919=item $string = $program->build_log ($device)
1866 1920
1867Calls C<clGetProgramBuildInfo> with C<OpenCL::PROGRAM_BUILD_LOG> and returns the result. 1921Calls C<clGetProgramBuildInfo> with C<OpenCL::PROGRAM_BUILD_LOG> and returns the result.
1922
1923=item $binary_type = $program->binary_type ($device)
1924
1925Calls C<clGetProgramBuildInfo> with C<OpenCL::PROGRAM_BINARY_TYPE> and returns the result.
1868 1926
1869=for gengetinfo end program_build 1927=for gengetinfo end program_build
1870 1928
1871=item $packed_value = $program->info ($name) 1929=item $packed_value = $program->info ($name)
1872 1930
2287 2345
2288This is a subclass of OpenCL::Mapped, representing mapped images. 2346This is a subclass of OpenCL::Mapped, representing mapped images.
2289 2347
2290=over 4 2348=over 4
2291 2349
2350=item $pixels = $mapped->width
2351
2352=item $pixels = $mapped->height
2353
2354=item $pixels = $mapped->depth
2355
2356Return the width/height/depth of the mapped image region, in pixels.
2357
2292=item $bytes = $mapped->row_pitch 2358=item $bytes = $mapped->row_pitch
2293 2359
2294=item $bytes = $mapped->slice_pitch 2360=item $bytes = $mapped->slice_pitch
2295 2361
2296Return the row or slice pitch of the image that has been mapped. 2362Return the row or slice pitch of the image that has been mapped.
2297 2363
2364=item $bytes = $mapped->element_size
2365
2366Return the size of a single pixel.
2367
2368=item $data = $mapped->get_row ($count, $x=0, $y=0, $z=0)
2369
2370Return C<$count> pixels from the given coordinates. The pixel data must
2371be completely contained within a single row.
2372
2373If C<$count> is C<undef>, then all the remaining pixels in that row are
2374returned.
2375
2376=item $mapped->set_row ($data, $x=0, $y=0, $z=0)
2377
2378Write the given pixel data at the given coordinate. The pixel data must
2379be completely contained within a single row.
2380
2298=back 2381=back
2299
2300 2382
2301=cut 2383=cut
2302 2384
23031; 23851;
2304 2386

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines