--- OpenCL/OpenCL.pm 2011/12/10 23:07:38 1.28 +++ OpenCL/OpenCL.pm 2012/04/19 12:12:03 1.32 @@ -107,7 +107,7 @@ printf "extensions: %s\n", $platform->extensions; for my $device ($platform->devices) { printf "+ device: %s\n", $device->name; - my $ctx = $device->context; + my $ctx = $platform->context (undef, [$device]); # do stuff } } @@ -151,8 +151,8 @@ functions. my $src = ' - __kernel void - squareit (__global float *input, __global float *output) + kernel void + squareit (global float *input, global float *output) { $id = get_global_id (0); output [id] = input [id] * input [id]; @@ -273,6 +273,13 @@ half IV ushort S double NV double d +=head2 OpenGL sharing + +This module can be optionally compiled with support for +OpenGL sharing. The sharing functions are only available when +C returns true, otherwise they are absent and cannot +be called. + =head2 THE OpenCL PACKAGE =over 4 @@ -288,9 +295,9 @@ =item $str = OpenCL::enum2str $enum -Converts most enum values (inof parameter names, image format constants, +Converts most enum values (of parameter names, image format constants, object types, addressing and filter modes, command types etc.) into a -human readbale string. When confronted with some random integer it can be +human readable string. When confronted with some random integer it can be very helpful to pass it through this function to maybe get some readable string out of it. @@ -328,7 +335,7 @@ L -=item $ctx = $device->context ($properties = undef, @$devices, $notify = undef) +=item $ctx = $platform->context ($properties = undef, @$devices, $notify = undef) Create a new OpenCL::Context object using the given device object(s)- a CL_CONTEXT_PLATFORM property is supplied automatically. @@ -1304,7 +1311,7 @@ use common::sense; BEGIN { - our $VERSION = '0.91'; + our $VERSION = '0.92'; require XSLoader; XSLoader::load (__PACKAGE__, $VERSION);