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

Comparing OpenCL/OpenCL.pm (file contents):
Revision 1.4 by root, Tue Nov 15 21:16:19 2011 UTC vs.
Revision 1.5 by root, Wed Nov 16 00:35:30 2011 UTC

1=head1 NAME 1=head1 NAME
2 2
3OpenCL - bindings to, well, OpenCL 3OpenCL - Open Computing Language Bindings
4 4
5=head1 SYNOPSIS 5=head1 SYNOPSIS
6 6
7 use OpenCL; 7 use OpenCL;
8 8
9=head1 DESCRIPTION 9=head1 DESCRIPTION
10 10
11This is an early release which is not useful yet. 11This is an early release which might be useful, but hasn't seen any testing.
12 12
13=head1 HELPFUL RESOURCES 13=head1 HELPFUL RESOURCES
14 14
15The OpenCL spec used to dveelop this module (1.2 spec was available, but 15The OpenCL spec used to develop this module (1.2 spec was available, but
16no implementation was available to me :). 16no implementation was available to me :).
17 17
18 http://www.khronos.org/registry/cl/specs/opencl-1.1.pdf 18 http://www.khronos.org/registry/cl/specs/opencl-1.1.pdf
19 19
20OpenCL manpages: 20OpenCL manpages:
21 21
22 http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/ 22 http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/
23 23
24=head1 EXAMPLES 24=head1 EXAMPLES
25 25
26Enumerate all devices and get contexts for them; 26=head2 Enumerate all devices and get contexts for them.
27 27
28 for my $platform (OpenCL::platforms) { 28 for my $platform (OpenCL::platforms) {
29 warn $platform->info (OpenCL::PLATFORM_NAME); 29 warn $platform->info (OpenCL::PLATFORM_NAME);
30 warn $platform->info (OpenCL::PLATFORM_EXTENSIONS); 30 warn $platform->info (OpenCL::PLATFORM_EXTENSIONS);
31 for my $device ($platform->devices) { 31 for my $device ($platform->devices) {
33 my $ctx = $device->context_simple; 33 my $ctx = $device->context_simple;
34 # do stuff 34 # do stuff
35 } 35 }
36 } 36 }
37 37
38Get a useful context and a command queue: 38=head2 Get a useful context and a command queue.
39 39
40 my $dev = ((OpenCL::platforms)[0]->devices)[0]; 40 my $dev = ((OpenCL::platforms)[0]->devices)[0];
41 my $ctx = $dev->context_simple; 41 my $ctx = $dev->context_simple;
42 my $queue = $ctx->command_queue_simple ($dev); 42 my $queue = $ctx->command_queue_simple ($dev);
43 43
44Create a buffer with some predefined data, read it back synchronously,
45then asynchronously:
46
47 my $buf = $ctx->buffer_sv (OpenCL::MEM_COPY_HOST_PTR, "helmut");
48
49 $queue->enqueue_read_buffer ($buf, 1, 1, 3, my $data);
50 warn $data;
51
52 my $ev = $queue->enqueue_read_buffer ($buf, 0, 1, 3, my $data);
53 $ev->wait;
54 warn $data;
55
56Print all supported image formats: 44=head2 Print all supported image formats of a context.
57 45
58 for my $type (OpenCL::MEM_OBJECT_IMAGE2D, OpenCL::MEM_OBJECT_IMAGE3D) { 46 for my $type (OpenCL::MEM_OBJECT_IMAGE2D, OpenCL::MEM_OBJECT_IMAGE3D) {
59 say "supported image formats for ", OpenCL::enum2str $type; 47 say "supported image formats for ", OpenCL::enum2str $type;
60 48
61 for my $f ($ctx->supported_image_formats (0, $type)) { 49 for my $f ($ctx->supported_image_formats (0, $type)) {
62 printf " %-10s %-20s\n", OpenCL::enum2str $f->[0], OpenCL::enum2str $f->[1]; 50 printf " %-10s %-20s\n", OpenCL::enum2str $f->[0], OpenCL::enum2str $f->[1];
63 } 51 }
64 } 52 }
65 53
54=head2 Create a buffer with some predefined data, read it back synchronously,
55then asynchronously.
56
57 my $buf = $ctx->buffer_sv (OpenCL::MEM_COPY_HOST_PTR, "helmut");
58
59 $queue->enqueue_read_buffer ($buf, 1, 1, 3, my $data);
60 warn $data;
61
62 my $ev = $queue->enqueue_read_buffer ($buf, 0, 1, 3, my $data);
63 $ev->wait;
64 warn $data;
65
66Create and build a program, then create a kernel out of one of its 66=head2 Create and build a program, then create a kernel out of one of its
67functions: 67functions.
68 68
69 my $src = ' 69 my $src = '
70 __kernel void 70 __kernel void
71 squareit (__global float *input, __global float *output) 71 squareit (__global float *input, __global float *output)
72 { 72 {
80 eval { $prog->build ($dev); 1 } 80 eval { $prog->build ($dev); 1 }
81 or die $prog->build_info ($dev, OpenCL::PROGRAM_BUILD_LOG); 81 or die $prog->build_info ($dev, OpenCL::PROGRAM_BUILD_LOG);
82 82
83 my $kernel = $prog->kernel ("squareit"); 83 my $kernel = $prog->kernel ("squareit");
84 84
85Create some input and output float buffers, then call squareit on them: 85=head2 Create some input and output float buffers, then call squareit on them.
86 86
87 my $input = $ctx->buffer_sv (OpenCL::MEM_COPY_HOST_PTR, pack "f*", 1, 2, 3, 4.5); 87 my $input = $ctx->buffer_sv (OpenCL::MEM_COPY_HOST_PTR, pack "f*", 1, 2, 3, 4.5);
88 my $output = $ctx->buffer (0, OpenCL::SIZEOF_FLOAT * 5); 88 my $output = $ctx->buffer (0, OpenCL::SIZEOF_FLOAT * 5);
89 89
90 # set buffer 90 # set buffer
92 $kernel->set_buffer (1, $output); 92 $kernel->set_buffer (1, $output);
93 93
94 # execute it for all 4 numbers 94 # execute it for all 4 numbers
95 $queue->enqueue_nd_range_kernel ($kernel, undef, [4], undef); 95 $queue->enqueue_nd_range_kernel ($kernel, undef, [4], undef);
96 96
97 # enqueue a barrier ot ensure in-order execution (not really needed in this case) 97 # enqueue a synchronous read
98 $queue->enqueue_barrier;
99
100 # enqueue an async read (could easily be blocking here though), then wait for it:
101 my $ev = $queue->enqueue_read_buffer ($output, 0, 0, OpenCL::SIZEOF_FLOAT * 4, my $data); 98 $queue->enqueue_read_buffer ($output, 1, 0, OpenCL::SIZEOF_FLOAT * 4, my $data);
102 $ev->wait;
103 99
104 # print the results: 100 # print the results:
105 say join ", ", unpack "f*", $data; 101 say join ", ", unpack "f*", $data;
106 102
103=head2 The same enqueue operations as before, but assuming an out-of-order queue,
104showing off barriers.
105
106 # execute it for all 4 numbers
107 $queue->enqueue_nd_range_kernel ($kernel, undef, [4], undef);
108
109 # enqueue a barrier to ensure in-order execution
110 $queue->enqueue_barrier;
111
112 # enqueue an async read
113 $queue->enqueue_read_buffer ($output, 0, 0, OpenCL::SIZEOF_FLOAT * 4, my $data);
114
115 # wait for all requests to finish
116 $queue->finish;
117
118=head2 The same enqueue operations as before, but assuming an out-of-order queue,
119showing off event objects and wait lists.
120
121 # execute it for all 4 numbers
122 my $ev = $queue->enqueue_nd_range_kernel ($kernel, undef, [4], undef);
123
124 # enqueue an async read
125 $ev = $queue->enqueue_read_buffer ($output, 0, 0, OpenCL::SIZEOF_FLOAT * 4, my $data, $ev);
126
127 # wait for the last event to complete
128 $ev->wait;
129
130=head1 DOCUMENTATION
131
132=head2 BASIC CONVENTIONS
133
134This is not a 1:1 C-style translation of OpenCL to Perl - instead I
135attempted to make the interface as type-safe as possible and introducing
136object syntax where it makes sense. There are a number of important
137differences between the OpenCL C API and this module:
138
107=over 4 139=over 4
140
141=item * Object lifetime managament is automatic - there is no need
142to free objects explicitly (C<clReleaseXXX>), the release function
143is called automatically once all Perl references to it go away.
144
145=item * OpenCL uses CamelCase for function names (C<clGetPlatformInfo>),
146while this module uses underscores as word separator and often leaves out
147prefixes (C<< $platform->info >>).
148
149=item * OpenCL often specifies fixed vector function arguments as short
150arrays (C<size_t origin[3]>), while this module explicitly expects the
151components as separate arguments-
152
153=item * Where possible, the row_pitch value is calculated from the perl
154scalar length and need not be specified.
155
156=item * When enqueuing commands, the wait list is specified by adding
157extra arguments to the function - everywhere a C<$wait_events...> argument
158is documented this can be any number of event objects.
159
160=item * When enqueuing commands, if the enqueue method is called in void
161context, no event is created. In all other contexts an event is returned
162by the method.
163
164=item * This module expects all functions to return C<CL_SUCCESS>. If any
165other status is returned the function will throw an exception, so you
166don't normally have to to any error checking.
167
168=back
169
170=head2 THE OpenCL PACKAGE
171
172=over 4
173
174=item $int = OpenCL::errno
175
176The last error returned by a function - it's only changed on errors.
177
178=item $str = OpenCL::err2str $errval
179
180Comverts an error value into a human readable string.
181
182=item $str = OpenCL::err2str $enum
183
184Converts most enum values (inof parameter names, image format constants,
185object types, addressing and filter modes, command types etc.) into a
186human readbale string. When confronted with some random integer it can be
187very helpful to pass it through this function to maybe get some readable
188string out of it.
189
190=item @platforms = OpenCL::platforms
191
192Returns all available OpenCL::Platform objects.
193
194L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetPlatformIDs.html>
195
196=item $ctx = OpenCL::context_from_type_simple $type = OpenCL::DEVICE_TYPE_DEFAULT
197
198Tries to create a context from a default device and platform - never worked for me.
199
200L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html>
201
202=item OpenCL::wait_for_events $wait_events...
203
204Waits for all events to complete.
205
206L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clWaitForEvents.html>
207
208=back
209
210=head2 THE OpenCL::Platform CLASS
211
212=over 4
213
214=item $packed_value = $platform->info ($name)
215
216Calls C<clGetPlatformInfo> and returns the packed, raw value - for
217strings, this will be the string, for other values you probably need to
218use the correct C<unpack>. This might get improved in the future. Hopefully.
219
220L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetPlatformInfo.html>
221
222=item @devices = $platform->devices ($type = OpenCL::DEVICE_TYPE_ALL)
223
224Returns a list of matching OpenCL::Device objects.
225
226=item $ctx = $platform->context_from_type_simple ($type = OpenCL::DEVICE_TYPE_DEFAULT)
227
228Tries to create a context. Never worked for me.
229
230L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html>
231
232=back
233
234=head2 THE OpenCL::Device CLASS
235
236=over 4
237
238=item $packed_value = $device->info ($name)
239
240See C<< $platform->info >> for details.
241
242L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetDeviceInfo.html>
243
244=item $ctx = $device->context_simple
245
246Convenience function to create a new OpenCL::Context object.
247
248L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContext.html>
249
250=back
251
252=head2 THE OpenCL::Context CLASS
253
254=over 4
255
256=item $packed_value = $ctx->info ($name)
257
258See C<< $platform->info >> for details.
259
260L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetContextInfo.html>
261
262=item $queue = $ctx->command_queue_simple ($device)
263
264Convenience function to create a new OpenCL::Queue object from the context and the given device.
265
266L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateCommandQueue.html>
267
268=item $ev = $ctx->user_event
269
270Creates a new OpenCL::UserEvent object.
271
272L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateUserEvent.html>
273
274=item $buf = $ctx->buffer ($flags, $len)
275
276Creates a new OpenCL::Buffer object with the given flags and octet-size.
277
278L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateBuffer.html>
279
280=item $buf = $ctx->buffer_sv ($flags, $data)
281
282Creates a new OpenCL::Buffer object and initialise it with the given data values.
283
284=item $img = $ctx->image2d ($flags, $channel_order, $channel_type, $width, $height, $data)
285
286Creates a new OpenCL::Image2D object and optionally initialises it with the given data values.
287
288L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage2D.html>
289
290=item $img = $ctx->image3d ($flags, $channel_order, $channel_type, $width, $height, $depth, $slice_pitch, $data)
291
292Creates a new OpenCL::Image3D object and optionally initialises it with the given data values.
293
294L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage3D.html>
295
296=item @formats = $ctx->supported_image_formats ($flags, $image_type)
297
298Returns a list of matching image formats - each format is an arrayref with
299two values, $channel_order and $channel_type, in it.
300
301L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetSupportedImageFormats.html>
302
303=item $sampler = $ctx->sampler ($normalized_coords, $addressing_mode, $filter_mode)
304
305Creates a new OpenCL::Sampler object.
306
307L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateSampler.html>
308
309=item $program = $ctx->program_with_source ($string)
310
311Creates a new OpenCL::Program object from the given source code.
312
313L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateProgramWithSource.html>
314
315=back
316
317=head2 THE OpenCL::Queue CLASS
318
319An OpenCL::Queue represents an execution queue for OpenCL. You execute
320requests by calling their respective C<enqueue_xxx> method and waitinf for
321it to complete in some way.
322
323All the enqueue methods return an event object that can be used to wait
324for completion, unless the method is called in void context, in which case
325no event object is created.
326
327They also allow you to specify any number of other event objects that this
328request has to wait for before it starts executing, by simply passing the
329event objects as extra parameters to the enqueue methods.
330
331Queues execute in-order by default, without any parallelism, so in most
332cases it's not necessary to wait for or create event objects.
333
334=over 4
335
336=item $packed_value = $ctx->info ($name)
337
338See C<< $platform->info >> for details.
339
340L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetCommandQueueInfo.html>
341
342=item $ev = $queue->enqueue_read_buffer ($buffer, $blocking, $offset, $len, $data, $wait_events...)
343
344Reads data from buffer into the given string.
345
346L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadBuffer.html>
347
348=item $ev = $queue->enqueue_write_buffer ($buffer, $blocking, $offset, $data, $wait_events...)
349
350Writes data to buffer from the given string.
351
352L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBuffer.html>
353
354=item $ev = $queue->enqueue_copy_buffer ($src, $dst, $src_offset, $dst_offset, $len, $wait_events...)
355
356L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBuffer.html>
357
358=item $ev = $queue->enqueue_read_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...)
359
360L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadImage.html>
361
362=item $ev = $queue->enqueue_write_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $data, $wait_events...)
363
364L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteImage.html>
365
366=item $ev = $queue->enqueue_copy_buffer_rect ($src, $dst, $src_x, $src_y, $src_z, $dst_x, $dst_y, $dst_z, $width, $height, $depth, $src_row_pitch, $src_slice_pitch, 4dst_row_pitch, $dst_slice_pitch, $ait_event...)
367
368Yeah.
369
370L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferRect.html>
371
372=item $ev = $queue->enqueue_copy_buffer_to_image (OpenCL::Buffer src, OpenCL::Image dst, size_t src_offset, size_t dst_x, size_t dst_y, size_t dst_z, size_t width, size_t height, size_t depth, ...)
373
374L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferToImage.html>.
375
376=item $ev = $queue->enqueue_copy_image (OpenCL::Image src, OpenCL::Buffer dst, size_t src_x, size_t src_y, size_t src_z, size_t dst_x, size_t dst_y, size_t dst_z, size_t width, size_t height, size_t depth, ...)
377
378L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImage.html>
379
380=item $ev = $queue->enqueue_copy_image_to_buffer (OpenCL::Image src, OpenCL::Buffer dst, size_t src_x, size_t src_y, size_t src_z, size_t width, size_t height, size_t depth, size_t dst_offset, ...)
381
382L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImageToBuffer.html>
383
384=item $ev = $queue->enqueue_task ($kernel, $wait_events...)
385
386L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueTask.html>
387
388=item $ev = $queue->enqueue_nd_range_kernel ($kernel, @$global_work_offset, @$global_work_size, @$local_work_size, $wait_events...)
389
390Enqueues a kernel execution.
391
392@$global_work_size must be specified as a reference to an array of
393integers specifying the work sizes (element counts).
394
395@$global_work_offset must be either C<undef> (in which case all offsets
396are C<0>), or a reference to an array of work offsets, with the same number
397of elements as @$global_work_size.
398
399@$local_work_size must be either C<undef> (in which case the
400implementation is supposed to choose good local work sizes), or a
401reference to an array of local work sizes, with the same number of
402elements as @$global_work_size.
403
404L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueNDRangeKernel.html>
405
406=item $ev = $queue->enqueue_marker
407
408L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueMarker.html>
409
410=item $ev = $queue->enqueue_wait_for_events ($wait_events...)
411
412L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWaitForEvents.html>
413
414=item $queue->enqueue_barrier
415
416L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueBarrier.html>
417
418=item $queue->flush
419
420L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clFlush.html>
421
422=item $queue->finish
423
424L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clFinish.html>
425
426=back
427
428=head2 THE OpenCL::Memory CLASS
429
430This the superclass of all memory objects - OpenCL::Buffer, OpenCL::Image,
431OpenCL::Image2D and OpenCL::Image3D. The subclasses of this class
432currently only exist to allow type-checking.
433
434=over 4
435
436=item $packed_value = $memory->info ($name)
437
438See C<< $platform->info >> for details.
439
440L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetMemObjectInfo.html>
441
442=back
443
444=head2 THE OpenCL::Sampler CLASS
445
446=over 4
447
448=item $packed_value = $sampler->info ($name)
449
450See C<< $platform->info >> for details.
451
452L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetSamplerInfo.html>
453
454=back
455
456=head2 THE OpenCL::Program CLASS
457
458=over 4
459
460=item $packed_value = $program->info ($name)
461
462See C<< $platform->info >> for details.
463
464L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetProgramInfo.html>
465
466=item $program->build ($device, $options = "")
467
468Tries to build the program with the givne options.
469
470L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clBuildProgram.html>
471
472=item $packed_value = $program->build_info ($device, $name)
473
474Similar to C<< $platform->info >>, but returns build info for a previous
475build attempt for the given device.
476
477L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetBuildInfo.html>
478
479=item $kernel = $program->kernel ($function_name)
480
481Creates an OpenCL::Kernel object out of the named C<__kernel> function in
482the program.
483
484L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateKernel.html>
485
486=back
487
488=head2 THE OpenCL::Kernel CLASS
489
490=over 4
491
492=item $packed_value = $kernel->info ($name)
493
494See C<< $platform->info >> for details.
495
496L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetKernelInfo.html>
497
498=item $kernel->set_TYPE ($index, $value)
499
500This is a family of methods to set the kernel argument with the number C<$index> to the give C<$value>.
501
502TYPE is one of C<char>, C<uchar>, C<short>, C<ushort>, C<int>, C<uint>,
503C<long>, C<ulong>, C<half>, C<float>, C<double>, C<memory>, C<buffer>,
504C<image2d>, C<image3d>, C<sampler> or C<event>.
505
506Chars and integers (including the half type) are specified as integers,
507float and double as floating point values, memory/buffer/image2d/image3d
508must be an object of that type or C<undef>, and sampler and event must be
509objects of that type.
510
511L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clSetKernelArg.html>
512
513=back
514
515=head2 THE OpenCL::Event CLASS
516
517This is the superclass for all event objects (including OpenCL::UserEvent
518objects).
519
520=over 4
521
522=item $packed_value = $ev->info ($name)
523
524See C<< $platform->info >> for details.
525
526L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetEventInfo.html>
527
528=item $ev->wait
529
530Waits for the event to complete.
531
532L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clWaitForEvents.html>
533
534=back
535
536=head2 THE OpenCL::UserEvent CLASS
537
538This is a subclass of OpenCL::Event.
539
540=over 4
541
542=item $ev->set_status ($execution_status)
543
544L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clSetUserEventStatus.html>
545
546=back
108 547
109=cut 548=cut
110 549
111package OpenCL; 550package OpenCL;
112 551
113use common::sense; 552use common::sense;
114 553
115BEGIN { 554BEGIN {
116 our $VERSION = '0.02'; 555 our $VERSION = '0.03';
117 556
118 require XSLoader; 557 require XSLoader;
119 XSLoader::load (__PACKAGE__, $VERSION); 558 XSLoader::load (__PACKAGE__, $VERSION);
120 559
121 @OpenCL::Buffer::ISA = 560 @OpenCL::Buffer::ISA =
122 @OpenCL::Image::ISA = OpenCL::Memory::; 561 @OpenCL::Image::ISA = OpenCL::Memory::;
123 562
124 @OpenCL::Image2D::ISA = 563 @OpenCL::Image2D::ISA =
125 @OpenCL::Image3D::ISA = OpenCL::Image::; 564 @OpenCL::Image3D::ISA = OpenCL::Image::;
565
566 @OpenCL::UserEvent::ISA = OpenCL::Event::;
126} 567}
127 568
1281; 5691;
129
130=back
131 570
132=head1 AUTHOR 571=head1 AUTHOR
133 572
134 Marc Lehmann <schmorp@schmorp.de> 573 Marc Lehmann <schmorp@schmorp.de>
135 http://home.schmorp.de/ 574 http://home.schmorp.de/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines