--- OpenCL/OpenCL.pm 2011/11/20 22:31:48 1.24 +++ OpenCL/OpenCL.pm 2011/12/10 23:07:38 1.28 @@ -670,23 +670,27 @@ =item $buf = $ctx->buffer ($flags, $len) -Creates a new OpenCL::Buffer object with the given flags and octet-size. +Creates a new OpenCL::Buffer (actually OpenCL::BufferObj) object with the +given flags and octet-size. L =item $buf = $ctx->buffer_sv ($flags, $data) -Creates a new OpenCL::Buffer object and initialise it with the given data values. +Creates a new OpenCL::Buffer (actually OpenCL::BufferObj) object and +initialise it with the given data values. =item $img = $ctx->image2d ($flags, $channel_order, $channel_type, $width, $height, $row_pitch = 0, $data = undef) -Creates a new OpenCL::Image2D object and optionally initialises it with the given data values. +Creates a new OpenCL::Image2D object and optionally initialises it with +the given data values. L =item $img = $ctx->image3d ($flags, $channel_order, $channel_type, $width, $height, $depth, $row_pitch = 0, $slice_pitch = 0, $data = undef) -Creates a new OpenCL::Image3D object and optionally initialises it with the given data values. +Creates a new OpenCL::Image3D object and optionally initialises it with +the given data values. L @@ -773,23 +777,25 @@ L -=item $ev = $queue->enqueue_read_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) - -L +=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...) -=item $ev = $queue->enqueue_write_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) +http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadBufferRect.html -L +=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...) -=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...) +http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBufferRect.html -Yeah. +=item $ev = $queue->enqueue_read_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) L =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...) -L. +L + +=item $ev = $queue->enqueue_write_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) + +L =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...) @@ -799,6 +805,12 @@ L +=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...) + +Yeah. + +L. + =item $ev = $queue->enqueue_task ($kernel, $wait_events...) L @@ -924,6 +936,29 @@ =back +=head2 THE OpenCL::Buffer CLASS + +This is a subclass of OpenCL::Memory, and the superclass of +OpenCL::BufferObj. Its purpose is simply to distinguish between buffers +and sub-buffers. + +=head2 THE OpenCL::BufferObj CLASS + +This is a subclass of OpenCL::Buffer and thus OpenCL::Memory. It exists +because one cna create sub buffers of OpenLC::BufferObj objects, but not +sub buffers from these sub buffers. + +=over 4 + +=item $subbuf = $buf_obj->sub_buffer_region ($flags, $origin, $size) + +Creates an OpenCL::Buffer objects from this buffer and returns it. The +C is assumed to be C. + +L + +=back + =head2 THE OpenCL::Image CLASS This is the superclass of all image objects - OpenCL::Image2D and OpenCL::Image3D. @@ -1269,18 +1304,20 @@ use common::sense; BEGIN { - our $VERSION = '0.55'; + our $VERSION = '0.91'; require XSLoader; XSLoader::load (__PACKAGE__, $VERSION); - @OpenCL::Buffer::ISA = - @OpenCL::Image::ISA = OpenCL::Memory::; + @OpenCL::Buffer::ISA = + @OpenCL::Image::ISA = OpenCL::Memory::; + + @OpenCL::BufferObj::ISA = OpenCL::Buffer::; - @OpenCL::Image2D::ISA = - @OpenCL::Image3D::ISA = OpenCL::Image::; + @OpenCL::Image2D::ISA = + @OpenCL::Image3D::ISA = OpenCL::Image::; - @OpenCL::UserEvent::ISA = OpenCL::Event::; + @OpenCL::UserEvent::ISA = OpenCL::Event::; } 1;