--- OpenCL/OpenCL.pm 2011/12/10 23:07:38 1.28 +++ OpenCL/OpenCL.pm 2012/04/05 10:08:59 1.30 @@ -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 } } @@ -288,9 +288,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 +328,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.