--- OpenCL/OpenCL.pm 2011/11/19 19:54:04 1.19 +++ OpenCL/OpenCL.pm 2011/11/20 01:09:48 1.20 @@ -29,7 +29,7 @@ kernel function in a program you can then create an OpenCL::Kernel object which represents basically a function call with argument values. -OpenCL::Memory objects of various flavours: OpenCL::Buffers objects (flat +OpenCL::Memory objects of various flavours: OpenCL::Buffer objects (flat memory areas, think arrays or structs) and OpenCL::Image objects (think 2d or 3d array) for bulk data and input and output for kernels. @@ -228,9 +228,10 @@ to free objects explicitly (C), the release function is called automatically once all Perl references to it go away. -=item * OpenCL uses CamelCase for function names (e.g. C, C), -while this module uses underscores as word separator and often leaves out -prefixes (C, C<< $platform->info >>). +=item * OpenCL uses CamelCase for function names +(e.g. C, C), while this module +uses underscores as word separator and often leaves out prefixes +(C, C<< $platform->info >>). =item * OpenCL often specifies fixed vector function arguments as short arrays (C), while this module explicitly expects the @@ -317,14 +318,6 @@ =over 4 -=item $packed_value = $platform->info ($name) - -Calls C and returns the packed, raw value - for -strings, this will be the string, for other values you probably need to -use the correct C. This might get improved in the future. Hopefully. - -L - =item @devices = $platform->devices ($type = OpenCL::DEVICE_TYPE_ALL) Returns a list of matching OpenCL::Device objects. @@ -342,6 +335,41 @@ L +=item $packed_value = $platform->info ($name) + +Calls C and returns the packed, raw value - for +strings, this will be the string, for other values you probably need to +use the correct C. + +It's best to avoid this method and use one of the predefined C +methods. + +L + +=for gengetinfo begin platform + + +=item $string = $platform->profile + +Calls C with C and returns the result(s). + +=item $string = $platform->version + +Calls C with C and returns the result(s). + +=item $string = $platform->name + +Calls C with C and returns the result(s). + +=item $string = $platform->vendor + +Calls C with C and returns the result(s). + +=item $string = $platform->extensions + +Calls C with C and returns the result(s). +=for gengetinfo end platform + =back =head2 THE OpenCL::Device CLASS @@ -360,12 +388,6 @@ =over 4 -=item $packed_value = $ctx->info ($name) - -See C<< $platform->info >> for details. - -L - =item $queue = $ctx->queue ($device, $properties) Create a new OpenCL::Queue object from the context and the given device. @@ -419,6 +441,16 @@ L +=item $packed_value = $ctx->info ($name) + +See C<< $platform->info >> for details. + +L + +=for gengetinfo begin context + +=for gengetinfo end context + =back =head2 THE OpenCL::Queue CLASS @@ -549,6 +581,23 @@ =back +=head2 THE OpenCL::Image CLASS + +This is the superclass of all image objects - OpenCL::Image2D and OpenCL::Image3D. + +=over 4 + +=item $packed_value = $ev->image_info ($name) + +See C<< $platform->info >> for details. + +The reason this method is not called C is that there already is an +C<< ->info >> method inherited from C. + +L + +=back + =head2 THE OpenCL::Sampler CLASS =over 4 @@ -603,6 +652,15 @@ L +=item $packed_value = $kernel->work_group_info ($device, $name) + +See C<< $platform->info >> for details. + +The reason this method is not called C is that there already is an +C<< ->info >> method. + +L + =item $kernel->set_TYPE ($index, $value) This is a family of methods to set the kernel argument with the number C<$index> to the give C<$value>. @@ -633,6 +691,15 @@ L +=item $packed_value = $ev->profiling_info ($name) + +See C<< $platform->info >> for details. + +The reason this method is not called C is that there already is an +C<< ->info >> method. + +L + =item $ev->wait Waits for the event to complete.