--- OpenCL/OpenCL.pm 2011/11/20 01:09:48 1.20 +++ OpenCL/OpenCL.pm 2011/11/20 10:21:27 1.21 @@ -368,6 +368,7 @@ =item $string = $platform->extensions Calls C with C and returns the result(s). + =for gengetinfo end platform =back @@ -382,6 +383,275 @@ L +=for gengetinfo begin device + + +=item $device_type = $device->type + +Calls C with C and returns the result(s). + +=item $uint = $device->vendor_id + +Calls C with C and returns the result(s). + +=item $uint = $device->max_compute_units + +Calls C with C and returns the result(s). + +=item $uint = $device->max_work_item_dimensions + +Calls C with C and returns the result(s). + +=item $int = $device->max_work_group_size + +Calls C with C and returns the result(s). + +=item @ints = $device->max_work_item_sizes + +Calls C with C and returns the result(s). + +=item $uint = $device->preferred_vector_width_char + +Calls C with C and returns the result(s). + +=item $uint = $device->preferred_vector_width_short + +Calls C with C and returns the result(s). + +=item $uint = $device->preferred_vector_width_int + +Calls C with C and returns the result(s). + +=item $uint = $device->preferred_vector_width_long + +Calls C with C and returns the result(s). + +=item $uint = $device->preferred_vector_width_float + +Calls C with C and returns the result(s). + +=item $uint = $device->preferred_vector_width_double + +Calls C with C and returns the result(s). + +=item $uint = $device->max_clock_frequency + +Calls C with C and returns the result(s). + +=item $bitfield = $device->address_bits + +Calls C with C and returns the result(s). + +=item $uint = $device->max_read_image_args + +Calls C with C and returns the result(s). + +=item $uint = $device->max_write_image_args + +Calls C with C and returns the result(s). + +=item $ulong = $device->max_mem_alloc_size + +Calls C with C and returns the result(s). + +=item $int = $device->image2d_max_width + +Calls C with C and returns the result(s). + +=item $int = $device->image2d_max_height + +Calls C with C and returns the result(s). + +=item $int = $device->image3d_max_width + +Calls C with C and returns the result(s). + +=item $int = $device->image3d_max_height + +Calls C with C and returns the result(s). + +=item $int = $device->image3d_max_depth + +Calls C with C and returns the result(s). + +=item $uint = $device->image_support + +Calls C with C and returns the result(s). + +=item $int = $device->max_parameter_size + +Calls C with C and returns the result(s). + +=item $uint = $device->max_samplers + +Calls C with C and returns the result(s). + +=item $uint = $device->mem_base_addr_align + +Calls C with C and returns the result(s). + +=item $uint = $device->min_data_type_align_size + +Calls C with C and returns the result(s). + +=item $device_fp_config = $device->single_fp_config + +Calls C with C and returns the result(s). + +=item $device_mem_cache_type = $device->global_mem_cache_type + +Calls C with C and returns the result(s). + +=item $uint = $device->global_mem_cacheline_size + +Calls C with C and returns the result(s). + +=item $ulong = $device->global_mem_cache_size + +Calls C with C and returns the result(s). + +=item $ulong = $device->global_mem_size + +Calls C with C and returns the result(s). + +=item $ulong = $device->max_constant_buffer_size + +Calls C with C and returns the result(s). + +=item $uint = $device->max_constant_args + +Calls C with C and returns the result(s). + +=item $device_local_mem_type = $device->local_mem_type + +Calls C with C and returns the result(s). + +=item $ulong = $device->local_mem_size + +Calls C with C and returns the result(s). + +=item $boolean = $device->error_correction_support + +Calls C with C and returns the result(s). + +=item $int = $device->profiling_timer_resolution + +Calls C with C and returns the result(s). + +=item $boolean = $device->endian_little + +Calls C with C and returns the result(s). + +=item $boolean = $device->available + +Calls C with C and returns the result(s). + +=item $boolean = $device->compiler_available + +Calls C with C and returns the result(s). + +=item $device_exec_capabilities = $device->execution_capabilities + +Calls C with C and returns the result(s). + +=item $command_queue_properties = $device->properties + +Calls C with C and returns the result(s). + +=item $ = $device->platform + +Calls C with C and returns the result(s). + +=item $string = $device->name + +Calls C with C and returns the result(s). + +=item $string = $device->vendor + +Calls C with C and returns the result(s). + +=item $string = $device->driver_version + +Calls C with C and returns the result(s). + +=item $string = $device->profile + +Calls C with C and returns the result(s). + +=item $string = $device->version + +Calls C with C and returns the result(s). + +=item $string = $device->extensions + +Calls C with C and returns the result(s). + +=item $uint = $device->preferred_vector_width_half + +Calls C with C and returns the result(s). + +=item $uint = $device->native_vector_width_char + +Calls C with C and returns the result(s). + +=item $uint = $device->native_vector_width_short + +Calls C with C and returns the result(s). + +=item $uint = $device->native_vector_width_int + +Calls C with C and returns the result(s). + +=item $uint = $device->native_vector_width_long + +Calls C with C and returns the result(s). + +=item $uint = $device->native_vector_width_float + +Calls C with C and returns the result(s). + +=item $uint = $device->native_vector_width_double + +Calls C with C and returns the result(s). + +=item $uint = $device->native_vector_width_half + +Calls C with C and returns the result(s). + +=item $device_fp_config = $device->double_fp_config + +Calls C with C and returns the result(s). + +=item $device_fp_config = $device->half_fp_config + +Calls C with C and returns the result(s). + +=item $boolean = $device->host_unified_memory + +Calls C with C and returns the result(s). + +=item $device = $device->parent_device_ext + +Calls C with C and returns the result(s). + +=item @device_partition_property_exts = $device->partition_types_ext + +Calls C with C and returns the result(s). + +=item @device_partition_property_exts = $device->affinity_domains_ext + +Calls C with C and returns the result(s). + +=item $uint = $device->reference_count_ext + +Calls C with C and returns the result(s). + +=item @device_partition_property_exts = $device->partition_style_ext + +Calls C with C and returns the result(s). + +=for gengetinfo end device + =back =head2 THE OpenCL::Context CLASS @@ -449,6 +719,23 @@ =for gengetinfo begin context + +=item $uint = $context->reference_count + +Calls C with C and returns the result(s). + +=item @devices = $context->devices + +Calls C with C and returns the result(s). + +=item @property_ints = $context->properties + +Calls C with C and returns the result(s). + +=item $uint = $context->num_devices + +Calls C with C and returns the result(s). + =for gengetinfo end context =back @@ -473,12 +760,6 @@ =over 4 -=item $packed_value = $ctx->info ($name) - -See C<< $platform->info >> for details. - -L - =item $ev = $queue->enqueue_read_buffer ($buffer, $blocking, $offset, $len, $data, $wait_events...) Reads data from buffer into the given string. @@ -563,13 +844,39 @@ L +=item $packed_value = $queue->info ($name) + +See C<< $platform->info >> for details. + +L + +=for gengetinfo begin command_queue + + +=item $ctx = $command_queue->context + +Calls C with C and returns the result(s). + +=item $device = $command_queue->device + +Calls C with C and returns the result(s). + +=item $uint = $command_queue->reference_count + +Calls C with C and returns the result(s). + +=item $command_queue_properties = $command_queue->properties + +Calls C with C and returns the result(s). + +=for gengetinfo end command_queue + =back =head2 THE OpenCL::Memory CLASS This the superclass of all memory objects - OpenCL::Buffer, OpenCL::Image, -OpenCL::Image2D and OpenCL::Image3D. The subclasses of this class -currently only exist to allow type-checking. +OpenCL::Image2D and OpenCL::Image3D. =over 4 @@ -579,6 +886,47 @@ L +=for gengetinfo begin mem + + +=item $mem_object_type = $mem->type + +Calls C with C and returns the result(s). + +=item $mem_flags = $mem->flags + +Calls C with C and returns the result(s). + +=item $int = $mem->size + +Calls C with C and returns the result(s). + +=item $ptr_value = $mem->host_ptr + +Calls C with C and returns the result(s). + +=item $uint = $mem->map_count + +Calls C with C and returns the result(s). + +=item $uint = $mem->reference_count + +Calls C with C and returns the result(s). + +=item $ctx = $mem->context + +Calls C with C and returns the result(s). + +=item $mem = $mem->associated_memobject + +Calls C with C and returns the result(s). + +=item $int = $mem->offset + +Calls C with C and returns the result(s). + +=for gengetinfo end mem + =back =head2 THE OpenCL::Image CLASS @@ -596,6 +944,35 @@ L +=for gengetinfo begin image + + +=item $int = $image->element_size + +Calls C with C and returns the result(s). + +=item $int = $image->row_pitch + +Calls C with C and returns the result(s). + +=item $int = $image->slice_pitch + +Calls C with C and returns the result(s). + +=item $int = $image->width + +Calls C with C and returns the result(s). + +=item $int = $image->height + +Calls C with C and returns the result(s). + +=item $int = $image->depth + +Calls C with C and returns the result(s). + +=for gengetinfo end image + =back =head2 THE OpenCL::Sampler CLASS @@ -608,17 +985,36 @@ L -=back +=for gengetinfo begin sampler -=head2 THE OpenCL::Program CLASS -=over 4 +=item $uint = $sampler->reference_count -=item $packed_value = $program->info ($name) +Calls C with C and returns the result(s). -See C<< $platform->info >> for details. +=item $ctx = $sampler->context -L +Calls C with C and returns the result(s). + +=item $addressing_mode = $sampler->normalized_coords + +Calls C with C and returns the result(s). + +=item $filter_mode = $sampler->addressing_mode + +Calls C with C and returns the result(s). + +=item $boolean = $sampler->filter_mode + +Calls C with C and returns the result(s). + +=for gengetinfo end sampler + +=back + +=head2 THE OpenCL::Program CLASS + +=over 4 =item $program->build ($device, $options = "") @@ -640,6 +1036,58 @@ L +=for gengetinfo begin program_build + + +=item $build_status = $program->build_status ($device) + +Calls C with C and returns the result(s). + +=item $string = $program->build_options ($device) + +Calls C with C and returns the result(s). + +=item $string = $program->build_log ($device) + +Calls C with C and returns the result(s). + +=for gengetinfo end program_build + +=item $packed_value = $program->info ($name) + +See C<< $platform->info >> for details. + +L + +=for gengetinfo begin program + + +=item $uint = $program->reference_count + +Calls C with C and returns the result(s). + +=item $ctx = $program->context + +Calls C with C and returns the result(s). + +=item $uint = $program->num_devices + +Calls C with C and returns the result(s). + +=item @devices = $program->devices + +Calls C with C and returns the result(s). + +=item $string = $program->source + +Calls C with C and returns the result(s). + +=item @ints = $program->binary_sizes + +Calls C with C and returns the result(s). + +=for gengetinfo end program + =back =head2 THE OpenCL::Kernel CLASS @@ -652,6 +1100,31 @@ L +=for gengetinfo begin kernel + + +=item $string = $kernel->function_name + +Calls C with C and returns the result(s). + +=item $uint = $kernel->num_args + +Calls C with C and returns the result(s). + +=item $uint = $kernel->reference_count + +Calls C with C and returns the result(s). + +=item $ctx = $kernel->context + +Calls C with C and returns the result(s). + +=item $program = $kernel->program + +Calls C with C and returns the result(s). + +=for gengetinfo end kernel + =item $packed_value = $kernel->work_group_info ($device, $name) See C<< $platform->info >> for details. @@ -661,6 +1134,31 @@ L +=for gengetinfo begin kernel_work_group + + +=item $int = $kernel->work_group_size ($device) + +Calls C with C and returns the result(s). + +=item @ints = $kernel->compile_work_group_size ($device) + +Calls C with C and returns the result(s). + +=item $ulong = $kernel->local_mem_size ($device) + +Calls C with C and returns the result(s). + +=item $int = $kernel->preferred_work_group_size_multiple ($device) + +Calls C with C and returns the result(s). + +=item $ulong = $kernel->private_mem_size ($device) + +Calls C with C and returns the result(s). + +=for gengetinfo end kernel_work_group + =item $kernel->set_TYPE ($index, $value) This is a family of methods to set the kernel argument with the number C<$index> to the give C<$value>. @@ -685,12 +1183,43 @@ =over 4 +=item $ev->wait + +Waits for the event to complete. + +L + =item $packed_value = $ev->info ($name) See C<< $platform->info >> for details. L +=for gengetinfo begin event + + +=item $queue = $event->command_queue + +Calls C with C and returns the result(s). + +=item $command_type = $event->command_type + +Calls C with C and returns the result(s). + +=item $uint = $event->reference_count + +Calls C with C and returns the result(s). + +=item $uint = $event->command_execution_status + +Calls C with C and returns the result(s). + +=item $ctx = $event->context + +Calls C with C and returns the result(s). + +=for gengetinfo end event + =item $packed_value = $ev->profiling_info ($name) See C<< $platform->info >> for details. @@ -700,11 +1229,26 @@ L -=item $ev->wait +=for gengetinfo begin profiling -Waits for the event to complete. -L +=item $ulong = $event->profiling_command_queued + +Calls C with C and returns the result(s). + +=item $ulong = $event->profiling_command_submit + +Calls C with C and returns the result(s). + +=item $ulong = $event->profiling_command_start + +Calls C with C and returns the result(s). + +=item $ulong = $event->profiling_command_end + +Calls C with C and returns the result(s). + +=for gengetinfo end profiling =back @@ -727,7 +1271,7 @@ use common::sense; BEGIN { - our $VERSION = '0.15'; + our $VERSION = '0.55'; require XSLoader; XSLoader::load (__PACKAGE__, $VERSION);