ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/OpenCL/OpenCL.pm
(Generate patch)

Comparing OpenCL/OpenCL.pm (file contents):
Revision 1.28 by root, Sat Dec 10 23:07:38 2011 UTC vs.
Revision 1.29 by root, Thu Apr 5 07:13:44 2012 UTC

105 for my $platform (OpenCL::platforms) { 105 for my $platform (OpenCL::platforms) {
106 printf "platform: %s\n", $platform->name; 106 printf "platform: %s\n", $platform->name;
107 printf "extensions: %s\n", $platform->extensions; 107 printf "extensions: %s\n", $platform->extensions;
108 for my $device ($platform->devices) { 108 for my $device ($platform->devices) {
109 printf "+ device: %s\n", $device->name; 109 printf "+ device: %s\n", $device->name;
110 my $ctx = $device->context; 110 my $ctx = $platform->context (undef, [$device]);
111 # do stuff 111 # do stuff
112 } 112 }
113 } 113 }
114 114
115=head2 Get a useful context and a command queue. 115=head2 Get a useful context and a command queue.
326 326
327Tries to create a context. Never worked for me, and you need devices explicitly anyway. 327Tries to create a context. Never worked for me, and you need devices explicitly anyway.
328 328
329L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html> 329L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html>
330 330
331=item $ctx = $device->context ($properties = undef, @$devices, $notify = undef) 331=item $ctx = $platform->context ($properties = undef, @$devices, $notify = undef)
332 332
333Create a new OpenCL::Context object using the given device object(s)- a 333Create a new OpenCL::Context object using the given device object(s)- a
334CL_CONTEXT_PLATFORM property is supplied automatically. 334CL_CONTEXT_PLATFORM property is supplied automatically.
335 335
336L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContext.html> 336L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContext.html>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines