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

Comparing OpenCL/OpenCL.pm (file contents):
Revision 1.23 by root, Sun Nov 20 22:29:36 2011 UTC vs.
Revision 1.33 by root, Thu Apr 19 12:55:30 2012 UTC

101 101
102Best run this once to get a feel for the platforms and devices in your 102Best run this once to get a feel for the platforms and devices in your
103system. 103system.
104 104
105 for my $platform (OpenCL::platforms) { 105 for my $platform (OpenCL::platforms) {
106 printf "platform: %s\n", $platform->info (OpenCL::PLATFORM_NAME); 106 printf "platform: %s\n", $platform->name;
107 printf "extensions: %s\n", $platform->info (OpenCL::PLATFORM_EXTENSIONS); 107 printf "extensions: %s\n", $platform->extensions;
108 for my $device ($platform->devices) { 108 for my $device ($platform->devices) {
109 printf "+ device: %s\n", $device->info (OpenCL::DEVICE_NAME); 109 printf "+ device: %s\n", $device->name;
110 my $ctx = $device->context; 110 my $ctx = $platform->context (undef, [$device]);
111 # do stuff 111 # do stuff
112 } 112 }
113 } 113 }
114 114
115=head2 Get a useful context and a command queue. 115=head2 Get a useful context and a command queue.
149 149
150=head2 Create and build a program, then create a kernel out of one of its 150=head2 Create and build a program, then create a kernel out of one of its
151functions. 151functions.
152 152
153 my $src = ' 153 my $src = '
154 __kernel void 154 kernel void
155 squareit (__global float *input, __global float *output) 155 squareit (global float *input, global float *output)
156 { 156 {
157 $id = get_global_id (0); 157 $id = get_global_id (0);
158 output [id] = input [id] * input [id]; 158 output [id] = input [id] * input [id];
159 } 159 }
160 '; 160 ';
161 161
162 my $prog = $ctx->program_with_source ($src); 162 my $prog = $ctx->program_with_source ($src);
163 163
164 # build croaks on compile errors, so catch it and print the compile errors 164 # build croaks on compile errors, so catch it and print the compile errors
165 eval { $prog->build ($dev); 1 } 165 eval { $prog->build ($dev); 1 }
166 or die $prog->build_info ($dev, OpenCL::PROGRAM_BUILD_LOG); 166 or die $prog->build_log;
167 167
168 my $kernel = $prog->kernel ("squareit"); 168 my $kernel = $prog->kernel ("squareit");
169 169
170=head2 Create some input and output float buffers, then call the 170=head2 Create some input and output float buffers, then call the
171'squareit' kernel on them. 171'squareit' kernel on them.
286 286
287Comverts an error value into a human readable string. 287Comverts an error value into a human readable string.
288 288
289=item $str = OpenCL::enum2str $enum 289=item $str = OpenCL::enum2str $enum
290 290
291Converts most enum values (inof parameter names, image format constants, 291Converts most enum values (of parameter names, image format constants,
292object types, addressing and filter modes, command types etc.) into a 292object types, addressing and filter modes, command types etc.) into a
293human readbale string. When confronted with some random integer it can be 293human readable string. When confronted with some random integer it can be
294very helpful to pass it through this function to maybe get some readable 294very helpful to pass it through this function to maybe get some readable
295string out of it. 295string out of it.
296 296
297=item @platforms = OpenCL::platforms 297=item @platforms = OpenCL::platforms
298 298
326 326
327Tries to create a context. Never worked for me, and you need devices explicitly anyway. 327Tries to create a context. Never worked for me, and you need devices explicitly anyway.
328 328
329L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html> 329L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html>
330 330
331=item $ctx = $device->context ($properties = undef, @$devices, $notify = undef) 331=item $ctx = $platform->context ($properties = undef, @$devices, $notify = undef)
332 332
333Create a new OpenCL::Context object using the given device object(s)- a 333Create a new OpenCL::Context object using the given device object(s)- a
334CL_CONTEXT_PLATFORM property is supplied automatically. 334CL_CONTEXT_PLATFORM property is supplied automatically.
335 335
336L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContext.html> 336L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContext.html>
348 348
349=for gengetinfo begin platform 349=for gengetinfo begin platform
350 350
351=item $string = $platform->profile 351=item $string = $platform->profile
352 352
353Calls C<clGetPlatformInfo> with C<CL_PLATFORM_PROFILE> and returns the result(s). 353Calls C<clGetPlatformInfo> with C<CL_PLATFORM_PROFILE> and returns the result.
354 354
355=item $string = $platform->version 355=item $string = $platform->version
356 356
357Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VERSION> and returns the result(s). 357Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VERSION> and returns the result.
358 358
359=item $string = $platform->name 359=item $string = $platform->name
360 360
361Calls C<clGetPlatformInfo> with C<CL_PLATFORM_NAME> and returns the result(s). 361Calls C<clGetPlatformInfo> with C<CL_PLATFORM_NAME> and returns the result.
362 362
363=item $string = $platform->vendor 363=item $string = $platform->vendor
364 364
365Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VENDOR> and returns the result(s). 365Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VENDOR> and returns the result.
366 366
367=item $string = $platform->extensions 367=item $string = $platform->extensions
368 368
369Calls C<clGetPlatformInfo> with C<CL_PLATFORM_EXTENSIONS> and returns the result(s). 369Calls C<clGetPlatformInfo> with C<CL_PLATFORM_EXTENSIONS> and returns the result.
370 370
371=for gengetinfo end platform 371=for gengetinfo end platform
372 372
373=back 373=back
374 374
384 384
385=for gengetinfo begin device 385=for gengetinfo begin device
386 386
387=item $device_type = $device->type 387=item $device_type = $device->type
388 388
389Calls C<clGetDeviceInfo> with C<CL_DEVICE_TYPE> and returns the result(s). 389Calls C<clGetDeviceInfo> with C<CL_DEVICE_TYPE> and returns the result.
390 390
391=item $uint = $device->vendor_id 391=item $uint = $device->vendor_id
392 392
393Calls C<clGetDeviceInfo> with C<CL_DEVICE_VENDOR_ID> and returns the result(s). 393Calls C<clGetDeviceInfo> with C<CL_DEVICE_VENDOR_ID> and returns the result.
394 394
395=item $uint = $device->max_compute_units 395=item $uint = $device->max_compute_units
396 396
397Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_COMPUTE_UNITS> and returns the result(s). 397Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_COMPUTE_UNITS> and returns the result.
398 398
399=item $uint = $device->max_work_item_dimensions 399=item $uint = $device->max_work_item_dimensions
400 400
401Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS> and returns the result(s). 401Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS> and returns the result.
402 402
403=item $int = $device->max_work_group_size 403=item $int = $device->max_work_group_size
404 404
405Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_GROUP_SIZE> and returns the result(s). 405Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_GROUP_SIZE> and returns the result.
406 406
407=item @ints = $device->max_work_item_sizes 407=item @ints = $device->max_work_item_sizes
408 408
409Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_ITEM_SIZES> and returns the result(s). 409Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_ITEM_SIZES> and returns the result.
410 410
411=item $uint = $device->preferred_vector_width_char 411=item $uint = $device->preferred_vector_width_char
412 412
413Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR> and returns the result(s). 413Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR> and returns the result.
414 414
415=item $uint = $device->preferred_vector_width_short 415=item $uint = $device->preferred_vector_width_short
416 416
417Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT> and returns the result(s). 417Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT> and returns the result.
418 418
419=item $uint = $device->preferred_vector_width_int 419=item $uint = $device->preferred_vector_width_int
420 420
421Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT> and returns the result(s). 421Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT> and returns the result.
422 422
423=item $uint = $device->preferred_vector_width_long 423=item $uint = $device->preferred_vector_width_long
424 424
425Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG> and returns the result(s). 425Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG> and returns the result.
426 426
427=item $uint = $device->preferred_vector_width_float 427=item $uint = $device->preferred_vector_width_float
428 428
429Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT> and returns the result(s). 429Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT> and returns the result.
430 430
431=item $uint = $device->preferred_vector_width_double 431=item $uint = $device->preferred_vector_width_double
432 432
433Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE> and returns the result(s). 433Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE> and returns the result.
434 434
435=item $uint = $device->max_clock_frequency 435=item $uint = $device->max_clock_frequency
436 436
437Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CLOCK_FREQUENCY> and returns the result(s). 437Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CLOCK_FREQUENCY> and returns the result.
438 438
439=item $bitfield = $device->address_bits 439=item $bitfield = $device->address_bits
440 440
441Calls C<clGetDeviceInfo> with C<CL_DEVICE_ADDRESS_BITS> and returns the result(s). 441Calls C<clGetDeviceInfo> with C<CL_DEVICE_ADDRESS_BITS> and returns the result.
442 442
443=item $uint = $device->max_read_image_args 443=item $uint = $device->max_read_image_args
444 444
445Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_READ_IMAGE_ARGS> and returns the result(s). 445Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_READ_IMAGE_ARGS> and returns the result.
446 446
447=item $uint = $device->max_write_image_args 447=item $uint = $device->max_write_image_args
448 448
449Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WRITE_IMAGE_ARGS> and returns the result(s). 449Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WRITE_IMAGE_ARGS> and returns the result.
450 450
451=item $ulong = $device->max_mem_alloc_size 451=item $ulong = $device->max_mem_alloc_size
452 452
453Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_MEM_ALLOC_SIZE> and returns the result(s). 453Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_MEM_ALLOC_SIZE> and returns the result.
454 454
455=item $int = $device->image2d_max_width 455=item $int = $device->image2d_max_width
456 456
457Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE2D_MAX_WIDTH> and returns the result(s). 457Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE2D_MAX_WIDTH> and returns the result.
458 458
459=item $int = $device->image2d_max_height 459=item $int = $device->image2d_max_height
460 460
461Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE2D_MAX_HEIGHT> and returns the result(s). 461Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE2D_MAX_HEIGHT> and returns the result.
462 462
463=item $int = $device->image3d_max_width 463=item $int = $device->image3d_max_width
464 464
465Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_WIDTH> and returns the result(s). 465Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_WIDTH> and returns the result.
466 466
467=item $int = $device->image3d_max_height 467=item $int = $device->image3d_max_height
468 468
469Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_HEIGHT> and returns the result(s). 469Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_HEIGHT> and returns the result.
470 470
471=item $int = $device->image3d_max_depth 471=item $int = $device->image3d_max_depth
472 472
473Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_DEPTH> and returns the result(s). 473Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_DEPTH> and returns the result.
474 474
475=item $uint = $device->image_support 475=item $uint = $device->image_support
476 476
477Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE_SUPPORT> and returns the result(s). 477Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE_SUPPORT> and returns the result.
478 478
479=item $int = $device->max_parameter_size 479=item $int = $device->max_parameter_size
480 480
481Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_PARAMETER_SIZE> and returns the result(s). 481Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_PARAMETER_SIZE> and returns the result.
482 482
483=item $uint = $device->max_samplers 483=item $uint = $device->max_samplers
484 484
485Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_SAMPLERS> and returns the result(s). 485Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_SAMPLERS> and returns the result.
486 486
487=item $uint = $device->mem_base_addr_align 487=item $uint = $device->mem_base_addr_align
488 488
489Calls C<clGetDeviceInfo> with C<CL_DEVICE_MEM_BASE_ADDR_ALIGN> and returns the result(s). 489Calls C<clGetDeviceInfo> with C<CL_DEVICE_MEM_BASE_ADDR_ALIGN> and returns the result.
490 490
491=item $uint = $device->min_data_type_align_size 491=item $uint = $device->min_data_type_align_size
492 492
493Calls C<clGetDeviceInfo> with C<CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE> and returns the result(s). 493Calls C<clGetDeviceInfo> with C<CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE> and returns the result.
494 494
495=item $device_fp_config = $device->single_fp_config 495=item $device_fp_config = $device->single_fp_config
496 496
497Calls C<clGetDeviceInfo> with C<CL_DEVICE_SINGLE_FP_CONFIG> and returns the result(s). 497Calls C<clGetDeviceInfo> with C<CL_DEVICE_SINGLE_FP_CONFIG> and returns the result.
498 498
499=item $device_mem_cache_type = $device->global_mem_cache_type 499=item $device_mem_cache_type = $device->global_mem_cache_type
500 500
501Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHE_TYPE> and returns the result(s). 501Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHE_TYPE> and returns the result.
502 502
503=item $uint = $device->global_mem_cacheline_size 503=item $uint = $device->global_mem_cacheline_size
504 504
505Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE> and returns the result(s). 505Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE> and returns the result.
506 506
507=item $ulong = $device->global_mem_cache_size 507=item $ulong = $device->global_mem_cache_size
508 508
509Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHE_SIZE> and returns the result(s). 509Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHE_SIZE> and returns the result.
510 510
511=item $ulong = $device->global_mem_size 511=item $ulong = $device->global_mem_size
512 512
513Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_SIZE> and returns the result(s). 513Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_SIZE> and returns the result.
514 514
515=item $ulong = $device->max_constant_buffer_size 515=item $ulong = $device->max_constant_buffer_size
516 516
517Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE> and returns the result(s). 517Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE> and returns the result.
518 518
519=item $uint = $device->max_constant_args 519=item $uint = $device->max_constant_args
520 520
521Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CONSTANT_ARGS> and returns the result(s). 521Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CONSTANT_ARGS> and returns the result.
522 522
523=item $device_local_mem_type = $device->local_mem_type 523=item $device_local_mem_type = $device->local_mem_type
524 524
525Calls C<clGetDeviceInfo> with C<CL_DEVICE_LOCAL_MEM_TYPE> and returns the result(s). 525Calls C<clGetDeviceInfo> with C<CL_DEVICE_LOCAL_MEM_TYPE> and returns the result.
526 526
527=item $ulong = $device->local_mem_size 527=item $ulong = $device->local_mem_size
528 528
529Calls C<clGetDeviceInfo> with C<CL_DEVICE_LOCAL_MEM_SIZE> and returns the result(s). 529Calls C<clGetDeviceInfo> with C<CL_DEVICE_LOCAL_MEM_SIZE> and returns the result.
530 530
531=item $boolean = $device->error_correction_support 531=item $boolean = $device->error_correction_support
532 532
533Calls C<clGetDeviceInfo> with C<CL_DEVICE_ERROR_CORRECTION_SUPPORT> and returns the result(s). 533Calls C<clGetDeviceInfo> with C<CL_DEVICE_ERROR_CORRECTION_SUPPORT> and returns the result.
534 534
535=item $int = $device->profiling_timer_resolution 535=item $int = $device->profiling_timer_resolution
536 536
537Calls C<clGetDeviceInfo> with C<CL_DEVICE_PROFILING_TIMER_RESOLUTION> and returns the result(s). 537Calls C<clGetDeviceInfo> with C<CL_DEVICE_PROFILING_TIMER_RESOLUTION> and returns the result.
538 538
539=item $boolean = $device->endian_little 539=item $boolean = $device->endian_little
540 540
541Calls C<clGetDeviceInfo> with C<CL_DEVICE_ENDIAN_LITTLE> and returns the result(s). 541Calls C<clGetDeviceInfo> with C<CL_DEVICE_ENDIAN_LITTLE> and returns the result.
542 542
543=item $boolean = $device->available 543=item $boolean = $device->available
544 544
545Calls C<clGetDeviceInfo> with C<CL_DEVICE_AVAILABLE> and returns the result(s). 545Calls C<clGetDeviceInfo> with C<CL_DEVICE_AVAILABLE> and returns the result.
546 546
547=item $boolean = $device->compiler_available 547=item $boolean = $device->compiler_available
548 548
549Calls C<clGetDeviceInfo> with C<CL_DEVICE_COMPILER_AVAILABLE> and returns the result(s). 549Calls C<clGetDeviceInfo> with C<CL_DEVICE_COMPILER_AVAILABLE> and returns the result.
550 550
551=item $device_exec_capabilities = $device->execution_capabilities 551=item $device_exec_capabilities = $device->execution_capabilities
552 552
553Calls C<clGetDeviceInfo> with C<CL_DEVICE_EXECUTION_CAPABILITIES> and returns the result(s). 553Calls C<clGetDeviceInfo> with C<CL_DEVICE_EXECUTION_CAPABILITIES> and returns the result.
554 554
555=item $command_queue_properties = $device->properties 555=item $command_queue_properties = $device->properties
556 556
557Calls C<clGetDeviceInfo> with C<CL_DEVICE_QUEUE_PROPERTIES> and returns the result(s). 557Calls C<clGetDeviceInfo> with C<CL_DEVICE_QUEUE_PROPERTIES> and returns the result.
558 558
559=item $ = $device->platform 559=item $ = $device->platform
560 560
561Calls C<clGetDeviceInfo> with C<CL_DEVICE_PLATFORM> and returns the result(s). 561Calls C<clGetDeviceInfo> with C<CL_DEVICE_PLATFORM> and returns the result.
562 562
563=item $string = $device->name 563=item $string = $device->name
564 564
565Calls C<clGetDeviceInfo> with C<CL_DEVICE_NAME> and returns the result(s). 565Calls C<clGetDeviceInfo> with C<CL_DEVICE_NAME> and returns the result.
566 566
567=item $string = $device->vendor 567=item $string = $device->vendor
568 568
569Calls C<clGetDeviceInfo> with C<CL_DEVICE_VENDOR> and returns the result(s). 569Calls C<clGetDeviceInfo> with C<CL_DEVICE_VENDOR> and returns the result.
570 570
571=item $string = $device->driver_version 571=item $string = $device->driver_version
572 572
573Calls C<clGetDeviceInfo> with C<CL_DRIVER_VERSION> and returns the result(s). 573Calls C<clGetDeviceInfo> with C<CL_DRIVER_VERSION> and returns the result.
574 574
575=item $string = $device->profile 575=item $string = $device->profile
576 576
577Calls C<clGetDeviceInfo> with C<CL_DEVICE_PROFILE> and returns the result(s). 577Calls C<clGetDeviceInfo> with C<CL_DEVICE_PROFILE> and returns the result.
578 578
579=item $string = $device->version 579=item $string = $device->version
580 580
581Calls C<clGetDeviceInfo> with C<CL_DEVICE_VERSION> and returns the result(s). 581Calls C<clGetDeviceInfo> with C<CL_DEVICE_VERSION> and returns the result.
582 582
583=item $string = $device->extensions 583=item $string = $device->extensions
584 584
585Calls C<clGetDeviceInfo> with C<CL_DEVICE_EXTENSIONS> and returns the result(s). 585Calls C<clGetDeviceInfo> with C<CL_DEVICE_EXTENSIONS> and returns the result.
586 586
587=item $uint = $device->preferred_vector_width_half 587=item $uint = $device->preferred_vector_width_half
588 588
589Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF> and returns the result(s). 589Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF> and returns the result.
590 590
591=item $uint = $device->native_vector_width_char 591=item $uint = $device->native_vector_width_char
592 592
593Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR> and returns the result(s). 593Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR> and returns the result.
594 594
595=item $uint = $device->native_vector_width_short 595=item $uint = $device->native_vector_width_short
596 596
597Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT> and returns the result(s). 597Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT> and returns the result.
598 598
599=item $uint = $device->native_vector_width_int 599=item $uint = $device->native_vector_width_int
600 600
601Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_INT> and returns the result(s). 601Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_INT> and returns the result.
602 602
603=item $uint = $device->native_vector_width_long 603=item $uint = $device->native_vector_width_long
604 604
605Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG> and returns the result(s). 605Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG> and returns the result.
606 606
607=item $uint = $device->native_vector_width_float 607=item $uint = $device->native_vector_width_float
608 608
609Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT> and returns the result(s). 609Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT> and returns the result.
610 610
611=item $uint = $device->native_vector_width_double 611=item $uint = $device->native_vector_width_double
612 612
613Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE> and returns the result(s). 613Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE> and returns the result.
614 614
615=item $uint = $device->native_vector_width_half 615=item $uint = $device->native_vector_width_half
616 616
617Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF> and returns the result(s). 617Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF> and returns the result.
618 618
619=item $device_fp_config = $device->double_fp_config 619=item $device_fp_config = $device->double_fp_config
620 620
621Calls C<clGetDeviceInfo> with C<CL_DEVICE_DOUBLE_FP_CONFIG> and returns the result(s). 621Calls C<clGetDeviceInfo> with C<CL_DEVICE_DOUBLE_FP_CONFIG> and returns the result.
622 622
623=item $device_fp_config = $device->half_fp_config 623=item $device_fp_config = $device->half_fp_config
624 624
625Calls C<clGetDeviceInfo> with C<CL_DEVICE_HALF_FP_CONFIG> and returns the result(s). 625Calls C<clGetDeviceInfo> with C<CL_DEVICE_HALF_FP_CONFIG> and returns the result.
626 626
627=item $boolean = $device->host_unified_memory 627=item $boolean = $device->host_unified_memory
628 628
629Calls C<clGetDeviceInfo> with C<CL_DEVICE_HOST_UNIFIED_MEMORY> and returns the result(s). 629Calls C<clGetDeviceInfo> with C<CL_DEVICE_HOST_UNIFIED_MEMORY> and returns the result.
630 630
631=item $device = $device->parent_device_ext 631=item $device = $device->parent_device_ext
632 632
633Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARENT_DEVICE_EXT> and returns the result(s). 633Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARENT_DEVICE_EXT> and returns the result.
634 634
635=item @device_partition_property_exts = $device->partition_types_ext 635=item @device_partition_property_exts = $device->partition_types_ext
636 636
637Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARTITION_TYPES_EXT> and returns the result(s). 637Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARTITION_TYPES_EXT> and returns the result.
638 638
639=item @device_partition_property_exts = $device->affinity_domains_ext 639=item @device_partition_property_exts = $device->affinity_domains_ext
640 640
641Calls C<clGetDeviceInfo> with C<CL_DEVICE_AFFINITY_DOMAINS_EXT> and returns the result(s). 641Calls C<clGetDeviceInfo> with C<CL_DEVICE_AFFINITY_DOMAINS_EXT> and returns the result.
642 642
643=item $uint = $device->reference_count_ext 643=item $uint = $device->reference_count_ext
644 644
645Calls C<clGetDeviceInfo> with C<CL_DEVICE_REFERENCE_COUNT_EXT > and returns the result(s). 645Calls C<clGetDeviceInfo> with C<CL_DEVICE_REFERENCE_COUNT_EXT > and returns the result.
646 646
647=item @device_partition_property_exts = $device->partition_style_ext 647=item @device_partition_property_exts = $device->partition_style_ext
648 648
649Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARTITION_STYLE_EXT> and returns the result(s). 649Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARTITION_STYLE_EXT> and returns the result.
650 650
651=for gengetinfo end device 651=for gengetinfo end device
652 652
653=back 653=back
654 654
668 668
669L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateUserEvent.html> 669L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateUserEvent.html>
670 670
671=item $buf = $ctx->buffer ($flags, $len) 671=item $buf = $ctx->buffer ($flags, $len)
672 672
673Creates a new OpenCL::Buffer object with the given flags and octet-size. 673Creates a new OpenCL::Buffer (actually OpenCL::BufferObj) object with the
674given flags and octet-size.
674 675
675L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateBuffer.html> 676L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateBuffer.html>
676 677
677=item $buf = $ctx->buffer_sv ($flags, $data) 678=item $buf = $ctx->buffer_sv ($flags, $data)
678 679
679Creates a new OpenCL::Buffer object and initialise it with the given data values. 680Creates a new OpenCL::Buffer (actually OpenCL::BufferObj) object and
681initialise it with the given data values.
680 682
681=item $img = $ctx->image2d ($flags, $channel_order, $channel_type, $width, $height, $row_pitch = 0, $data = undef) 683=item $img = $ctx->image2d ($flags, $channel_order, $channel_type, $width, $height, $row_pitch = 0, $data = undef)
682 684
683Creates a new OpenCL::Image2D object and optionally initialises it with the given data values. 685Creates a new OpenCL::Image2D object and optionally initialises it with
686the given data values.
684 687
685L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage2D.html> 688L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage2D.html>
686 689
687=item $img = $ctx->image3d ($flags, $channel_order, $channel_type, $width, $height, $depth, $row_pitch = 0, $slice_pitch = 0, $data = undef) 690=item $img = $ctx->image3d ($flags, $channel_order, $channel_type, $width, $height, $depth, $row_pitch = 0, $slice_pitch = 0, $data = undef)
688 691
689Creates a new OpenCL::Image3D object and optionally initialises it with the given data values. 692Creates a new OpenCL::Image3D object and optionally initialises it with
693the given data values.
690 694
691L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage3D.html> 695L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage3D.html>
696
697=item $buffer = $ctx->gl_buffer ($flags, $bufobj)
698
699Creates a new OpenCL::Buffer (actually OpenCL::BufferObj) object that refers to the given
700OpenGL buffer object.
701
702http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateFromGLBuffer.html
703
704=item $ctx->gl_texture2d ($flags, $target, $miplevel, $texture)
705
706Creates a new OpenCL::Image2D object that refers to the given OpenGL
7072D texture object.
708
709http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateFromGLTexture2D.html
710
711=item $ctx->gl_texture3d ($flags, $target, $miplevel, $texture)
712
713Creates a new OpenCL::Image3D object that refers to the given OpenGL
7143D texture object.
715
716http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateFromGLTexture3D.html
717
718=item $ctx->gl_renderbuffer ($flags, $renderbuffer)
719
720Creates a new OpenCL::Image2D object that refers to the given OpenGL
721render buffer.
722
723http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateFromGLRenderbuffer.html
692 724
693=item @formats = $ctx->supported_image_formats ($flags, $image_type) 725=item @formats = $ctx->supported_image_formats ($flags, $image_type)
694 726
695Returns a list of matching image formats - each format is an arrayref with 727Returns a list of matching image formats - each format is an arrayref with
696two values, $channel_order and $channel_type, in it. 728two values, $channel_order and $channel_type, in it.
717 749
718=for gengetinfo begin context 750=for gengetinfo begin context
719 751
720=item $uint = $context->reference_count 752=item $uint = $context->reference_count
721 753
722Calls C<clGetContextInfo> with C<CL_CONTEXT_REFERENCE_COUNT> and returns the result(s). 754Calls C<clGetContextInfo> with C<CL_CONTEXT_REFERENCE_COUNT> and returns the result.
723 755
724=item @devices = $context->devices 756=item @devices = $context->devices
725 757
726Calls C<clGetContextInfo> with C<CL_CONTEXT_DEVICES> and returns the result(s). 758Calls C<clGetContextInfo> with C<CL_CONTEXT_DEVICES> and returns the result.
727 759
728=item @property_ints = $context->properties 760=item @property_ints = $context->properties
729 761
730Calls C<clGetContextInfo> with C<CL_CONTEXT_PROPERTIES> and returns the result(s). 762Calls C<clGetContextInfo> with C<CL_CONTEXT_PROPERTIES> and returns the result.
731 763
732=item $uint = $context->num_devices 764=item $uint = $context->num_devices
733 765
734Calls C<clGetContextInfo> with C<CL_CONTEXT_NUM_DEVICES> and returns the result(s). 766Calls C<clGetContextInfo> with C<CL_CONTEXT_NUM_DEVICES> and returns the result.
735 767
736=for gengetinfo end context 768=for gengetinfo end context
737 769
738=back 770=back
739 771
771 803
772=item $ev = $queue->enqueue_copy_buffer ($src, $dst, $src_offset, $dst_offset, $len, $wait_events...) 804=item $ev = $queue->enqueue_copy_buffer ($src, $dst, $src_offset, $dst_offset, $len, $wait_events...)
773 805
774L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBuffer.html> 806L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBuffer.html>
775 807
808=item $ev = $queue->enqueue_read_buffer_rect (OpenCL::Memory buf, cl_bool blocking, $buf_x, $buf_y, $buf_z, $host_x, $host_y, $host_z, $width, $height, $depth, $buf_row_pitch, $buf_slice_pitch, $host_row_pitch, $host_slice_pitch, $data, $wait_events...)
809
810http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadBufferRect.html
811
812=item $ev = $queue->enqueue_write_buffer_rect (OpenCL::Memory buf, cl_bool blocking, $buf_x, $buf_y, $buf_z, $host_x, $host_y, $host_z, $width, $height, $depth, $buf_row_pitch, $buf_slice_pitch, $host_row_pitch, $host_slice_pitch, $data, $wait_events...)
813
814http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBufferRect.html
815
776=item $ev = $queue->enqueue_read_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) 816=item $ev = $queue->enqueue_read_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...)
777 817
818L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferRect.html>
819
820=item $ev = $queue->enqueue_copy_buffer_to_image ($src_buffer, $dst_image, $src_offset, $dst_x, $dst_y, $dst_z, $width, $height, $depth, $wait_events...)
821
778L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadImage.html> 822L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadImage.html>
779 823
780=item $ev = $queue->enqueue_write_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) 824=item $ev = $queue->enqueue_write_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...)
781 825
782L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteImage.html> 826L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteImage.html>
783 827
828=item $ev = $queue->enqueue_copy_image ($src_image, $dst_image, $src_x, $src_y, $src_z, $dst_x, $dst_y, $dst_z, $width, $height, $depth, $wait_events...)
829
830L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImage.html>
831
832=item $ev = $queue->enqueue_copy_image_to_buffer ($src_image, $dst_image, $src_x, $src_y, $src_z, $width, $height, $depth, $dst_offset, $wait_events...)
833
834L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImageToBuffer.html>
835
784=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, $dst_row_pitch, $dst_slice_pitch, $wait_event...) 836=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, $dst_row_pitch, $dst_slice_pitch, $wait_event...)
785 837
786Yeah. 838Yeah.
787 839
788L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferRect.html>
789
790=item $ev = $queue->enqueue_copy_buffer_to_image ($src_buffer, $dst_image, $src_offset, $dst_x, $dst_y, $dst_z, $width, $height, $depth, $wait_events...)
791
792L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferToImage.html>. 840L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferToImage.html>.
793
794=item $ev = $queue->enqueue_copy_image ($src_image, $dst_image, $src_x, $src_y, $src_z, $dst_x, $dst_y, $dst_z, $width, $height, $depth, $wait_events...)
795
796L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImage.html>
797
798=item $ev = $queue->enqueue_copy_image_to_buffer ($src_image, $dst_image, $src_x, $src_y, $src_z, $width, $height, $depth, $dst_offset, $wait_events...)
799
800L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImageToBuffer.html>
801 841
802=item $ev = $queue->enqueue_task ($kernel, $wait_events...) 842=item $ev = $queue->enqueue_task ($kernel, $wait_events...)
803 843
804L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueTask.html> 844L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueTask.html>
805 845
849 889
850=for gengetinfo begin command_queue 890=for gengetinfo begin command_queue
851 891
852=item $ctx = $command_queue->context 892=item $ctx = $command_queue->context
853 893
854Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_CONTEXT> and returns the result(s). 894Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_CONTEXT> and returns the result.
855 895
856=item $device = $command_queue->device 896=item $device = $command_queue->device
857 897
858Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_DEVICE> and returns the result(s). 898Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_DEVICE> and returns the result.
859 899
860=item $uint = $command_queue->reference_count 900=item $uint = $command_queue->reference_count
861 901
862Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_REFERENCE_COUNT> and returns the result(s). 902Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_REFERENCE_COUNT> and returns the result.
863 903
864=item $command_queue_properties = $command_queue->properties 904=item $command_queue_properties = $command_queue->properties
865 905
866Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_PROPERTIES> and returns the result(s). 906Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_PROPERTIES> and returns the result.
867 907
868=for gengetinfo end command_queue 908=for gengetinfo end command_queue
869 909
870=back 910=back
871 911
884 924
885=for gengetinfo begin mem 925=for gengetinfo begin mem
886 926
887=item $mem_object_type = $mem->type 927=item $mem_object_type = $mem->type
888 928
889Calls C<clGetMemObjectInfo> with C<CL_MEM_TYPE> and returns the result(s). 929Calls C<clGetMemObjectInfo> with C<CL_MEM_TYPE> and returns the result.
890 930
891=item $mem_flags = $mem->flags 931=item $mem_flags = $mem->flags
892 932
893Calls C<clGetMemObjectInfo> with C<CL_MEM_FLAGS> and returns the result(s). 933Calls C<clGetMemObjectInfo> with C<CL_MEM_FLAGS> and returns the result.
894 934
895=item $int = $mem->size 935=item $int = $mem->size
896 936
897Calls C<clGetMemObjectInfo> with C<CL_MEM_SIZE> and returns the result(s). 937Calls C<clGetMemObjectInfo> with C<CL_MEM_SIZE> and returns the result.
898 938
899=item $ptr_value = $mem->host_ptr 939=item $ptr_value = $mem->host_ptr
900 940
901Calls C<clGetMemObjectInfo> with C<CL_MEM_HOST_PTR> and returns the result(s). 941Calls C<clGetMemObjectInfo> with C<CL_MEM_HOST_PTR> and returns the result.
902 942
903=item $uint = $mem->map_count 943=item $uint = $mem->map_count
904 944
905Calls C<clGetMemObjectInfo> with C<CL_MEM_MAP_COUNT> and returns the result(s). 945Calls C<clGetMemObjectInfo> with C<CL_MEM_MAP_COUNT> and returns the result.
906 946
907=item $uint = $mem->reference_count 947=item $uint = $mem->reference_count
908 948
909Calls C<clGetMemObjectInfo> with C<CL_MEM_REFERENCE_COUNT> and returns the result(s). 949Calls C<clGetMemObjectInfo> with C<CL_MEM_REFERENCE_COUNT> and returns the result.
910 950
911=item $ctx = $mem->context 951=item $ctx = $mem->context
912 952
913Calls C<clGetMemObjectInfo> with C<CL_MEM_CONTEXT> and returns the result(s). 953Calls C<clGetMemObjectInfo> with C<CL_MEM_CONTEXT> and returns the result.
914 954
915=item $mem = $mem->associated_memobject 955=item $mem = $mem->associated_memobject
916 956
917Calls C<clGetMemObjectInfo> with C<CL_MEM_ASSOCIATED_MEMOBJECT> and returns the result(s). 957Calls C<clGetMemObjectInfo> with C<CL_MEM_ASSOCIATED_MEMOBJECT> and returns the result.
918 958
919=item $int = $mem->offset 959=item $int = $mem->offset
920 960
921Calls C<clGetMemObjectInfo> with C<CL_MEM_OFFSET> and returns the result(s). 961Calls C<clGetMemObjectInfo> with C<CL_MEM_OFFSET> and returns the result.
922 962
923=for gengetinfo end mem 963=for gengetinfo end mem
964
965=back
966
967=head2 THE OpenCL::Buffer CLASS
968
969This is a subclass of OpenCL::Memory, and the superclass of
970OpenCL::BufferObj. Its purpose is simply to distinguish between buffers
971and sub-buffers.
972
973=head2 THE OpenCL::BufferObj CLASS
974
975This is a subclass of OpenCL::Buffer and thus OpenCL::Memory. It exists
976because one cna create sub buffers of OpenLC::BufferObj objects, but not
977sub buffers from these sub buffers.
978
979=over 4
980
981=item $subbuf = $buf_obj->sub_buffer_region ($flags, $origin, $size)
982
983Creates an OpenCL::Buffer objects from this buffer and returns it. The
984C<buffer_create_type> is assumed to be C<CL_BUFFER_CREATE_TYPE_REGION>.
985
986L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateSubBuffer.html>
924 987
925=back 988=back
926 989
927=head2 THE OpenCL::Image CLASS 990=head2 THE OpenCL::Image CLASS
928 991
941 1004
942=for gengetinfo begin image 1005=for gengetinfo begin image
943 1006
944=item $int = $image->element_size 1007=item $int = $image->element_size
945 1008
946Calls C<clGetImageInfo> with C<CL_IMAGE_ELEMENT_SIZE> and returns the result(s). 1009Calls C<clGetImageInfo> with C<CL_IMAGE_ELEMENT_SIZE> and returns the result.
947 1010
948=item $int = $image->row_pitch 1011=item $int = $image->row_pitch
949 1012
950Calls C<clGetImageInfo> with C<CL_IMAGE_ROW_PITCH> and returns the result(s). 1013Calls C<clGetImageInfo> with C<CL_IMAGE_ROW_PITCH> and returns the result.
951 1014
952=item $int = $image->slice_pitch 1015=item $int = $image->slice_pitch
953 1016
954Calls C<clGetImageInfo> with C<CL_IMAGE_SLICE_PITCH> and returns the result(s). 1017Calls C<clGetImageInfo> with C<CL_IMAGE_SLICE_PITCH> and returns the result.
955 1018
956=item $int = $image->width 1019=item $int = $image->width
957 1020
958Calls C<clGetImageInfo> with C<CL_IMAGE_WIDTH> and returns the result(s). 1021Calls C<clGetImageInfo> with C<CL_IMAGE_WIDTH> and returns the result.
959 1022
960=item $int = $image->height 1023=item $int = $image->height
961 1024
962Calls C<clGetImageInfo> with C<CL_IMAGE_HEIGHT> and returns the result(s). 1025Calls C<clGetImageInfo> with C<CL_IMAGE_HEIGHT> and returns the result.
963 1026
964=item $int = $image->depth 1027=item $int = $image->depth
965 1028
966Calls C<clGetImageInfo> with C<CL_IMAGE_DEPTH> and returns the result(s). 1029Calls C<clGetImageInfo> with C<CL_IMAGE_DEPTH> and returns the result.
967 1030
968=for gengetinfo end image 1031=for gengetinfo end image
969 1032
970=back 1033=back
971 1034
981 1044
982=for gengetinfo begin sampler 1045=for gengetinfo begin sampler
983 1046
984=item $uint = $sampler->reference_count 1047=item $uint = $sampler->reference_count
985 1048
986Calls C<clGetSamplerInfo> with C<CL_SAMPLER_REFERENCE_COUNT> and returns the result(s). 1049Calls C<clGetSamplerInfo> with C<CL_SAMPLER_REFERENCE_COUNT> and returns the result.
987 1050
988=item $ctx = $sampler->context 1051=item $ctx = $sampler->context
989 1052
990Calls C<clGetSamplerInfo> with C<CL_SAMPLER_CONTEXT> and returns the result(s). 1053Calls C<clGetSamplerInfo> with C<CL_SAMPLER_CONTEXT> and returns the result.
991 1054
992=item $addressing_mode = $sampler->normalized_coords 1055=item $addressing_mode = $sampler->normalized_coords
993 1056
994Calls C<clGetSamplerInfo> with C<CL_SAMPLER_NORMALIZED_COORDS> and returns the result(s). 1057Calls C<clGetSamplerInfo> with C<CL_SAMPLER_NORMALIZED_COORDS> and returns the result.
995 1058
996=item $filter_mode = $sampler->addressing_mode 1059=item $filter_mode = $sampler->addressing_mode
997 1060
998Calls C<clGetSamplerInfo> with C<CL_SAMPLER_ADDRESSING_MODE> and returns the result(s). 1061Calls C<clGetSamplerInfo> with C<CL_SAMPLER_ADDRESSING_MODE> and returns the result.
999 1062
1000=item $boolean = $sampler->filter_mode 1063=item $boolean = $sampler->filter_mode
1001 1064
1002Calls C<clGetSamplerInfo> with C<CL_SAMPLER_FILTER_MODE> and returns the result(s). 1065Calls C<clGetSamplerInfo> with C<CL_SAMPLER_FILTER_MODE> and returns the result.
1003 1066
1004=for gengetinfo end sampler 1067=for gengetinfo end sampler
1005 1068
1006=back 1069=back
1007 1070
1031 1094
1032=for gengetinfo begin program_build 1095=for gengetinfo begin program_build
1033 1096
1034=item $build_status = $program->build_status ($device) 1097=item $build_status = $program->build_status ($device)
1035 1098
1036Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_STATUS> and returns the result(s). 1099Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_STATUS> and returns the result.
1037 1100
1038=item $string = $program->build_options ($device) 1101=item $string = $program->build_options ($device)
1039 1102
1040Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_OPTIONS> and returns the result(s). 1103Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_OPTIONS> and returns the result.
1041 1104
1042=item $string = $program->build_log ($device) 1105=item $string = $program->build_log ($device)
1043 1106
1044Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_LOG> and returns the result(s). 1107Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_LOG> and returns the result.
1045 1108
1046=for gengetinfo end program_build 1109=for gengetinfo end program_build
1047 1110
1048=item $packed_value = $program->info ($name) 1111=item $packed_value = $program->info ($name)
1049 1112
1053 1116
1054=for gengetinfo begin program 1117=for gengetinfo begin program
1055 1118
1056=item $uint = $program->reference_count 1119=item $uint = $program->reference_count
1057 1120
1058Calls C<clGetProgramInfo> with C<CL_PROGRAM_REFERENCE_COUNT> and returns the result(s). 1121Calls C<clGetProgramInfo> with C<CL_PROGRAM_REFERENCE_COUNT> and returns the result.
1059 1122
1060=item $ctx = $program->context 1123=item $ctx = $program->context
1061 1124
1062Calls C<clGetProgramInfo> with C<CL_PROGRAM_CONTEXT> and returns the result(s). 1125Calls C<clGetProgramInfo> with C<CL_PROGRAM_CONTEXT> and returns the result.
1063 1126
1064=item $uint = $program->num_devices 1127=item $uint = $program->num_devices
1065 1128
1066Calls C<clGetProgramInfo> with C<CL_PROGRAM_NUM_DEVICES> and returns the result(s). 1129Calls C<clGetProgramInfo> with C<CL_PROGRAM_NUM_DEVICES> and returns the result.
1067 1130
1068=item @devices = $program->devices 1131=item @devices = $program->devices
1069 1132
1070Calls C<clGetProgramInfo> with C<CL_PROGRAM_DEVICES> and returns the result(s). 1133Calls C<clGetProgramInfo> with C<CL_PROGRAM_DEVICES> and returns the result.
1071 1134
1072=item $string = $program->source 1135=item $string = $program->source
1073 1136
1074Calls C<clGetProgramInfo> with C<CL_PROGRAM_SOURCE> and returns the result(s). 1137Calls C<clGetProgramInfo> with C<CL_PROGRAM_SOURCE> and returns the result.
1075 1138
1076=item @ints = $program->binary_sizes 1139=item @ints = $program->binary_sizes
1077 1140
1078Calls C<clGetProgramInfo> with C<CL_PROGRAM_BINARY_SIZES> and returns the result(s). 1141Calls C<clGetProgramInfo> with C<CL_PROGRAM_BINARY_SIZES> and returns the result.
1079 1142
1080=for gengetinfo end program 1143=for gengetinfo end program
1081 1144
1082=item @blobs = $program->binaries 1145=item @blobs = $program->binaries
1083 1146
1104 1167
1105=for gengetinfo begin kernel 1168=for gengetinfo begin kernel
1106 1169
1107=item $string = $kernel->function_name 1170=item $string = $kernel->function_name
1108 1171
1109Calls C<clGetKernelInfo> with C<CL_KERNEL_FUNCTION_NAME> and returns the result(s). 1172Calls C<clGetKernelInfo> with C<CL_KERNEL_FUNCTION_NAME> and returns the result.
1110 1173
1111=item $uint = $kernel->num_args 1174=item $uint = $kernel->num_args
1112 1175
1113Calls C<clGetKernelInfo> with C<CL_KERNEL_NUM_ARGS> and returns the result(s). 1176Calls C<clGetKernelInfo> with C<CL_KERNEL_NUM_ARGS> and returns the result.
1114 1177
1115=item $uint = $kernel->reference_count 1178=item $uint = $kernel->reference_count
1116 1179
1117Calls C<clGetKernelInfo> with C<CL_KERNEL_REFERENCE_COUNT> and returns the result(s). 1180Calls C<clGetKernelInfo> with C<CL_KERNEL_REFERENCE_COUNT> and returns the result.
1118 1181
1119=item $ctx = $kernel->context 1182=item $ctx = $kernel->context
1120 1183
1121Calls C<clGetKernelInfo> with C<CL_KERNEL_CONTEXT> and returns the result(s). 1184Calls C<clGetKernelInfo> with C<CL_KERNEL_CONTEXT> and returns the result.
1122 1185
1123=item $program = $kernel->program 1186=item $program = $kernel->program
1124 1187
1125Calls C<clGetKernelInfo> with C<CL_KERNEL_PROGRAM> and returns the result(s). 1188Calls C<clGetKernelInfo> with C<CL_KERNEL_PROGRAM> and returns the result.
1126 1189
1127=for gengetinfo end kernel 1190=for gengetinfo end kernel
1128 1191
1129=item $packed_value = $kernel->work_group_info ($device, $name) 1192=item $packed_value = $kernel->work_group_info ($device, $name)
1130 1193
1137 1200
1138=for gengetinfo begin kernel_work_group 1201=for gengetinfo begin kernel_work_group
1139 1202
1140=item $int = $kernel->work_group_size ($device) 1203=item $int = $kernel->work_group_size ($device)
1141 1204
1142Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_WORK_GROUP_SIZE> and returns the result(s). 1205Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_WORK_GROUP_SIZE> and returns the result.
1143 1206
1144=item @ints = $kernel->compile_work_group_size ($device) 1207=item @ints = $kernel->compile_work_group_size ($device)
1145 1208
1146Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_COMPILE_WORK_GROUP_SIZE> and returns the result(s). 1209Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_COMPILE_WORK_GROUP_SIZE> and returns the result.
1147 1210
1148=item $ulong = $kernel->local_mem_size ($device) 1211=item $ulong = $kernel->local_mem_size ($device)
1149 1212
1150Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_LOCAL_MEM_SIZE> and returns the result(s). 1213Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_LOCAL_MEM_SIZE> and returns the result.
1151 1214
1152=item $int = $kernel->preferred_work_group_size_multiple ($device) 1215=item $int = $kernel->preferred_work_group_size_multiple ($device)
1153 1216
1154Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE> and returns the result(s). 1217Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE> and returns the result.
1155 1218
1156=item $ulong = $kernel->private_mem_size ($device) 1219=item $ulong = $kernel->private_mem_size ($device)
1157 1220
1158Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result(s). 1221Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result.
1159 1222
1160=for gengetinfo end kernel_work_group 1223=for gengetinfo end kernel_work_group
1161 1224
1162=item $kernel->set_TYPE ($index, $value) 1225=item $kernel->set_TYPE ($index, $value)
1163 1226
1197 1260
1198=for gengetinfo begin event 1261=for gengetinfo begin event
1199 1262
1200=item $queue = $event->command_queue 1263=item $queue = $event->command_queue
1201 1264
1202Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_QUEUE> and returns the result(s). 1265Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_QUEUE> and returns the result.
1203 1266
1204=item $command_type = $event->command_type 1267=item $command_type = $event->command_type
1205 1268
1206Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_TYPE> and returns the result(s). 1269Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_TYPE> and returns the result.
1207 1270
1208=item $uint = $event->reference_count 1271=item $uint = $event->reference_count
1209 1272
1210Calls C<clGetEventInfo> with C<CL_EVENT_REFERENCE_COUNT> and returns the result(s). 1273Calls C<clGetEventInfo> with C<CL_EVENT_REFERENCE_COUNT> and returns the result.
1211 1274
1212=item $uint = $event->command_execution_status 1275=item $uint = $event->command_execution_status
1213 1276
1214Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_EXECUTION_STATUS> and returns the result(s). 1277Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_EXECUTION_STATUS> and returns the result.
1215 1278
1216=item $ctx = $event->context 1279=item $ctx = $event->context
1217 1280
1218Calls C<clGetEventInfo> with C<CL_EVENT_CONTEXT> and returns the result(s). 1281Calls C<clGetEventInfo> with C<CL_EVENT_CONTEXT> and returns the result.
1219 1282
1220=for gengetinfo end event 1283=for gengetinfo end event
1221 1284
1222=item $packed_value = $ev->profiling_info ($name) 1285=item $packed_value = $ev->profiling_info ($name)
1223 1286
1230 1293
1231=for gengetinfo begin profiling 1294=for gengetinfo begin profiling
1232 1295
1233=item $ulong = $event->profiling_command_queued 1296=item $ulong = $event->profiling_command_queued
1234 1297
1235Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_QUEUED> and returns the result(s). 1298Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_QUEUED> and returns the result.
1236 1299
1237=item $ulong = $event->profiling_command_submit 1300=item $ulong = $event->profiling_command_submit
1238 1301
1239Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_SUBMIT> and returns the result(s). 1302Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_SUBMIT> and returns the result.
1240 1303
1241=item $ulong = $event->profiling_command_start 1304=item $ulong = $event->profiling_command_start
1242 1305
1243Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_START> and returns the result(s). 1306Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_START> and returns the result.
1244 1307
1245=item $ulong = $event->profiling_command_end 1308=item $ulong = $event->profiling_command_end
1246 1309
1247Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_END> and returns the result(s). 1310Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_END> and returns the result.
1248 1311
1249=for gengetinfo end profiling 1312=for gengetinfo end profiling
1250 1313
1251=back 1314=back
1252 1315
1267package OpenCL; 1330package OpenCL;
1268 1331
1269use common::sense; 1332use common::sense;
1270 1333
1271BEGIN { 1334BEGIN {
1272 our $VERSION = '0.55'; 1335 our $VERSION = '0.92';
1273 1336
1274 require XSLoader; 1337 require XSLoader;
1275 XSLoader::load (__PACKAGE__, $VERSION); 1338 XSLoader::load (__PACKAGE__, $VERSION);
1276 1339
1277 @OpenCL::Buffer::ISA = 1340 @OpenCL::Buffer::ISA =
1278 @OpenCL::Image::ISA = OpenCL::Memory::; 1341 @OpenCL::Image::ISA = OpenCL::Memory::;
1279 1342
1343 @OpenCL::BufferObj::ISA = OpenCL::Buffer::;
1344
1280 @OpenCL::Image2D::ISA = 1345 @OpenCL::Image2D::ISA =
1281 @OpenCL::Image3D::ISA = OpenCL::Image::; 1346 @OpenCL::Image3D::ISA = OpenCL::Image::;
1282 1347
1283 @OpenCL::UserEvent::ISA = OpenCL::Event::; 1348 @OpenCL::UserEvent::ISA = OpenCL::Event::;
1284} 1349}
1285 1350
12861; 13511;
1287 1352
1288=head1 AUTHOR 1353=head1 AUTHOR

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines