--- OpenCL/OpenCL.pm 2011/12/10 23:07:38 1.28 +++ OpenCL/OpenCL.pm 2012/04/05 07:13:44 1.29 @@ -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 } } @@ -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.