… | |
… | |
6 | |
6 | |
7 | use OpenCL; |
7 | use OpenCL; |
8 | |
8 | |
9 | =head1 DESCRIPTION |
9 | =head1 DESCRIPTION |
10 | |
10 | |
11 | This is an early release which might be useful, but hasn't seen any testing. |
11 | This is an early release which might be useful, but hasn't seen much testing. |
12 | |
12 | |
13 | =head1 HELPFUL RESOURCES |
13 | =head1 HELPFUL RESOURCES |
14 | |
14 | |
15 | The OpenCL spec used to develop this module (1.2 spec was available, but |
15 | The OpenCL spec used to develop this module (1.2 spec was available, but |
16 | no implementation was available to me :). |
16 | no implementation was available to me :). |
… | |
… | |
165 | other status is returned the function will throw an exception, so you |
165 | other status is returned the function will throw an exception, so you |
166 | don't normally have to to any error checking. |
166 | don't normally have to to any error checking. |
167 | |
167 | |
168 | =back |
168 | =back |
169 | |
169 | |
|
|
170 | =head2 PERL AND OPENCL TYPES |
|
|
171 | |
|
|
172 | This handy(?) table lists OpenCL types and their perl and pack/unpack |
|
|
173 | format equivalents: |
|
|
174 | |
|
|
175 | OpenCL perl pack/unpack |
|
|
176 | char IV c |
|
|
177 | uchar IV C |
|
|
178 | short IV s |
|
|
179 | ushort IV S |
|
|
180 | int IV l |
|
|
181 | uint IV L |
|
|
182 | long IV q |
|
|
183 | ulong IV Q |
|
|
184 | float NV f |
|
|
185 | half IV S |
|
|
186 | double NV d |
|
|
187 | |
170 | =head2 THE OpenCL PACKAGE |
188 | =head2 THE OpenCL PACKAGE |
171 | |
189 | |
172 | =over 4 |
190 | =over 4 |
173 | |
191 | |
174 | =item $int = OpenCL::errno |
192 | =item $int = OpenCL::errno |
… | |
… | |
327 | They also allow you to specify any number of other event objects that this |
345 | They also allow you to specify any number of other event objects that this |
328 | request has to wait for before it starts executing, by simply passing the |
346 | request has to wait for before it starts executing, by simply passing the |
329 | event objects as extra parameters to the enqueue methods. |
347 | event objects as extra parameters to the enqueue methods. |
330 | |
348 | |
331 | Queues execute in-order by default, without any parallelism, so in most |
349 | Queues execute in-order by default, without any parallelism, so in most |
332 | cases it's not necessary to wait for or create event objects. |
350 | cases (i.e. you use only one queue) it's not necessary to wait for or |
|
|
351 | create event objects. |
333 | |
352 | |
334 | =over 4 |
353 | =over 4 |
335 | |
354 | |
336 | =item $packed_value = $ctx->info ($name) |
355 | =item $packed_value = $ctx->info ($name) |
337 | |
356 | |