… | |
… | |
52 | |
52 | |
53 | OpenCL manpages: |
53 | OpenCL manpages: |
54 | |
54 | |
55 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/ |
55 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/ |
56 | |
56 | |
|
|
57 | If you are into UML class diagrams, the following diagram might help - if |
|
|
58 | not, it will be mildly cobfusing: |
|
|
59 | |
|
|
60 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/classDiagram.html |
|
|
61 | |
57 | Here's a tutorial from AMD (very AMD-centric, too), not sure how useful it |
62 | Here's a tutorial from AMD (very AMD-centric, too), not sure how useful it |
58 | is, but at least it's free of charge: |
63 | is, but at least it's free of charge: |
59 | |
64 | |
60 | http://developer.amd.com/zones/OpenCLZone/courses/Documents/Introduction_to_OpenCL_Programming%20Training_Guide%20%28201005%29.pdf |
65 | http://developer.amd.com/zones/OpenCLZone/courses/Documents/Introduction_to_OpenCL_Programming%20Training_Guide%20%28201005%29.pdf |
61 | |
66 | |
62 | If you are into UML class diagrams, the following diagram might help - if |
67 | And here's NVIDIA's OpenCL Best Practises Guide: |
63 | not, it will be mildly cofusing: |
|
|
64 | |
68 | |
65 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/classDiagram.html |
69 | http://developer.download.nvidia.com/compute/cuda/3_2/toolkit/docs/OpenCL_Best_Practices_Guide.pdf |
66 | |
70 | |
67 | =head1 BASIC WORKFLOW |
71 | =head1 BASIC WORKFLOW |
68 | |
72 | |
69 | To get something done, you basically have to do this once (refer to the |
73 | To get something done, you basically have to do this once (refer to the |
70 | examples below for actual code, this is just a high-level description): |
74 | examples below for actual code, this is just a high-level description): |
… | |
… | |
384 | |
388 | |
385 | =item $buf = $ctx->buffer_sv ($flags, $data) |
389 | =item $buf = $ctx->buffer_sv ($flags, $data) |
386 | |
390 | |
387 | Creates a new OpenCL::Buffer object and initialise it with the given data values. |
391 | Creates a new OpenCL::Buffer object and initialise it with the given data values. |
388 | |
392 | |
389 | =item $img = $ctx->image2d ($flags, $channel_order, $channel_type, $width, $height, $data) |
393 | =item $img = $ctx->image2d ($flags, $channel_order, $channel_type, $width, $height, $row_pitch = 0, $data = undef) |
390 | |
394 | |
391 | Creates a new OpenCL::Image2D object and optionally initialises it with the given data values. |
395 | Creates a new OpenCL::Image2D object and optionally initialises it with the given data values. |
392 | |
396 | |
393 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage2D.html> |
397 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage2D.html> |
394 | |
398 | |
395 | =item $img = $ctx->image3d ($flags, $channel_order, $channel_type, $width, $height, $depth, $slice_pitch, $data) |
399 | =item $img = $ctx->image3d ($flags, $channel_order, $channel_type, $width, $height, $depth, $row_pitch = 0, $slice_pitch = 0, $data = undef) |
396 | |
400 | |
397 | Creates a new OpenCL::Image3D object and optionally initialises it with the given data values. |
401 | Creates a new OpenCL::Image3D object and optionally initialises it with the given data values. |
398 | |
402 | |
399 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage3D.html> |
403 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage3D.html> |
400 | |
404 | |
… | |
… | |
656 | package OpenCL; |
660 | package OpenCL; |
657 | |
661 | |
658 | use common::sense; |
662 | use common::sense; |
659 | |
663 | |
660 | BEGIN { |
664 | BEGIN { |
661 | our $VERSION = '0.14'; |
665 | our $VERSION = '0.15'; |
662 | |
666 | |
663 | require XSLoader; |
667 | require XSLoader; |
664 | XSLoader::load (__PACKAGE__, $VERSION); |
668 | XSLoader::load (__PACKAGE__, $VERSION); |
665 | |
669 | |
666 | @OpenCL::Buffer::ISA = |
670 | @OpenCL::Buffer::ISA = |