--- OpenCL/OpenCL.pm 2012/05/04 15:04:51 1.74 +++ OpenCL/OpenCL.pm 2012/05/05 02:45:38 1.76 @@ -622,6 +622,7 @@ =item $ctx = OpenCL::context_from_type $properties, $type = OpenCL::DEVICE_TYPE_DEFAULT, $callback->($err, $pvt) = $print_stderr Tries to create a context from a default device and platform type - never worked for me. +Consider using C<< $platform->context_from_type >> instead. type: OpenCL::DEVICE_TYPE_DEFAULT, OpenCL::DEVICE_TYPE_CPU, OpenCL::DEVICE_TYPE_GPU, OpenCL::DEVICE_TYPE_ACCELERATOR, OpenCL::DEVICE_TYPE_CUSTOM, OpenCL::DEVICE_TYPE_ALL. @@ -630,8 +631,8 @@ =item $ctx = OpenCL::context $properties, \@devices, $callback->($err, $pvt) = $print_stderr) -Create a new OpenCL::Context object using the given device object(s). This -function isn't implemented yet, use C<< $platform->context >> instead. +Create a new OpenCL::Context object using the given device object(s). +Consider using C<< $platform->context >> instead. L @@ -1273,6 +1274,13 @@ L +=item $program = $ctx->link_program (\@devices, $options, \@programs, $cb->($program) = undef) + +Links all (already compiled) program objects specified in C<@programs> +together and returns a new OpenCL::Program object with the result. + +L + =item $packed_value = $ctx->info ($name) See C<< $platform->info >> for details. @@ -1775,6 +1783,9 @@ C<-w>, C<-Werror>, C<-cl-std=CL1.1/CL1.2>, C<-cl-kernel-arg-info>, C<-create-library>, C<-enable-link-options>. +build_status: OpenCL::BUILD_SUCCESS, OpenCL::BUILD_NONE, +OpenCL::BUILD_ERROR, OpenCL::BUILD_IN_PROGRESS. + L =item $program->build_async (\@devices = undef, $options = "", $cb->($program) = undef) @@ -1782,8 +1793,13 @@ Similar to C<< ->build >>, except it starts a thread, and never fails (you need to check the compilation status form the callback, or by polling). -build_status: OpenCL::BUILD_SUCCESS, OpenCL::BUILD_NONE, -OpenCL::BUILD_ERROR, OpenCL::BUILD_IN_PROGRESS. +=item $program->compile (\@devices = undef, $options = "", \%headers = undef, $cb->($program) = undef) + +Compiles the given program for the given devices (or all devices if +undef). If C<$headers> is given, it must be a hashref with include name => +OpenCL::Program pairs. + +L =item $packed_value = $program->build_info ($device, $name)