… | |
… | |
201 | |
201 | |
202 | =head1 DOCUMENTATION |
202 | =head1 DOCUMENTATION |
203 | |
203 | |
204 | =head2 BASIC CONVENTIONS |
204 | =head2 BASIC CONVENTIONS |
205 | |
205 | |
206 | This is not a 1:1 C-style translation of OpenCL to Perl - instead I |
206 | This is not a one-to-one C-style translation of OpenCL to Perl - instead |
207 | attempted to make the interface as type-safe as possible and introducing |
207 | I attempted to make the interface as type-safe as possible by introducing |
208 | object syntax where it makes sense. There are a number of important |
208 | object syntax where it makes sense. There are a number of important |
209 | differences between the OpenCL C API and this module: |
209 | differences between the OpenCL C API and this module: |
210 | |
210 | |
211 | =over 4 |
211 | =over 4 |
212 | |
212 | |
… | |
… | |
219 | prefixes (C<< $platform->info >>). |
219 | prefixes (C<< $platform->info >>). |
220 | |
220 | |
221 | =item * OpenCL often specifies fixed vector function arguments as short |
221 | =item * OpenCL often specifies fixed vector function arguments as short |
222 | arrays (C<size_t origin[3]>), while this module explicitly expects the |
222 | arrays (C<size_t origin[3]>), while this module explicitly expects the |
223 | components as separate arguments- |
223 | components as separate arguments- |
|
|
224 | |
|
|
225 | =item * Structures are often specified with their components, and returned |
|
|
226 | as arrayrefs. |
224 | |
227 | |
225 | =item * Where possible, one of the pitch values is calculated from the |
228 | =item * Where possible, one of the pitch values is calculated from the |
226 | perl scalar length and need not be specified. |
229 | perl scalar length and need not be specified. |
227 | |
230 | |
228 | =item * When enqueuing commands, the wait list is specified by adding |
231 | =item * When enqueuing commands, the wait list is specified by adding |
… | |
… | |
643 | package OpenCL; |
646 | package OpenCL; |
644 | |
647 | |
645 | use common::sense; |
648 | use common::sense; |
646 | |
649 | |
647 | BEGIN { |
650 | BEGIN { |
648 | our $VERSION = '0.03'; |
651 | our $VERSION = '0.14'; |
649 | |
652 | |
650 | require XSLoader; |
653 | require XSLoader; |
651 | XSLoader::load (__PACKAGE__, $VERSION); |
654 | XSLoader::load (__PACKAGE__, $VERSION); |
652 | |
655 | |
653 | @OpenCL::Buffer::ISA = |
656 | @OpenCL::Buffer::ISA = |