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

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines