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

Comparing OpenCL/OpenCL.pm (file contents):
Revision 1.21 by root, Sun Nov 20 10:21:27 2011 UTC vs.
Revision 1.28 by root, Sat Dec 10 23:07:38 2011 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 = $device->context;
111 # do stuff 111 # do stuff
112 } 112 }
113 } 113 }
114 114
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.
322 322
323Returns a list of matching OpenCL::Device objects. 323Returns a list of matching OpenCL::Device objects.
324 324
325=item $ctx = $platform->context_from_type ($properties, $type = OpenCL::DEVICE_TYPE_DEFAULT, $notify = undef) 325=item $ctx = $platform->context_from_type ($properties, $type = OpenCL::DEVICE_TYPE_DEFAULT, $notify = undef)
326 326
327Tries to create a context. Never worked for me, and you need devices explitly 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 = $device->context ($properties = undef, @$devices, $notify = undef)
332 332
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>
337 337
338=item $packed_value = $platform->info ($name) 338=item $packed_value = $platform->info ($name)
339 339
340Calls C<clGetPlatformInfo> and returns the packed, raw value - for 340Calls C<clGetPlatformInfo> and returns the packed, raw value - for
341strings, this will be the string, for other values you probably need to 341strings, this will be the string (possibly including terminating \0), for
342use the correct C<unpack>. 342other values you probably need to use the correct C<unpack>.
343 343
344It's best to avoid this method and use one of the predefined C<get_*> 344It's best to avoid this method and use one of the following convenience
345methods. 345wrappers.
346 346
347L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetPlatformInfo.html> 347L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetPlatformInfo.html>
348 348
349=for gengetinfo begin platform 349=for gengetinfo begin platform
350 350
351
352=item $string = $platform->profile 351=item $string = $platform->profile
353 352
354Calls C<clGetPlatformInfo> with C<CL_PLATFORM_PROFILE> and returns the result(s). 353Calls C<clGetPlatformInfo> with C<CL_PLATFORM_PROFILE> and returns the result.
355 354
356=item $string = $platform->version 355=item $string = $platform->version
357 356
358Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VERSION> and returns the result(s). 357Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VERSION> and returns the result.
359 358
360=item $string = $platform->name 359=item $string = $platform->name
361 360
362Calls C<clGetPlatformInfo> with C<CL_PLATFORM_NAME> and returns the result(s). 361Calls C<clGetPlatformInfo> with C<CL_PLATFORM_NAME> and returns the result.
363 362
364=item $string = $platform->vendor 363=item $string = $platform->vendor
365 364
366Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VENDOR> and returns the result(s). 365Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VENDOR> and returns the result.
367 366
368=item $string = $platform->extensions 367=item $string = $platform->extensions
369 368
370Calls C<clGetPlatformInfo> with C<CL_PLATFORM_EXTENSIONS> and returns the result(s). 369Calls C<clGetPlatformInfo> with C<CL_PLATFORM_EXTENSIONS> and returns the result.
371 370
372=for gengetinfo end platform 371=for gengetinfo end platform
373 372
374=back 373=back
375 374
383 382
384L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetDeviceInfo.html> 383L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetDeviceInfo.html>
385 384
386=for gengetinfo begin device 385=for gengetinfo begin device
387 386
388
389=item $device_type = $device->type 387=item $device_type = $device->type
390 388
391Calls C<clGetDeviceInfo> with C<CL_DEVICE_TYPE> and returns the result(s). 389Calls C<clGetDeviceInfo> with C<CL_DEVICE_TYPE> and returns the result.
392 390
393=item $uint = $device->vendor_id 391=item $uint = $device->vendor_id
394 392
395Calls 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.
396 394
397=item $uint = $device->max_compute_units 395=item $uint = $device->max_compute_units
398 396
399Calls 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.
400 398
401=item $uint = $device->max_work_item_dimensions 399=item $uint = $device->max_work_item_dimensions
402 400
403Calls 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.
404 402
405=item $int = $device->max_work_group_size 403=item $int = $device->max_work_group_size
406 404
407Calls 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.
408 406
409=item @ints = $device->max_work_item_sizes 407=item @ints = $device->max_work_item_sizes
410 408
411Calls 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.
412 410
413=item $uint = $device->preferred_vector_width_char 411=item $uint = $device->preferred_vector_width_char
414 412
415Calls 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.
416 414
417=item $uint = $device->preferred_vector_width_short 415=item $uint = $device->preferred_vector_width_short
418 416
419Calls 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.
420 418
421=item $uint = $device->preferred_vector_width_int 419=item $uint = $device->preferred_vector_width_int
422 420
423Calls 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.
424 422
425=item $uint = $device->preferred_vector_width_long 423=item $uint = $device->preferred_vector_width_long
426 424
427Calls 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.
428 426
429=item $uint = $device->preferred_vector_width_float 427=item $uint = $device->preferred_vector_width_float
430 428
431Calls 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.
432 430
433=item $uint = $device->preferred_vector_width_double 431=item $uint = $device->preferred_vector_width_double
434 432
435Calls 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.
436 434
437=item $uint = $device->max_clock_frequency 435=item $uint = $device->max_clock_frequency
438 436
439Calls 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.
440 438
441=item $bitfield = $device->address_bits 439=item $bitfield = $device->address_bits
442 440
443Calls 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.
444 442
445=item $uint = $device->max_read_image_args 443=item $uint = $device->max_read_image_args
446 444
447Calls 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.
448 446
449=item $uint = $device->max_write_image_args 447=item $uint = $device->max_write_image_args
450 448
451Calls 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.
452 450
453=item $ulong = $device->max_mem_alloc_size 451=item $ulong = $device->max_mem_alloc_size
454 452
455Calls 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.
456 454
457=item $int = $device->image2d_max_width 455=item $int = $device->image2d_max_width
458 456
459Calls 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.
460 458
461=item $int = $device->image2d_max_height 459=item $int = $device->image2d_max_height
462 460
463Calls 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.
464 462
465=item $int = $device->image3d_max_width 463=item $int = $device->image3d_max_width
466 464
467Calls 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.
468 466
469=item $int = $device->image3d_max_height 467=item $int = $device->image3d_max_height
470 468
471Calls 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.
472 470
473=item $int = $device->image3d_max_depth 471=item $int = $device->image3d_max_depth
474 472
475Calls 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.
476 474
477=item $uint = $device->image_support 475=item $uint = $device->image_support
478 476
479Calls 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.
480 478
481=item $int = $device->max_parameter_size 479=item $int = $device->max_parameter_size
482 480
483Calls 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.
484 482
485=item $uint = $device->max_samplers 483=item $uint = $device->max_samplers
486 484
487Calls 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.
488 486
489=item $uint = $device->mem_base_addr_align 487=item $uint = $device->mem_base_addr_align
490 488
491Calls 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.
492 490
493=item $uint = $device->min_data_type_align_size 491=item $uint = $device->min_data_type_align_size
494 492
495Calls 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.
496 494
497=item $device_fp_config = $device->single_fp_config 495=item $device_fp_config = $device->single_fp_config
498 496
499Calls 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.
500 498
501=item $device_mem_cache_type = $device->global_mem_cache_type 499=item $device_mem_cache_type = $device->global_mem_cache_type
502 500
503Calls 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.
504 502
505=item $uint = $device->global_mem_cacheline_size 503=item $uint = $device->global_mem_cacheline_size
506 504
507Calls 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.
508 506
509=item $ulong = $device->global_mem_cache_size 507=item $ulong = $device->global_mem_cache_size
510 508
511Calls 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.
512 510
513=item $ulong = $device->global_mem_size 511=item $ulong = $device->global_mem_size
514 512
515Calls 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.
516 514
517=item $ulong = $device->max_constant_buffer_size 515=item $ulong = $device->max_constant_buffer_size
518 516
519Calls 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.
520 518
521=item $uint = $device->max_constant_args 519=item $uint = $device->max_constant_args
522 520
523Calls 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.
524 522
525=item $device_local_mem_type = $device->local_mem_type 523=item $device_local_mem_type = $device->local_mem_type
526 524
527Calls 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.
528 526
529=item $ulong = $device->local_mem_size 527=item $ulong = $device->local_mem_size
530 528
531Calls 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.
532 530
533=item $boolean = $device->error_correction_support 531=item $boolean = $device->error_correction_support
534 532
535Calls 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.
536 534
537=item $int = $device->profiling_timer_resolution 535=item $int = $device->profiling_timer_resolution
538 536
539Calls 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.
540 538
541=item $boolean = $device->endian_little 539=item $boolean = $device->endian_little
542 540
543Calls 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.
544 542
545=item $boolean = $device->available 543=item $boolean = $device->available
546 544
547Calls C<clGetDeviceInfo> with C<CL_DEVICE_AVAILABLE> and returns the result(s). 545Calls C<clGetDeviceInfo> with C<CL_DEVICE_AVAILABLE> and returns the result.
548 546
549=item $boolean = $device->compiler_available 547=item $boolean = $device->compiler_available
550 548
551Calls 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.
552 550
553=item $device_exec_capabilities = $device->execution_capabilities 551=item $device_exec_capabilities = $device->execution_capabilities
554 552
555Calls 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.
556 554
557=item $command_queue_properties = $device->properties 555=item $command_queue_properties = $device->properties
558 556
559Calls 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.
560 558
561=item $ = $device->platform 559=item $ = $device->platform
562 560
563Calls C<clGetDeviceInfo> with C<CL_DEVICE_PLATFORM> and returns the result(s). 561Calls C<clGetDeviceInfo> with C<CL_DEVICE_PLATFORM> and returns the result.
564 562
565=item $string = $device->name 563=item $string = $device->name
566 564
567Calls C<clGetDeviceInfo> with C<CL_DEVICE_NAME> and returns the result(s). 565Calls C<clGetDeviceInfo> with C<CL_DEVICE_NAME> and returns the result.
568 566
569=item $string = $device->vendor 567=item $string = $device->vendor
570 568
571Calls C<clGetDeviceInfo> with C<CL_DEVICE_VENDOR> and returns the result(s). 569Calls C<clGetDeviceInfo> with C<CL_DEVICE_VENDOR> and returns the result.
572 570
573=item $string = $device->driver_version 571=item $string = $device->driver_version
574 572
575Calls C<clGetDeviceInfo> with C<CL_DRIVER_VERSION> and returns the result(s). 573Calls C<clGetDeviceInfo> with C<CL_DRIVER_VERSION> and returns the result.
576 574
577=item $string = $device->profile 575=item $string = $device->profile
578 576
579Calls C<clGetDeviceInfo> with C<CL_DEVICE_PROFILE> and returns the result(s). 577Calls C<clGetDeviceInfo> with C<CL_DEVICE_PROFILE> and returns the result.
580 578
581=item $string = $device->version 579=item $string = $device->version
582 580
583Calls C<clGetDeviceInfo> with C<CL_DEVICE_VERSION> and returns the result(s). 581Calls C<clGetDeviceInfo> with C<CL_DEVICE_VERSION> and returns the result.
584 582
585=item $string = $device->extensions 583=item $string = $device->extensions
586 584
587Calls C<clGetDeviceInfo> with C<CL_DEVICE_EXTENSIONS> and returns the result(s). 585Calls C<clGetDeviceInfo> with C<CL_DEVICE_EXTENSIONS> and returns the result.
588 586
589=item $uint = $device->preferred_vector_width_half 587=item $uint = $device->preferred_vector_width_half
590 588
591Calls 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.
592 590
593=item $uint = $device->native_vector_width_char 591=item $uint = $device->native_vector_width_char
594 592
595Calls 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.
596 594
597=item $uint = $device->native_vector_width_short 595=item $uint = $device->native_vector_width_short
598 596
599Calls 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.
600 598
601=item $uint = $device->native_vector_width_int 599=item $uint = $device->native_vector_width_int
602 600
603Calls 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.
604 602
605=item $uint = $device->native_vector_width_long 603=item $uint = $device->native_vector_width_long
606 604
607Calls 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.
608 606
609=item $uint = $device->native_vector_width_float 607=item $uint = $device->native_vector_width_float
610 608
611Calls 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.
612 610
613=item $uint = $device->native_vector_width_double 611=item $uint = $device->native_vector_width_double
614 612
615Calls 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.
616 614
617=item $uint = $device->native_vector_width_half 615=item $uint = $device->native_vector_width_half
618 616
619Calls 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.
620 618
621=item $device_fp_config = $device->double_fp_config 619=item $device_fp_config = $device->double_fp_config
622 620
623Calls 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.
624 622
625=item $device_fp_config = $device->half_fp_config 623=item $device_fp_config = $device->half_fp_config
626 624
627Calls 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.
628 626
629=item $boolean = $device->host_unified_memory 627=item $boolean = $device->host_unified_memory
630 628
631Calls 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.
632 630
633=item $device = $device->parent_device_ext 631=item $device = $device->parent_device_ext
634 632
635Calls 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.
636 634
637=item @device_partition_property_exts = $device->partition_types_ext 635=item @device_partition_property_exts = $device->partition_types_ext
638 636
639Calls 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.
640 638
641=item @device_partition_property_exts = $device->affinity_domains_ext 639=item @device_partition_property_exts = $device->affinity_domains_ext
642 640
643Calls 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.
644 642
645=item $uint = $device->reference_count_ext 643=item $uint = $device->reference_count_ext
646 644
647Calls 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.
648 646
649=item @device_partition_property_exts = $device->partition_style_ext 647=item @device_partition_property_exts = $device->partition_style_ext
650 648
651Calls 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.
652 650
653=for gengetinfo end device 651=for gengetinfo end device
654 652
655=back 653=back
656 654
670 668
671L<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>
672 670
673=item $buf = $ctx->buffer ($flags, $len) 671=item $buf = $ctx->buffer ($flags, $len)
674 672
675Creates 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.
676 675
677L<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>
678 677
679=item $buf = $ctx->buffer_sv ($flags, $data) 678=item $buf = $ctx->buffer_sv ($flags, $data)
680 679
681Creates 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.
682 682
683=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)
684 684
685Creates 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.
686 687
687L<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>
688 689
689=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)
690 691
691Creates 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.
692 694
693L<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>
694 696
695=item @formats = $ctx->supported_image_formats ($flags, $image_type) 697=item @formats = $ctx->supported_image_formats ($flags, $image_type)
696 698
717 719
718L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetContextInfo.html> 720L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetContextInfo.html>
719 721
720=for gengetinfo begin context 722=for gengetinfo begin context
721 723
722
723=item $uint = $context->reference_count 724=item $uint = $context->reference_count
724 725
725Calls C<clGetContextInfo> with C<CL_CONTEXT_REFERENCE_COUNT> and returns the result(s). 726Calls C<clGetContextInfo> with C<CL_CONTEXT_REFERENCE_COUNT> and returns the result.
726 727
727=item @devices = $context->devices 728=item @devices = $context->devices
728 729
729Calls C<clGetContextInfo> with C<CL_CONTEXT_DEVICES> and returns the result(s). 730Calls C<clGetContextInfo> with C<CL_CONTEXT_DEVICES> and returns the result.
730 731
731=item @property_ints = $context->properties 732=item @property_ints = $context->properties
732 733
733Calls C<clGetContextInfo> with C<CL_CONTEXT_PROPERTIES> and returns the result(s). 734Calls C<clGetContextInfo> with C<CL_CONTEXT_PROPERTIES> and returns the result.
734 735
735=item $uint = $context->num_devices 736=item $uint = $context->num_devices
736 737
737Calls C<clGetContextInfo> with C<CL_CONTEXT_NUM_DEVICES> and returns the result(s). 738Calls C<clGetContextInfo> with C<CL_CONTEXT_NUM_DEVICES> and returns the result.
738 739
739=for gengetinfo end context 740=for gengetinfo end context
740 741
741=back 742=back
742 743
774 775
775=item $ev = $queue->enqueue_copy_buffer ($src, $dst, $src_offset, $dst_offset, $len, $wait_events...) 776=item $ev = $queue->enqueue_copy_buffer ($src, $dst, $src_offset, $dst_offset, $len, $wait_events...)
776 777
777L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBuffer.html> 778L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBuffer.html>
778 779
780=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...)
781
782http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadBufferRect.html
783
784=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...)
785
786http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBufferRect.html
787
779=item $ev = $queue->enqueue_read_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) 788=item $ev = $queue->enqueue_read_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...)
780 789
790L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferRect.html>
791
792=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...)
793
781L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadImage.html> 794L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadImage.html>
782 795
783=item $ev = $queue->enqueue_write_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) 796=item $ev = $queue->enqueue_write_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...)
784 797
785L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteImage.html> 798L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteImage.html>
786 799
800=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...)
801
802L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImage.html>
803
804=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...)
805
806L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImageToBuffer.html>
807
787=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...) 808=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...)
788 809
789Yeah. 810Yeah.
790 811
791L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferRect.html>
792
793=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...)
794
795L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferToImage.html>. 812L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferToImage.html>.
796
797=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...)
798
799L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImage.html>
800
801=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...)
802
803L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImageToBuffer.html>
804 813
805=item $ev = $queue->enqueue_task ($kernel, $wait_events...) 814=item $ev = $queue->enqueue_task ($kernel, $wait_events...)
806 815
807L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueTask.html> 816L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueTask.html>
808 817
850 859
851L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetCommandQueueInfo.html> 860L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetCommandQueueInfo.html>
852 861
853=for gengetinfo begin command_queue 862=for gengetinfo begin command_queue
854 863
855
856=item $ctx = $command_queue->context 864=item $ctx = $command_queue->context
857 865
858Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_CONTEXT> and returns the result(s). 866Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_CONTEXT> and returns the result.
859 867
860=item $device = $command_queue->device 868=item $device = $command_queue->device
861 869
862Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_DEVICE> and returns the result(s). 870Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_DEVICE> and returns the result.
863 871
864=item $uint = $command_queue->reference_count 872=item $uint = $command_queue->reference_count
865 873
866Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_REFERENCE_COUNT> and returns the result(s). 874Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_REFERENCE_COUNT> and returns the result.
867 875
868=item $command_queue_properties = $command_queue->properties 876=item $command_queue_properties = $command_queue->properties
869 877
870Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_PROPERTIES> and returns the result(s). 878Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_PROPERTIES> and returns the result.
871 879
872=for gengetinfo end command_queue 880=for gengetinfo end command_queue
873 881
874=back 882=back
875 883
886 894
887L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetMemObjectInfo.html> 895L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetMemObjectInfo.html>
888 896
889=for gengetinfo begin mem 897=for gengetinfo begin mem
890 898
891
892=item $mem_object_type = $mem->type 899=item $mem_object_type = $mem->type
893 900
894Calls C<clGetMemObjectInfo> with C<CL_MEM_TYPE> and returns the result(s). 901Calls C<clGetMemObjectInfo> with C<CL_MEM_TYPE> and returns the result.
895 902
896=item $mem_flags = $mem->flags 903=item $mem_flags = $mem->flags
897 904
898Calls C<clGetMemObjectInfo> with C<CL_MEM_FLAGS> and returns the result(s). 905Calls C<clGetMemObjectInfo> with C<CL_MEM_FLAGS> and returns the result.
899 906
900=item $int = $mem->size 907=item $int = $mem->size
901 908
902Calls C<clGetMemObjectInfo> with C<CL_MEM_SIZE> and returns the result(s). 909Calls C<clGetMemObjectInfo> with C<CL_MEM_SIZE> and returns the result.
903 910
904=item $ptr_value = $mem->host_ptr 911=item $ptr_value = $mem->host_ptr
905 912
906Calls C<clGetMemObjectInfo> with C<CL_MEM_HOST_PTR> and returns the result(s). 913Calls C<clGetMemObjectInfo> with C<CL_MEM_HOST_PTR> and returns the result.
907 914
908=item $uint = $mem->map_count 915=item $uint = $mem->map_count
909 916
910Calls C<clGetMemObjectInfo> with C<CL_MEM_MAP_COUNT> and returns the result(s). 917Calls C<clGetMemObjectInfo> with C<CL_MEM_MAP_COUNT> and returns the result.
911 918
912=item $uint = $mem->reference_count 919=item $uint = $mem->reference_count
913 920
914Calls C<clGetMemObjectInfo> with C<CL_MEM_REFERENCE_COUNT> and returns the result(s). 921Calls C<clGetMemObjectInfo> with C<CL_MEM_REFERENCE_COUNT> and returns the result.
915 922
916=item $ctx = $mem->context 923=item $ctx = $mem->context
917 924
918Calls C<clGetMemObjectInfo> with C<CL_MEM_CONTEXT> and returns the result(s). 925Calls C<clGetMemObjectInfo> with C<CL_MEM_CONTEXT> and returns the result.
919 926
920=item $mem = $mem->associated_memobject 927=item $mem = $mem->associated_memobject
921 928
922Calls C<clGetMemObjectInfo> with C<CL_MEM_ASSOCIATED_MEMOBJECT> and returns the result(s). 929Calls C<clGetMemObjectInfo> with C<CL_MEM_ASSOCIATED_MEMOBJECT> and returns the result.
923 930
924=item $int = $mem->offset 931=item $int = $mem->offset
925 932
926Calls C<clGetMemObjectInfo> with C<CL_MEM_OFFSET> and returns the result(s). 933Calls C<clGetMemObjectInfo> with C<CL_MEM_OFFSET> and returns the result.
927 934
928=for gengetinfo end mem 935=for gengetinfo end mem
936
937=back
938
939=head2 THE OpenCL::Buffer CLASS
940
941This is a subclass of OpenCL::Memory, and the superclass of
942OpenCL::BufferObj. Its purpose is simply to distinguish between buffers
943and sub-buffers.
944
945=head2 THE OpenCL::BufferObj CLASS
946
947This is a subclass of OpenCL::Buffer and thus OpenCL::Memory. It exists
948because one cna create sub buffers of OpenLC::BufferObj objects, but not
949sub buffers from these sub buffers.
950
951=over 4
952
953=item $subbuf = $buf_obj->sub_buffer_region ($flags, $origin, $size)
954
955Creates an OpenCL::Buffer objects from this buffer and returns it. The
956C<buffer_create_type> is assumed to be C<CL_BUFFER_CREATE_TYPE_REGION>.
957
958L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateSubBuffer.html>
929 959
930=back 960=back
931 961
932=head2 THE OpenCL::Image CLASS 962=head2 THE OpenCL::Image CLASS
933 963
944 974
945L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetImageInfo.html> 975L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetImageInfo.html>
946 976
947=for gengetinfo begin image 977=for gengetinfo begin image
948 978
949
950=item $int = $image->element_size 979=item $int = $image->element_size
951 980
952Calls C<clGetImageInfo> with C<CL_IMAGE_ELEMENT_SIZE> and returns the result(s). 981Calls C<clGetImageInfo> with C<CL_IMAGE_ELEMENT_SIZE> and returns the result.
953 982
954=item $int = $image->row_pitch 983=item $int = $image->row_pitch
955 984
956Calls C<clGetImageInfo> with C<CL_IMAGE_ROW_PITCH> and returns the result(s). 985Calls C<clGetImageInfo> with C<CL_IMAGE_ROW_PITCH> and returns the result.
957 986
958=item $int = $image->slice_pitch 987=item $int = $image->slice_pitch
959 988
960Calls C<clGetImageInfo> with C<CL_IMAGE_SLICE_PITCH> and returns the result(s). 989Calls C<clGetImageInfo> with C<CL_IMAGE_SLICE_PITCH> and returns the result.
961 990
962=item $int = $image->width 991=item $int = $image->width
963 992
964Calls C<clGetImageInfo> with C<CL_IMAGE_WIDTH> and returns the result(s). 993Calls C<clGetImageInfo> with C<CL_IMAGE_WIDTH> and returns the result.
965 994
966=item $int = $image->height 995=item $int = $image->height
967 996
968Calls C<clGetImageInfo> with C<CL_IMAGE_HEIGHT> and returns the result(s). 997Calls C<clGetImageInfo> with C<CL_IMAGE_HEIGHT> and returns the result.
969 998
970=item $int = $image->depth 999=item $int = $image->depth
971 1000
972Calls C<clGetImageInfo> with C<CL_IMAGE_DEPTH> and returns the result(s). 1001Calls C<clGetImageInfo> with C<CL_IMAGE_DEPTH> and returns the result.
973 1002
974=for gengetinfo end image 1003=for gengetinfo end image
975 1004
976=back 1005=back
977 1006
985 1014
986L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetSamplerInfo.html> 1015L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetSamplerInfo.html>
987 1016
988=for gengetinfo begin sampler 1017=for gengetinfo begin sampler
989 1018
990
991=item $uint = $sampler->reference_count 1019=item $uint = $sampler->reference_count
992 1020
993Calls C<clGetSamplerInfo> with C<CL_SAMPLER_REFERENCE_COUNT> and returns the result(s). 1021Calls C<clGetSamplerInfo> with C<CL_SAMPLER_REFERENCE_COUNT> and returns the result.
994 1022
995=item $ctx = $sampler->context 1023=item $ctx = $sampler->context
996 1024
997Calls C<clGetSamplerInfo> with C<CL_SAMPLER_CONTEXT> and returns the result(s). 1025Calls C<clGetSamplerInfo> with C<CL_SAMPLER_CONTEXT> and returns the result.
998 1026
999=item $addressing_mode = $sampler->normalized_coords 1027=item $addressing_mode = $sampler->normalized_coords
1000 1028
1001Calls C<clGetSamplerInfo> with C<CL_SAMPLER_NORMALIZED_COORDS> and returns the result(s). 1029Calls C<clGetSamplerInfo> with C<CL_SAMPLER_NORMALIZED_COORDS> and returns the result.
1002 1030
1003=item $filter_mode = $sampler->addressing_mode 1031=item $filter_mode = $sampler->addressing_mode
1004 1032
1005Calls C<clGetSamplerInfo> with C<CL_SAMPLER_ADDRESSING_MODE> and returns the result(s). 1033Calls C<clGetSamplerInfo> with C<CL_SAMPLER_ADDRESSING_MODE> and returns the result.
1006 1034
1007=item $boolean = $sampler->filter_mode 1035=item $boolean = $sampler->filter_mode
1008 1036
1009Calls C<clGetSamplerInfo> with C<CL_SAMPLER_FILTER_MODE> and returns the result(s). 1037Calls C<clGetSamplerInfo> with C<CL_SAMPLER_FILTER_MODE> and returns the result.
1010 1038
1011=for gengetinfo end sampler 1039=for gengetinfo end sampler
1012 1040
1013=back 1041=back
1014 1042
1036 1064
1037L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateKernel.html> 1065L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateKernel.html>
1038 1066
1039=for gengetinfo begin program_build 1067=for gengetinfo begin program_build
1040 1068
1041
1042=item $build_status = $program->build_status ($device) 1069=item $build_status = $program->build_status ($device)
1043 1070
1044Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_STATUS> and returns the result(s). 1071Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_STATUS> and returns the result.
1045 1072
1046=item $string = $program->build_options ($device) 1073=item $string = $program->build_options ($device)
1047 1074
1048Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_OPTIONS> and returns the result(s). 1075Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_OPTIONS> and returns the result.
1049 1076
1050=item $string = $program->build_log ($device) 1077=item $string = $program->build_log ($device)
1051 1078
1052Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_LOG> and returns the result(s). 1079Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_LOG> and returns the result.
1053 1080
1054=for gengetinfo end program_build 1081=for gengetinfo end program_build
1055 1082
1056=item $packed_value = $program->info ($name) 1083=item $packed_value = $program->info ($name)
1057 1084
1059 1086
1060L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetProgramInfo.html> 1087L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetProgramInfo.html>
1061 1088
1062=for gengetinfo begin program 1089=for gengetinfo begin program
1063 1090
1064
1065=item $uint = $program->reference_count 1091=item $uint = $program->reference_count
1066 1092
1067Calls C<clGetProgramInfo> with C<CL_PROGRAM_REFERENCE_COUNT> and returns the result(s). 1093Calls C<clGetProgramInfo> with C<CL_PROGRAM_REFERENCE_COUNT> and returns the result.
1068 1094
1069=item $ctx = $program->context 1095=item $ctx = $program->context
1070 1096
1071Calls C<clGetProgramInfo> with C<CL_PROGRAM_CONTEXT> and returns the result(s). 1097Calls C<clGetProgramInfo> with C<CL_PROGRAM_CONTEXT> and returns the result.
1072 1098
1073=item $uint = $program->num_devices 1099=item $uint = $program->num_devices
1074 1100
1075Calls C<clGetProgramInfo> with C<CL_PROGRAM_NUM_DEVICES> and returns the result(s). 1101Calls C<clGetProgramInfo> with C<CL_PROGRAM_NUM_DEVICES> and returns the result.
1076 1102
1077=item @devices = $program->devices 1103=item @devices = $program->devices
1078 1104
1079Calls C<clGetProgramInfo> with C<CL_PROGRAM_DEVICES> and returns the result(s). 1105Calls C<clGetProgramInfo> with C<CL_PROGRAM_DEVICES> and returns the result.
1080 1106
1081=item $string = $program->source 1107=item $string = $program->source
1082 1108
1083Calls C<clGetProgramInfo> with C<CL_PROGRAM_SOURCE> and returns the result(s). 1109Calls C<clGetProgramInfo> with C<CL_PROGRAM_SOURCE> and returns the result.
1084 1110
1085=item @ints = $program->binary_sizes 1111=item @ints = $program->binary_sizes
1086 1112
1087Calls C<clGetProgramInfo> with C<CL_PROGRAM_BINARY_SIZES> and returns the result(s). 1113Calls C<clGetProgramInfo> with C<CL_PROGRAM_BINARY_SIZES> and returns the result.
1088 1114
1089=for gengetinfo end program 1115=for gengetinfo end program
1090 1116
1117=item @blobs = $program->binaries
1118
1119Returns a string for the compiled binary for every device associated with
1120the program, empty strings indicate missing programs, and an empty result
1121means no program binaries are available.
1122
1123These "binaries" are often, in fact, informative low-level assembly
1124sources.
1125
1126L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetProgramInfo.html>
1127
1091=back 1128=back
1092 1129
1093=head2 THE OpenCL::Kernel CLASS 1130=head2 THE OpenCL::Kernel CLASS
1094 1131
1095=over 4 1132=over 4
1100 1137
1101L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetKernelInfo.html> 1138L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetKernelInfo.html>
1102 1139
1103=for gengetinfo begin kernel 1140=for gengetinfo begin kernel
1104 1141
1105
1106=item $string = $kernel->function_name 1142=item $string = $kernel->function_name
1107 1143
1108Calls C<clGetKernelInfo> with C<CL_KERNEL_FUNCTION_NAME> and returns the result(s). 1144Calls C<clGetKernelInfo> with C<CL_KERNEL_FUNCTION_NAME> and returns the result.
1109 1145
1110=item $uint = $kernel->num_args 1146=item $uint = $kernel->num_args
1111 1147
1112Calls C<clGetKernelInfo> with C<CL_KERNEL_NUM_ARGS> and returns the result(s). 1148Calls C<clGetKernelInfo> with C<CL_KERNEL_NUM_ARGS> and returns the result.
1113 1149
1114=item $uint = $kernel->reference_count 1150=item $uint = $kernel->reference_count
1115 1151
1116Calls C<clGetKernelInfo> with C<CL_KERNEL_REFERENCE_COUNT> and returns the result(s). 1152Calls C<clGetKernelInfo> with C<CL_KERNEL_REFERENCE_COUNT> and returns the result.
1117 1153
1118=item $ctx = $kernel->context 1154=item $ctx = $kernel->context
1119 1155
1120Calls C<clGetKernelInfo> with C<CL_KERNEL_CONTEXT> and returns the result(s). 1156Calls C<clGetKernelInfo> with C<CL_KERNEL_CONTEXT> and returns the result.
1121 1157
1122=item $program = $kernel->program 1158=item $program = $kernel->program
1123 1159
1124Calls C<clGetKernelInfo> with C<CL_KERNEL_PROGRAM> and returns the result(s). 1160Calls C<clGetKernelInfo> with C<CL_KERNEL_PROGRAM> and returns the result.
1125 1161
1126=for gengetinfo end kernel 1162=for gengetinfo end kernel
1127 1163
1128=item $packed_value = $kernel->work_group_info ($device, $name) 1164=item $packed_value = $kernel->work_group_info ($device, $name)
1129 1165
1134 1170
1135L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetKernelWorkGroupInfo.html> 1171L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetKernelWorkGroupInfo.html>
1136 1172
1137=for gengetinfo begin kernel_work_group 1173=for gengetinfo begin kernel_work_group
1138 1174
1139
1140=item $int = $kernel->work_group_size ($device) 1175=item $int = $kernel->work_group_size ($device)
1141 1176
1142Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_WORK_GROUP_SIZE> and returns the result(s). 1177Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_WORK_GROUP_SIZE> and returns the result.
1143 1178
1144=item @ints = $kernel->compile_work_group_size ($device) 1179=item @ints = $kernel->compile_work_group_size ($device)
1145 1180
1146Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_COMPILE_WORK_GROUP_SIZE> and returns the result(s). 1181Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_COMPILE_WORK_GROUP_SIZE> and returns the result.
1147 1182
1148=item $ulong = $kernel->local_mem_size ($device) 1183=item $ulong = $kernel->local_mem_size ($device)
1149 1184
1150Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_LOCAL_MEM_SIZE> and returns the result(s). 1185Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_LOCAL_MEM_SIZE> and returns the result.
1151 1186
1152=item $int = $kernel->preferred_work_group_size_multiple ($device) 1187=item $int = $kernel->preferred_work_group_size_multiple ($device)
1153 1188
1154Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE> and returns the result(s). 1189Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE> and returns the result.
1155 1190
1156=item $ulong = $kernel->private_mem_size ($device) 1191=item $ulong = $kernel->private_mem_size ($device)
1157 1192
1158Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result(s). 1193Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result.
1159 1194
1160=for gengetinfo end kernel_work_group 1195=for gengetinfo end kernel_work_group
1161 1196
1162=item $kernel->set_TYPE ($index, $value) 1197=item $kernel->set_TYPE ($index, $value)
1163 1198
1195 1230
1196L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetEventInfo.html> 1231L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetEventInfo.html>
1197 1232
1198=for gengetinfo begin event 1233=for gengetinfo begin event
1199 1234
1200
1201=item $queue = $event->command_queue 1235=item $queue = $event->command_queue
1202 1236
1203Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_QUEUE> and returns the result(s). 1237Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_QUEUE> and returns the result.
1204 1238
1205=item $command_type = $event->command_type 1239=item $command_type = $event->command_type
1206 1240
1207Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_TYPE> and returns the result(s). 1241Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_TYPE> and returns the result.
1208 1242
1209=item $uint = $event->reference_count 1243=item $uint = $event->reference_count
1210 1244
1211Calls C<clGetEventInfo> with C<CL_EVENT_REFERENCE_COUNT> and returns the result(s). 1245Calls C<clGetEventInfo> with C<CL_EVENT_REFERENCE_COUNT> and returns the result.
1212 1246
1213=item $uint = $event->command_execution_status 1247=item $uint = $event->command_execution_status
1214 1248
1215Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_EXECUTION_STATUS> and returns the result(s). 1249Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_EXECUTION_STATUS> and returns the result.
1216 1250
1217=item $ctx = $event->context 1251=item $ctx = $event->context
1218 1252
1219Calls C<clGetEventInfo> with C<CL_EVENT_CONTEXT> and returns the result(s). 1253Calls C<clGetEventInfo> with C<CL_EVENT_CONTEXT> and returns the result.
1220 1254
1221=for gengetinfo end event 1255=for gengetinfo end event
1222 1256
1223=item $packed_value = $ev->profiling_info ($name) 1257=item $packed_value = $ev->profiling_info ($name)
1224 1258
1229 1263
1230L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetProfilingInfo.html> 1264L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetProfilingInfo.html>
1231 1265
1232=for gengetinfo begin profiling 1266=for gengetinfo begin profiling
1233 1267
1234
1235=item $ulong = $event->profiling_command_queued 1268=item $ulong = $event->profiling_command_queued
1236 1269
1237Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_QUEUED> and returns the result(s). 1270Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_QUEUED> and returns the result.
1238 1271
1239=item $ulong = $event->profiling_command_submit 1272=item $ulong = $event->profiling_command_submit
1240 1273
1241Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_SUBMIT> and returns the result(s). 1274Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_SUBMIT> and returns the result.
1242 1275
1243=item $ulong = $event->profiling_command_start 1276=item $ulong = $event->profiling_command_start
1244 1277
1245Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_START> and returns the result(s). 1278Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_START> and returns the result.
1246 1279
1247=item $ulong = $event->profiling_command_end 1280=item $ulong = $event->profiling_command_end
1248 1281
1249Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_END> and returns the result(s). 1282Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_END> and returns the result.
1250 1283
1251=for gengetinfo end profiling 1284=for gengetinfo end profiling
1252 1285
1253=back 1286=back
1254 1287
1269package OpenCL; 1302package OpenCL;
1270 1303
1271use common::sense; 1304use common::sense;
1272 1305
1273BEGIN { 1306BEGIN {
1274 our $VERSION = '0.55'; 1307 our $VERSION = '0.91';
1275 1308
1276 require XSLoader; 1309 require XSLoader;
1277 XSLoader::load (__PACKAGE__, $VERSION); 1310 XSLoader::load (__PACKAGE__, $VERSION);
1278 1311
1279 @OpenCL::Buffer::ISA = 1312 @OpenCL::Buffer::ISA =
1280 @OpenCL::Image::ISA = OpenCL::Memory::; 1313 @OpenCL::Image::ISA = OpenCL::Memory::;
1281 1314
1315 @OpenCL::BufferObj::ISA = OpenCL::Buffer::;
1316
1282 @OpenCL::Image2D::ISA = 1317 @OpenCL::Image2D::ISA =
1283 @OpenCL::Image3D::ISA = OpenCL::Image::; 1318 @OpenCL::Image3D::ISA = OpenCL::Image::;
1284 1319
1285 @OpenCL::UserEvent::ISA = OpenCL::Event::; 1320 @OpenCL::UserEvent::ISA = OpenCL::Event::;
1286} 1321}
1287 1322
12881; 13231;
1289 1324
1290=head1 AUTHOR 1325=head1 AUTHOR

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines