… | |
… | |
668 | |
668 | |
669 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateUserEvent.html> |
669 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateUserEvent.html> |
670 | |
670 | |
671 | =item $buf = $ctx->buffer ($flags, $len) |
671 | =item $buf = $ctx->buffer ($flags, $len) |
672 | |
672 | |
673 | Creates a new OpenCL::Buffer object with the given flags and octet-size. |
673 | Creates a new OpenCL::Buffer (actually OpenCL::BufferObj) object with the |
|
|
674 | given flags and octet-size. |
674 | |
675 | |
675 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateBuffer.html> |
676 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateBuffer.html> |
676 | |
677 | |
677 | =item $buf = $ctx->buffer_sv ($flags, $data) |
678 | =item $buf = $ctx->buffer_sv ($flags, $data) |
678 | |
679 | |
679 | Creates a new OpenCL::Buffer object and initialise it with the given data values. |
680 | Creates a new OpenCL::Buffer (actually OpenCL::BufferObj) object and |
|
|
681 | initialise it with the given data values. |
680 | |
682 | |
681 | =item $img = $ctx->image2d ($flags, $channel_order, $channel_type, $width, $height, $row_pitch = 0, $data = undef) |
683 | =item $img = $ctx->image2d ($flags, $channel_order, $channel_type, $width, $height, $row_pitch = 0, $data = undef) |
682 | |
684 | |
683 | Creates a new OpenCL::Image2D object and optionally initialises it with the given data values. |
685 | Creates a new OpenCL::Image2D object and optionally initialises it with |
|
|
686 | the given data values. |
684 | |
687 | |
685 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage2D.html> |
688 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage2D.html> |
686 | |
689 | |
687 | =item $img = $ctx->image3d ($flags, $channel_order, $channel_type, $width, $height, $depth, $row_pitch = 0, $slice_pitch = 0, $data = undef) |
690 | =item $img = $ctx->image3d ($flags, $channel_order, $channel_type, $width, $height, $depth, $row_pitch = 0, $slice_pitch = 0, $data = undef) |
688 | |
691 | |
689 | Creates a new OpenCL::Image3D object and optionally initialises it with the given data values. |
692 | Creates a new OpenCL::Image3D object and optionally initialises it with |
|
|
693 | the given data values. |
690 | |
694 | |
691 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage3D.html> |
695 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage3D.html> |
692 | |
696 | |
693 | =item @formats = $ctx->supported_image_formats ($flags, $image_type) |
697 | =item @formats = $ctx->supported_image_formats ($flags, $image_type) |
694 | |
698 | |
… | |
… | |
781 | |
785 | |
782 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBufferRect.html |
786 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBufferRect.html |
783 | |
787 | |
784 | =item $ev = $queue->enqueue_read_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) |
788 | =item $ev = $queue->enqueue_read_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) |
785 | |
789 | |
|
|
790 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferRect.html> |
|
|
791 | |
|
|
792 | =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...) |
|
|
793 | |
786 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadImage.html> |
794 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadImage.html> |
787 | |
795 | |
788 | =item $ev = $queue->enqueue_write_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) |
796 | =item $ev = $queue->enqueue_write_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) |
789 | |
797 | |
790 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteImage.html> |
798 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteImage.html> |
791 | |
799 | |
|
|
800 | =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...) |
|
|
801 | |
|
|
802 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImage.html> |
|
|
803 | |
|
|
804 | =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...) |
|
|
805 | |
|
|
806 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImageToBuffer.html> |
|
|
807 | |
792 | =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...) |
808 | =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...) |
793 | |
809 | |
794 | Yeah. |
810 | Yeah. |
795 | |
811 | |
796 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferRect.html> |
|
|
797 | |
|
|
798 | =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...) |
|
|
799 | |
|
|
800 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferToImage.html>. |
812 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferToImage.html>. |
801 | |
|
|
802 | =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...) |
|
|
803 | |
|
|
804 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImage.html> |
|
|
805 | |
|
|
806 | =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...) |
|
|
807 | |
|
|
808 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImageToBuffer.html> |
|
|
809 | |
813 | |
810 | =item $ev = $queue->enqueue_task ($kernel, $wait_events...) |
814 | =item $ev = $queue->enqueue_task ($kernel, $wait_events...) |
811 | |
815 | |
812 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueTask.html> |
816 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueTask.html> |
813 | |
817 | |
… | |
… | |
930 | |
934 | |
931 | =for gengetinfo end mem |
935 | =for gengetinfo end mem |
932 | |
936 | |
933 | =back |
937 | =back |
934 | |
938 | |
|
|
939 | =head2 THE OpenCL::Buffer CLASS |
|
|
940 | |
|
|
941 | This is a subclass of OpenCL::Memory, and the superclass of |
|
|
942 | OpenCL::BufferObj. Its purpose is simply to distinguish between buffers |
|
|
943 | and sub-buffers. |
|
|
944 | |
|
|
945 | =head2 THE OpenCL::BufferObj CLASS |
|
|
946 | |
|
|
947 | This is a subclass of OpenCL::Buffer and thus OpenCL::Memory. It exists |
|
|
948 | because one cna create sub buffers of OpenLC::BufferObj objects, but not |
|
|
949 | sub buffers from these sub buffers. |
|
|
950 | |
|
|
951 | =over 4 |
|
|
952 | |
|
|
953 | =item $subbuf = $buf_obj->sub_buffer_region ($flags, $origin, $size) |
|
|
954 | |
|
|
955 | Creates an OpenCL::Buffer objects from this buffer and returns it. The |
|
|
956 | C<buffer_create_type> is assumed to be C<CL_BUFFER_CREATE_TYPE_REGION>. |
|
|
957 | |
|
|
958 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateSubBuffer.html> |
|
|
959 | |
|
|
960 | =back |
|
|
961 | |
935 | =head2 THE OpenCL::Image CLASS |
962 | =head2 THE OpenCL::Image CLASS |
936 | |
963 | |
937 | This is the superclass of all image objects - OpenCL::Image2D and OpenCL::Image3D. |
964 | This is the superclass of all image objects - OpenCL::Image2D and OpenCL::Image3D. |
938 | |
965 | |
939 | =over 4 |
966 | =over 4 |
… | |
… | |
1275 | package OpenCL; |
1302 | package OpenCL; |
1276 | |
1303 | |
1277 | use common::sense; |
1304 | use common::sense; |
1278 | |
1305 | |
1279 | BEGIN { |
1306 | BEGIN { |
1280 | our $VERSION = '0.59'; |
1307 | our $VERSION = '0.91'; |
1281 | |
1308 | |
1282 | require XSLoader; |
1309 | require XSLoader; |
1283 | XSLoader::load (__PACKAGE__, $VERSION); |
1310 | XSLoader::load (__PACKAGE__, $VERSION); |
1284 | |
1311 | |
1285 | @OpenCL::Buffer::ISA = |
1312 | @OpenCL::Buffer::ISA = |
1286 | @OpenCL::Image::ISA = OpenCL::Memory::; |
1313 | @OpenCL::Image::ISA = OpenCL::Memory::; |
1287 | |
1314 | |
|
|
1315 | @OpenCL::BufferObj::ISA = OpenCL::Buffer::; |
|
|
1316 | |
1288 | @OpenCL::Image2D::ISA = |
1317 | @OpenCL::Image2D::ISA = |
1289 | @OpenCL::Image3D::ISA = OpenCL::Image::; |
1318 | @OpenCL::Image3D::ISA = OpenCL::Image::; |
1290 | |
1319 | |
1291 | @OpenCL::UserEvent::ISA = OpenCL::Event::; |
1320 | @OpenCL::UserEvent::ISA = OpenCL::Event::; |
1292 | } |
1321 | } |
1293 | |
1322 | |
1294 | 1; |
1323 | 1; |
1295 | |
1324 | |
1296 | =head1 AUTHOR |
1325 | =head1 AUTHOR |