… | |
… | |
101 | |
101 | |
102 | Best run this once to get a feel for the platforms and devices in your |
102 | Best run this once to get a feel for the platforms and devices in your |
103 | system. |
103 | system. |
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 | |
323 | Returns a list of matching OpenCL::Device objects. |
323 | Returns 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 | |
327 | Tries to create a context. Never worked for me, and you need devices explitly anyway. |
327 | Tries to create a context. Never worked for me, and you need devices explicitly anyway. |
328 | |
328 | |
329 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html> |
329 | L<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 | |
… | |
… | |
336 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContext.html> |
336 | L<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 | |
340 | Calls C<clGetPlatformInfo> and returns the packed, raw value - for |
340 | Calls C<clGetPlatformInfo> and returns the packed, raw value - for |
341 | strings, this will be the string, for other values you probably need to |
341 | strings, this will be the string (possibly including terminating \0), for |
342 | use the correct C<unpack>. |
342 | other values you probably need to use the correct C<unpack>. |
343 | |
343 | |
344 | It's best to avoid this method and use one of the predefined C<get_*> |
344 | It's best to avoid this method and use one of the following convenience |
345 | methods. |
345 | wrappers. |
346 | |
346 | |
347 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetPlatformInfo.html> |
347 | L<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 | |
354 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_PROFILE> and returns the result(s). |
353 | Calls 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 | |
358 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VERSION> and returns the result(s). |
357 | Calls 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 | |
362 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_NAME> and returns the result(s). |
361 | Calls 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 | |
366 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_VENDOR> and returns the result(s). |
365 | Calls 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 | |
370 | Calls C<clGetPlatformInfo> with C<CL_PLATFORM_EXTENSIONS> and returns the result(s). |
369 | Calls 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 | |
384 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetDeviceInfo.html> |
383 | L<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 | |
391 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_TYPE> and returns the result(s). |
389 | Calls 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 | |
395 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_VENDOR_ID> and returns the result(s). |
393 | Calls 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 | |
399 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_COMPUTE_UNITS> and returns the result(s). |
397 | Calls 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 | |
403 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS> and returns the result(s). |
401 | Calls 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 | |
407 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_GROUP_SIZE> and returns the result(s). |
405 | Calls 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 | |
411 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WORK_ITEM_SIZES> and returns the result(s). |
409 | Calls 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 | |
415 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR> and returns the result(s). |
413 | Calls 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 | |
419 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT> and returns the result(s). |
417 | Calls 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 | |
423 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT> and returns the result(s). |
421 | Calls 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 | |
427 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG> and returns the result(s). |
425 | Calls 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 | |
431 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT> and returns the result(s). |
429 | Calls 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 | |
435 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE> and returns the result(s). |
433 | Calls 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 | |
439 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CLOCK_FREQUENCY> and returns the result(s). |
437 | Calls 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 | |
443 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_ADDRESS_BITS> and returns the result(s). |
441 | Calls 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 | |
447 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_READ_IMAGE_ARGS> and returns the result(s). |
445 | Calls 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 | |
451 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_WRITE_IMAGE_ARGS> and returns the result(s). |
449 | Calls 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 | |
455 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_MEM_ALLOC_SIZE> and returns the result(s). |
453 | Calls 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 | |
459 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE2D_MAX_WIDTH> and returns the result(s). |
457 | Calls 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 | |
463 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE2D_MAX_HEIGHT> and returns the result(s). |
461 | Calls 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 | |
467 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_WIDTH> and returns the result(s). |
465 | Calls 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 | |
471 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_HEIGHT> and returns the result(s). |
469 | Calls 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 | |
475 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE3D_MAX_DEPTH> and returns the result(s). |
473 | Calls 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 | |
479 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_IMAGE_SUPPORT> and returns the result(s). |
477 | Calls 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 | |
483 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_PARAMETER_SIZE> and returns the result(s). |
481 | Calls 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 | |
487 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_SAMPLERS> and returns the result(s). |
485 | Calls 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 | |
491 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MEM_BASE_ADDR_ALIGN> and returns the result(s). |
489 | Calls 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 | |
495 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE> and returns the result(s). |
493 | Calls 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 | |
499 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_SINGLE_FP_CONFIG> and returns the result(s). |
497 | Calls 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 | |
503 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHE_TYPE> and returns the result(s). |
501 | Calls 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 | |
507 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE> and returns the result(s). |
505 | Calls 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 | |
511 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_CACHE_SIZE> and returns the result(s). |
509 | Calls 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 | |
515 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_GLOBAL_MEM_SIZE> and returns the result(s). |
513 | Calls 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 | |
519 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE> and returns the result(s). |
517 | Calls 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 | |
523 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_MAX_CONSTANT_ARGS> and returns the result(s). |
521 | Calls 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 | |
527 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_LOCAL_MEM_TYPE> and returns the result(s). |
525 | Calls 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 | |
531 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_LOCAL_MEM_SIZE> and returns the result(s). |
529 | Calls 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 | |
535 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_ERROR_CORRECTION_SUPPORT> and returns the result(s). |
533 | Calls 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 | |
539 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PROFILING_TIMER_RESOLUTION> and returns the result(s). |
537 | Calls 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 | |
543 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_ENDIAN_LITTLE> and returns the result(s). |
541 | Calls 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 | |
547 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_AVAILABLE> and returns the result(s). |
545 | Calls 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 | |
551 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_COMPILER_AVAILABLE> and returns the result(s). |
549 | Calls 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 | |
555 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_EXECUTION_CAPABILITIES> and returns the result(s). |
553 | Calls 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 | |
559 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_QUEUE_PROPERTIES> and returns the result(s). |
557 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_QUEUE_PROPERTIES> and returns the result. |
560 | |
558 | |
561 | =item $ = $device->platform |
559 | =item $ = $device->platform |
562 | |
560 | |
563 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PLATFORM> and returns the result(s). |
561 | Calls 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 | |
567 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NAME> and returns the result(s). |
565 | Calls 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 | |
571 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_VENDOR> and returns the result(s). |
569 | Calls 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 | |
575 | Calls C<clGetDeviceInfo> with C<CL_DRIVER_VERSION> and returns the result(s). |
573 | Calls 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 | |
579 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PROFILE> and returns the result(s). |
577 | Calls 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 | |
583 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_VERSION> and returns the result(s). |
581 | Calls 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 | |
587 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_EXTENSIONS> and returns the result(s). |
585 | Calls 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 | |
591 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF> and returns the result(s). |
589 | Calls 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 | |
595 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR> and returns the result(s). |
593 | Calls 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 | |
599 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT> and returns the result(s). |
597 | Calls 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 | |
603 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_INT> and returns the result(s). |
601 | Calls 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 | |
607 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG> and returns the result(s). |
605 | Calls 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 | |
611 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT> and returns the result(s). |
609 | Calls 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 | |
615 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE> and returns the result(s). |
613 | Calls 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 | |
619 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF> and returns the result(s). |
617 | Calls 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 | |
623 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_DOUBLE_FP_CONFIG> and returns the result(s). |
621 | Calls 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 | |
627 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_HALF_FP_CONFIG> and returns the result(s). |
625 | Calls 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 | |
631 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_HOST_UNIFIED_MEMORY> and returns the result(s). |
629 | Calls 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 | |
635 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARENT_DEVICE_EXT> and returns the result(s). |
633 | Calls 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 | |
639 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARTITION_TYPES_EXT> and returns the result(s). |
637 | Calls 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 | |
643 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_AFFINITY_DOMAINS_EXT> and returns the result(s). |
641 | Calls 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 | |
647 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_REFERENCE_COUNT_EXT > and returns the result(s). |
645 | Calls 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 | |
651 | Calls C<clGetDeviceInfo> with C<CL_DEVICE_PARTITION_STYLE_EXT> and returns the result(s). |
649 | Calls 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 | |
… | |
… | |
717 | |
715 | |
718 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetContextInfo.html> |
716 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetContextInfo.html> |
719 | |
717 | |
720 | =for gengetinfo begin context |
718 | =for gengetinfo begin context |
721 | |
719 | |
722 | |
|
|
723 | =item $uint = $context->reference_count |
720 | =item $uint = $context->reference_count |
724 | |
721 | |
725 | Calls C<clGetContextInfo> with C<CL_CONTEXT_REFERENCE_COUNT> and returns the result(s). |
722 | Calls C<clGetContextInfo> with C<CL_CONTEXT_REFERENCE_COUNT> and returns the result. |
726 | |
723 | |
727 | =item @devices = $context->devices |
724 | =item @devices = $context->devices |
728 | |
725 | |
729 | Calls C<clGetContextInfo> with C<CL_CONTEXT_DEVICES> and returns the result(s). |
726 | Calls C<clGetContextInfo> with C<CL_CONTEXT_DEVICES> and returns the result. |
730 | |
727 | |
731 | =item @property_ints = $context->properties |
728 | =item @property_ints = $context->properties |
732 | |
729 | |
733 | Calls C<clGetContextInfo> with C<CL_CONTEXT_PROPERTIES> and returns the result(s). |
730 | Calls C<clGetContextInfo> with C<CL_CONTEXT_PROPERTIES> and returns the result. |
734 | |
731 | |
735 | =item $uint = $context->num_devices |
732 | =item $uint = $context->num_devices |
736 | |
733 | |
737 | Calls C<clGetContextInfo> with C<CL_CONTEXT_NUM_DEVICES> and returns the result(s). |
734 | Calls C<clGetContextInfo> with C<CL_CONTEXT_NUM_DEVICES> and returns the result. |
738 | |
735 | |
739 | =for gengetinfo end context |
736 | =for gengetinfo end context |
740 | |
737 | |
741 | =back |
738 | =back |
742 | |
739 | |
… | |
… | |
773 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBuffer.html> |
770 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBuffer.html> |
774 | |
771 | |
775 | =item $ev = $queue->enqueue_copy_buffer ($src, $dst, $src_offset, $dst_offset, $len, $wait_events...) |
772 | =item $ev = $queue->enqueue_copy_buffer ($src, $dst, $src_offset, $dst_offset, $len, $wait_events...) |
776 | |
773 | |
777 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBuffer.html> |
774 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBuffer.html> |
|
|
775 | |
|
|
776 | =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...) |
|
|
777 | |
|
|
778 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadBufferRect.html |
|
|
779 | |
|
|
780 | =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...) |
|
|
781 | |
|
|
782 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBufferRect.html |
778 | |
783 | |
779 | =item $ev = $queue->enqueue_read_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) |
784 | =item $ev = $queue->enqueue_read_image ($src, $blocking, $x, $y, $z, $width, $height, $depth, $row_pitch, $slice_pitch, $data, $wait_events...) |
780 | |
785 | |
781 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadImage.html> |
786 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadImage.html> |
782 | |
787 | |
… | |
… | |
850 | |
855 | |
851 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetCommandQueueInfo.html> |
856 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetCommandQueueInfo.html> |
852 | |
857 | |
853 | =for gengetinfo begin command_queue |
858 | =for gengetinfo begin command_queue |
854 | |
859 | |
855 | |
|
|
856 | =item $ctx = $command_queue->context |
860 | =item $ctx = $command_queue->context |
857 | |
861 | |
858 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_CONTEXT> and returns the result(s). |
862 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_CONTEXT> and returns the result. |
859 | |
863 | |
860 | =item $device = $command_queue->device |
864 | =item $device = $command_queue->device |
861 | |
865 | |
862 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_DEVICE> and returns the result(s). |
866 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_DEVICE> and returns the result. |
863 | |
867 | |
864 | =item $uint = $command_queue->reference_count |
868 | =item $uint = $command_queue->reference_count |
865 | |
869 | |
866 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_REFERENCE_COUNT> and returns the result(s). |
870 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_REFERENCE_COUNT> and returns the result. |
867 | |
871 | |
868 | =item $command_queue_properties = $command_queue->properties |
872 | =item $command_queue_properties = $command_queue->properties |
869 | |
873 | |
870 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_PROPERTIES> and returns the result(s). |
874 | Calls C<clGetCommandQueueInfo> with C<CL_QUEUE_PROPERTIES> and returns the result. |
871 | |
875 | |
872 | =for gengetinfo end command_queue |
876 | =for gengetinfo end command_queue |
873 | |
877 | |
874 | =back |
878 | =back |
875 | |
879 | |
… | |
… | |
886 | |
890 | |
887 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetMemObjectInfo.html> |
891 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetMemObjectInfo.html> |
888 | |
892 | |
889 | =for gengetinfo begin mem |
893 | =for gengetinfo begin mem |
890 | |
894 | |
891 | |
|
|
892 | =item $mem_object_type = $mem->type |
895 | =item $mem_object_type = $mem->type |
893 | |
896 | |
894 | Calls C<clGetMemObjectInfo> with C<CL_MEM_TYPE> and returns the result(s). |
897 | Calls C<clGetMemObjectInfo> with C<CL_MEM_TYPE> and returns the result. |
895 | |
898 | |
896 | =item $mem_flags = $mem->flags |
899 | =item $mem_flags = $mem->flags |
897 | |
900 | |
898 | Calls C<clGetMemObjectInfo> with C<CL_MEM_FLAGS> and returns the result(s). |
901 | Calls C<clGetMemObjectInfo> with C<CL_MEM_FLAGS> and returns the result. |
899 | |
902 | |
900 | =item $int = $mem->size |
903 | =item $int = $mem->size |
901 | |
904 | |
902 | Calls C<clGetMemObjectInfo> with C<CL_MEM_SIZE> and returns the result(s). |
905 | Calls C<clGetMemObjectInfo> with C<CL_MEM_SIZE> and returns the result. |
903 | |
906 | |
904 | =item $ptr_value = $mem->host_ptr |
907 | =item $ptr_value = $mem->host_ptr |
905 | |
908 | |
906 | Calls C<clGetMemObjectInfo> with C<CL_MEM_HOST_PTR> and returns the result(s). |
909 | Calls C<clGetMemObjectInfo> with C<CL_MEM_HOST_PTR> and returns the result. |
907 | |
910 | |
908 | =item $uint = $mem->map_count |
911 | =item $uint = $mem->map_count |
909 | |
912 | |
910 | Calls C<clGetMemObjectInfo> with C<CL_MEM_MAP_COUNT> and returns the result(s). |
913 | Calls C<clGetMemObjectInfo> with C<CL_MEM_MAP_COUNT> and returns the result. |
911 | |
914 | |
912 | =item $uint = $mem->reference_count |
915 | =item $uint = $mem->reference_count |
913 | |
916 | |
914 | Calls C<clGetMemObjectInfo> with C<CL_MEM_REFERENCE_COUNT> and returns the result(s). |
917 | Calls C<clGetMemObjectInfo> with C<CL_MEM_REFERENCE_COUNT> and returns the result. |
915 | |
918 | |
916 | =item $ctx = $mem->context |
919 | =item $ctx = $mem->context |
917 | |
920 | |
918 | Calls C<clGetMemObjectInfo> with C<CL_MEM_CONTEXT> and returns the result(s). |
921 | Calls C<clGetMemObjectInfo> with C<CL_MEM_CONTEXT> and returns the result. |
919 | |
922 | |
920 | =item $mem = $mem->associated_memobject |
923 | =item $mem = $mem->associated_memobject |
921 | |
924 | |
922 | Calls C<clGetMemObjectInfo> with C<CL_MEM_ASSOCIATED_MEMOBJECT> and returns the result(s). |
925 | Calls C<clGetMemObjectInfo> with C<CL_MEM_ASSOCIATED_MEMOBJECT> and returns the result. |
923 | |
926 | |
924 | =item $int = $mem->offset |
927 | =item $int = $mem->offset |
925 | |
928 | |
926 | Calls C<clGetMemObjectInfo> with C<CL_MEM_OFFSET> and returns the result(s). |
929 | Calls C<clGetMemObjectInfo> with C<CL_MEM_OFFSET> and returns the result. |
927 | |
930 | |
928 | =for gengetinfo end mem |
931 | =for gengetinfo end mem |
929 | |
932 | |
930 | =back |
933 | =back |
931 | |
934 | |
… | |
… | |
944 | |
947 | |
945 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetImageInfo.html> |
948 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetImageInfo.html> |
946 | |
949 | |
947 | =for gengetinfo begin image |
950 | =for gengetinfo begin image |
948 | |
951 | |
949 | |
|
|
950 | =item $int = $image->element_size |
952 | =item $int = $image->element_size |
951 | |
953 | |
952 | Calls C<clGetImageInfo> with C<CL_IMAGE_ELEMENT_SIZE> and returns the result(s). |
954 | Calls C<clGetImageInfo> with C<CL_IMAGE_ELEMENT_SIZE> and returns the result. |
953 | |
955 | |
954 | =item $int = $image->row_pitch |
956 | =item $int = $image->row_pitch |
955 | |
957 | |
956 | Calls C<clGetImageInfo> with C<CL_IMAGE_ROW_PITCH> and returns the result(s). |
958 | Calls C<clGetImageInfo> with C<CL_IMAGE_ROW_PITCH> and returns the result. |
957 | |
959 | |
958 | =item $int = $image->slice_pitch |
960 | =item $int = $image->slice_pitch |
959 | |
961 | |
960 | Calls C<clGetImageInfo> with C<CL_IMAGE_SLICE_PITCH> and returns the result(s). |
962 | Calls C<clGetImageInfo> with C<CL_IMAGE_SLICE_PITCH> and returns the result. |
961 | |
963 | |
962 | =item $int = $image->width |
964 | =item $int = $image->width |
963 | |
965 | |
964 | Calls C<clGetImageInfo> with C<CL_IMAGE_WIDTH> and returns the result(s). |
966 | Calls C<clGetImageInfo> with C<CL_IMAGE_WIDTH> and returns the result. |
965 | |
967 | |
966 | =item $int = $image->height |
968 | =item $int = $image->height |
967 | |
969 | |
968 | Calls C<clGetImageInfo> with C<CL_IMAGE_HEIGHT> and returns the result(s). |
970 | Calls C<clGetImageInfo> with C<CL_IMAGE_HEIGHT> and returns the result. |
969 | |
971 | |
970 | =item $int = $image->depth |
972 | =item $int = $image->depth |
971 | |
973 | |
972 | Calls C<clGetImageInfo> with C<CL_IMAGE_DEPTH> and returns the result(s). |
974 | Calls C<clGetImageInfo> with C<CL_IMAGE_DEPTH> and returns the result. |
973 | |
975 | |
974 | =for gengetinfo end image |
976 | =for gengetinfo end image |
975 | |
977 | |
976 | =back |
978 | =back |
977 | |
979 | |
… | |
… | |
985 | |
987 | |
986 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetSamplerInfo.html> |
988 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetSamplerInfo.html> |
987 | |
989 | |
988 | =for gengetinfo begin sampler |
990 | =for gengetinfo begin sampler |
989 | |
991 | |
990 | |
|
|
991 | =item $uint = $sampler->reference_count |
992 | =item $uint = $sampler->reference_count |
992 | |
993 | |
993 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_REFERENCE_COUNT> and returns the result(s). |
994 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_REFERENCE_COUNT> and returns the result. |
994 | |
995 | |
995 | =item $ctx = $sampler->context |
996 | =item $ctx = $sampler->context |
996 | |
997 | |
997 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_CONTEXT> and returns the result(s). |
998 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_CONTEXT> and returns the result. |
998 | |
999 | |
999 | =item $addressing_mode = $sampler->normalized_coords |
1000 | =item $addressing_mode = $sampler->normalized_coords |
1000 | |
1001 | |
1001 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_NORMALIZED_COORDS> and returns the result(s). |
1002 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_NORMALIZED_COORDS> and returns the result. |
1002 | |
1003 | |
1003 | =item $filter_mode = $sampler->addressing_mode |
1004 | =item $filter_mode = $sampler->addressing_mode |
1004 | |
1005 | |
1005 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_ADDRESSING_MODE> and returns the result(s). |
1006 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_ADDRESSING_MODE> and returns the result. |
1006 | |
1007 | |
1007 | =item $boolean = $sampler->filter_mode |
1008 | =item $boolean = $sampler->filter_mode |
1008 | |
1009 | |
1009 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_FILTER_MODE> and returns the result(s). |
1010 | Calls C<clGetSamplerInfo> with C<CL_SAMPLER_FILTER_MODE> and returns the result. |
1010 | |
1011 | |
1011 | =for gengetinfo end sampler |
1012 | =for gengetinfo end sampler |
1012 | |
1013 | |
1013 | =back |
1014 | =back |
1014 | |
1015 | |
… | |
… | |
1036 | |
1037 | |
1037 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateKernel.html> |
1038 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateKernel.html> |
1038 | |
1039 | |
1039 | =for gengetinfo begin program_build |
1040 | =for gengetinfo begin program_build |
1040 | |
1041 | |
1041 | |
|
|
1042 | =item $build_status = $program->build_status ($device) |
1042 | =item $build_status = $program->build_status ($device) |
1043 | |
1043 | |
1044 | Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_STATUS> and returns the result(s). |
1044 | Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_STATUS> and returns the result. |
1045 | |
1045 | |
1046 | =item $string = $program->build_options ($device) |
1046 | =item $string = $program->build_options ($device) |
1047 | |
1047 | |
1048 | Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_OPTIONS> and returns the result(s). |
1048 | Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_OPTIONS> and returns the result. |
1049 | |
1049 | |
1050 | =item $string = $program->build_log ($device) |
1050 | =item $string = $program->build_log ($device) |
1051 | |
1051 | |
1052 | Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_LOG> and returns the result(s). |
1052 | Calls C<clGetProgramBuildInfo> with C<CL_PROGRAM_BUILD_LOG> and returns the result. |
1053 | |
1053 | |
1054 | =for gengetinfo end program_build |
1054 | =for gengetinfo end program_build |
1055 | |
1055 | |
1056 | =item $packed_value = $program->info ($name) |
1056 | =item $packed_value = $program->info ($name) |
1057 | |
1057 | |
… | |
… | |
1059 | |
1059 | |
1060 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetProgramInfo.html> |
1060 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetProgramInfo.html> |
1061 | |
1061 | |
1062 | =for gengetinfo begin program |
1062 | =for gengetinfo begin program |
1063 | |
1063 | |
1064 | |
|
|
1065 | =item $uint = $program->reference_count |
1064 | =item $uint = $program->reference_count |
1066 | |
1065 | |
1067 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_REFERENCE_COUNT> and returns the result(s). |
1066 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_REFERENCE_COUNT> and returns the result. |
1068 | |
1067 | |
1069 | =item $ctx = $program->context |
1068 | =item $ctx = $program->context |
1070 | |
1069 | |
1071 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_CONTEXT> and returns the result(s). |
1070 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_CONTEXT> and returns the result. |
1072 | |
1071 | |
1073 | =item $uint = $program->num_devices |
1072 | =item $uint = $program->num_devices |
1074 | |
1073 | |
1075 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_NUM_DEVICES> and returns the result(s). |
1074 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_NUM_DEVICES> and returns the result. |
1076 | |
1075 | |
1077 | =item @devices = $program->devices |
1076 | =item @devices = $program->devices |
1078 | |
1077 | |
1079 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_DEVICES> and returns the result(s). |
1078 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_DEVICES> and returns the result. |
1080 | |
1079 | |
1081 | =item $string = $program->source |
1080 | =item $string = $program->source |
1082 | |
1081 | |
1083 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_SOURCE> and returns the result(s). |
1082 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_SOURCE> and returns the result. |
1084 | |
1083 | |
1085 | =item @ints = $program->binary_sizes |
1084 | =item @ints = $program->binary_sizes |
1086 | |
1085 | |
1087 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_BINARY_SIZES> and returns the result(s). |
1086 | Calls C<clGetProgramInfo> with C<CL_PROGRAM_BINARY_SIZES> and returns the result. |
1088 | |
1087 | |
1089 | =for gengetinfo end program |
1088 | =for gengetinfo end program |
1090 | |
1089 | |
|
|
1090 | =item @blobs = $program->binaries |
|
|
1091 | |
|
|
1092 | Returns a string for the compiled binary for every device associated with |
|
|
1093 | the program, empty strings indicate missing programs, and an empty result |
|
|
1094 | means no program binaries are available. |
|
|
1095 | |
|
|
1096 | These "binaries" are often, in fact, informative low-level assembly |
|
|
1097 | sources. |
|
|
1098 | |
|
|
1099 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetProgramInfo.html> |
|
|
1100 | |
1091 | =back |
1101 | =back |
1092 | |
1102 | |
1093 | =head2 THE OpenCL::Kernel CLASS |
1103 | =head2 THE OpenCL::Kernel CLASS |
1094 | |
1104 | |
1095 | =over 4 |
1105 | =over 4 |
… | |
… | |
1100 | |
1110 | |
1101 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetKernelInfo.html> |
1111 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetKernelInfo.html> |
1102 | |
1112 | |
1103 | =for gengetinfo begin kernel |
1113 | =for gengetinfo begin kernel |
1104 | |
1114 | |
1105 | |
|
|
1106 | =item $string = $kernel->function_name |
1115 | =item $string = $kernel->function_name |
1107 | |
1116 | |
1108 | Calls C<clGetKernelInfo> with C<CL_KERNEL_FUNCTION_NAME> and returns the result(s). |
1117 | Calls C<clGetKernelInfo> with C<CL_KERNEL_FUNCTION_NAME> and returns the result. |
1109 | |
1118 | |
1110 | =item $uint = $kernel->num_args |
1119 | =item $uint = $kernel->num_args |
1111 | |
1120 | |
1112 | Calls C<clGetKernelInfo> with C<CL_KERNEL_NUM_ARGS> and returns the result(s). |
1121 | Calls C<clGetKernelInfo> with C<CL_KERNEL_NUM_ARGS> and returns the result. |
1113 | |
1122 | |
1114 | =item $uint = $kernel->reference_count |
1123 | =item $uint = $kernel->reference_count |
1115 | |
1124 | |
1116 | Calls C<clGetKernelInfo> with C<CL_KERNEL_REFERENCE_COUNT> and returns the result(s). |
1125 | Calls C<clGetKernelInfo> with C<CL_KERNEL_REFERENCE_COUNT> and returns the result. |
1117 | |
1126 | |
1118 | =item $ctx = $kernel->context |
1127 | =item $ctx = $kernel->context |
1119 | |
1128 | |
1120 | Calls C<clGetKernelInfo> with C<CL_KERNEL_CONTEXT> and returns the result(s). |
1129 | Calls C<clGetKernelInfo> with C<CL_KERNEL_CONTEXT> and returns the result. |
1121 | |
1130 | |
1122 | =item $program = $kernel->program |
1131 | =item $program = $kernel->program |
1123 | |
1132 | |
1124 | Calls C<clGetKernelInfo> with C<CL_KERNEL_PROGRAM> and returns the result(s). |
1133 | Calls C<clGetKernelInfo> with C<CL_KERNEL_PROGRAM> and returns the result. |
1125 | |
1134 | |
1126 | =for gengetinfo end kernel |
1135 | =for gengetinfo end kernel |
1127 | |
1136 | |
1128 | =item $packed_value = $kernel->work_group_info ($device, $name) |
1137 | =item $packed_value = $kernel->work_group_info ($device, $name) |
1129 | |
1138 | |
… | |
… | |
1134 | |
1143 | |
1135 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetKernelWorkGroupInfo.html> |
1144 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetKernelWorkGroupInfo.html> |
1136 | |
1145 | |
1137 | =for gengetinfo begin kernel_work_group |
1146 | =for gengetinfo begin kernel_work_group |
1138 | |
1147 | |
1139 | |
|
|
1140 | =item $int = $kernel->work_group_size ($device) |
1148 | =item $int = $kernel->work_group_size ($device) |
1141 | |
1149 | |
1142 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_WORK_GROUP_SIZE> and returns the result(s). |
1150 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_WORK_GROUP_SIZE> and returns the result. |
1143 | |
1151 | |
1144 | =item @ints = $kernel->compile_work_group_size ($device) |
1152 | =item @ints = $kernel->compile_work_group_size ($device) |
1145 | |
1153 | |
1146 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_COMPILE_WORK_GROUP_SIZE> and returns the result(s). |
1154 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_COMPILE_WORK_GROUP_SIZE> and returns the result. |
1147 | |
1155 | |
1148 | =item $ulong = $kernel->local_mem_size ($device) |
1156 | =item $ulong = $kernel->local_mem_size ($device) |
1149 | |
1157 | |
1150 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_LOCAL_MEM_SIZE> and returns the result(s). |
1158 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_LOCAL_MEM_SIZE> and returns the result. |
1151 | |
1159 | |
1152 | =item $int = $kernel->preferred_work_group_size_multiple ($device) |
1160 | =item $int = $kernel->preferred_work_group_size_multiple ($device) |
1153 | |
1161 | |
1154 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE> and returns the result(s). |
1162 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE> and returns the result. |
1155 | |
1163 | |
1156 | =item $ulong = $kernel->private_mem_size ($device) |
1164 | =item $ulong = $kernel->private_mem_size ($device) |
1157 | |
1165 | |
1158 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result(s). |
1166 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result. |
1159 | |
1167 | |
1160 | =for gengetinfo end kernel_work_group |
1168 | =for gengetinfo end kernel_work_group |
1161 | |
1169 | |
1162 | =item $kernel->set_TYPE ($index, $value) |
1170 | =item $kernel->set_TYPE ($index, $value) |
1163 | |
1171 | |
… | |
… | |
1195 | |
1203 | |
1196 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetEventInfo.html> |
1204 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetEventInfo.html> |
1197 | |
1205 | |
1198 | =for gengetinfo begin event |
1206 | =for gengetinfo begin event |
1199 | |
1207 | |
1200 | |
|
|
1201 | =item $queue = $event->command_queue |
1208 | =item $queue = $event->command_queue |
1202 | |
1209 | |
1203 | Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_QUEUE> and returns the result(s). |
1210 | Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_QUEUE> and returns the result. |
1204 | |
1211 | |
1205 | =item $command_type = $event->command_type |
1212 | =item $command_type = $event->command_type |
1206 | |
1213 | |
1207 | Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_TYPE> and returns the result(s). |
1214 | Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_TYPE> and returns the result. |
1208 | |
1215 | |
1209 | =item $uint = $event->reference_count |
1216 | =item $uint = $event->reference_count |
1210 | |
1217 | |
1211 | Calls C<clGetEventInfo> with C<CL_EVENT_REFERENCE_COUNT> and returns the result(s). |
1218 | Calls C<clGetEventInfo> with C<CL_EVENT_REFERENCE_COUNT> and returns the result. |
1212 | |
1219 | |
1213 | =item $uint = $event->command_execution_status |
1220 | =item $uint = $event->command_execution_status |
1214 | |
1221 | |
1215 | Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_EXECUTION_STATUS> and returns the result(s). |
1222 | Calls C<clGetEventInfo> with C<CL_EVENT_COMMAND_EXECUTION_STATUS> and returns the result. |
1216 | |
1223 | |
1217 | =item $ctx = $event->context |
1224 | =item $ctx = $event->context |
1218 | |
1225 | |
1219 | Calls C<clGetEventInfo> with C<CL_EVENT_CONTEXT> and returns the result(s). |
1226 | Calls C<clGetEventInfo> with C<CL_EVENT_CONTEXT> and returns the result. |
1220 | |
1227 | |
1221 | =for gengetinfo end event |
1228 | =for gengetinfo end event |
1222 | |
1229 | |
1223 | =item $packed_value = $ev->profiling_info ($name) |
1230 | =item $packed_value = $ev->profiling_info ($name) |
1224 | |
1231 | |
… | |
… | |
1229 | |
1236 | |
1230 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetProfilingInfo.html> |
1237 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetProfilingInfo.html> |
1231 | |
1238 | |
1232 | =for gengetinfo begin profiling |
1239 | =for gengetinfo begin profiling |
1233 | |
1240 | |
1234 | |
|
|
1235 | =item $ulong = $event->profiling_command_queued |
1241 | =item $ulong = $event->profiling_command_queued |
1236 | |
1242 | |
1237 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_QUEUED> and returns the result(s). |
1243 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_QUEUED> and returns the result. |
1238 | |
1244 | |
1239 | =item $ulong = $event->profiling_command_submit |
1245 | =item $ulong = $event->profiling_command_submit |
1240 | |
1246 | |
1241 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_SUBMIT> and returns the result(s). |
1247 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_SUBMIT> and returns the result. |
1242 | |
1248 | |
1243 | =item $ulong = $event->profiling_command_start |
1249 | =item $ulong = $event->profiling_command_start |
1244 | |
1250 | |
1245 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_START> and returns the result(s). |
1251 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_START> and returns the result. |
1246 | |
1252 | |
1247 | =item $ulong = $event->profiling_command_end |
1253 | =item $ulong = $event->profiling_command_end |
1248 | |
1254 | |
1249 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_END> and returns the result(s). |
1255 | Calls C<clGetEventProfilingInfo> with C<CL_PROFILING_COMMAND_END> and returns the result. |
1250 | |
1256 | |
1251 | =for gengetinfo end profiling |
1257 | =for gengetinfo end profiling |
1252 | |
1258 | |
1253 | =back |
1259 | =back |
1254 | |
1260 | |