… | |
… | |
620 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetPlatformIDs.html> |
620 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetPlatformIDs.html> |
621 | |
621 | |
622 | =item $ctx = OpenCL::context_from_type $properties, $type = OpenCL::DEVICE_TYPE_DEFAULT, $callback->($err, $pvt) = $print_stderr |
622 | =item $ctx = OpenCL::context_from_type $properties, $type = OpenCL::DEVICE_TYPE_DEFAULT, $callback->($err, $pvt) = $print_stderr |
623 | |
623 | |
624 | Tries to create a context from a default device and platform type - never worked for me. |
624 | Tries to create a context from a default device and platform type - never worked for me. |
|
|
625 | Consider using C<< $platform->context_from_type >> instead. |
625 | |
626 | |
626 | type: OpenCL::DEVICE_TYPE_DEFAULT, OpenCL::DEVICE_TYPE_CPU, OpenCL::DEVICE_TYPE_GPU, |
627 | type: OpenCL::DEVICE_TYPE_DEFAULT, OpenCL::DEVICE_TYPE_CPU, OpenCL::DEVICE_TYPE_GPU, |
627 | OpenCL::DEVICE_TYPE_ACCELERATOR, OpenCL::DEVICE_TYPE_CUSTOM, OpenCL::DEVICE_TYPE_ALL. |
628 | OpenCL::DEVICE_TYPE_ACCELERATOR, OpenCL::DEVICE_TYPE_CUSTOM, OpenCL::DEVICE_TYPE_ALL. |
628 | |
629 | |
629 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html> |
630 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html> |
630 | |
631 | |
631 | =item $ctx = OpenCL::context $properties, \@devices, $callback->($err, $pvt) = $print_stderr) |
632 | =item $ctx = OpenCL::context $properties, \@devices, $callback->($err, $pvt) = $print_stderr) |
632 | |
633 | |
633 | Create a new OpenCL::Context object using the given device object(s). This |
634 | Create a new OpenCL::Context object using the given device object(s). |
634 | function isn't implemented yet, use C<< $platform->context >> instead. |
635 | Consider using C<< $platform->context >> instead. |
635 | |
636 | |
636 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContext.html> |
637 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContext.html> |
637 | |
638 | |
638 | =item OpenCL::wait_for_events $wait_events... |
639 | =item OpenCL::wait_for_events $wait_events... |
639 | |
640 | |
… | |
… | |
1270 | =item $program = $ctx->program_with_built_in_kernels (\@devices, $kernel_names) |
1271 | =item $program = $ctx->program_with_built_in_kernels (\@devices, $kernel_names) |
1271 | |
1272 | |
1272 | Creates a new OpenCL::Program object from the given built-in kernel names. |
1273 | Creates a new OpenCL::Program object from the given built-in kernel names. |
1273 | |
1274 | |
1274 | L<http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clCreateProgramWithBuiltInKernels.html> |
1275 | L<http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clCreateProgramWithBuiltInKernels.html> |
|
|
1276 | |
|
|
1277 | =item $program = $ctx->link_program (\@devices, $options, \@programs, $cb->($program) = undef) |
|
|
1278 | |
|
|
1279 | Links all (already compiled) program objects specified in C<@programs> |
|
|
1280 | together and returns a new OpenCL::Program object with the result. |
|
|
1281 | |
|
|
1282 | L<http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clLinkProgram.html> |
1275 | |
1283 | |
1276 | =item $packed_value = $ctx->info ($name) |
1284 | =item $packed_value = $ctx->info ($name) |
1277 | |
1285 | |
1278 | See C<< $platform->info >> for details. |
1286 | See C<< $platform->info >> for details. |
1279 | |
1287 | |
… | |
… | |
1773 | C<-cl-mad-enable>, C<-cl-no-signed-zeros>, C<-cl-unsafe-math-optimizations>, |
1781 | C<-cl-mad-enable>, C<-cl-no-signed-zeros>, C<-cl-unsafe-math-optimizations>, |
1774 | C<-cl-finite-math-only>, C<-cl-fast-relaxed-math>, |
1782 | C<-cl-finite-math-only>, C<-cl-fast-relaxed-math>, |
1775 | C<-w>, C<-Werror>, C<-cl-std=CL1.1/CL1.2>, C<-cl-kernel-arg-info>, |
1783 | C<-w>, C<-Werror>, C<-cl-std=CL1.1/CL1.2>, C<-cl-kernel-arg-info>, |
1776 | C<-create-library>, C<-enable-link-options>. |
1784 | C<-create-library>, C<-enable-link-options>. |
1777 | |
1785 | |
|
|
1786 | build_status: OpenCL::BUILD_SUCCESS, OpenCL::BUILD_NONE, |
|
|
1787 | OpenCL::BUILD_ERROR, OpenCL::BUILD_IN_PROGRESS. |
|
|
1788 | |
1778 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clBuildProgram.html> |
1789 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clBuildProgram.html> |
1779 | |
1790 | |
1780 | =item $program->build_async (\@devices = undef, $options = "", $cb->($program) = undef) |
1791 | =item $program->build_async (\@devices = undef, $options = "", $cb->($program) = undef) |
1781 | |
1792 | |
1782 | Similar to C<< ->build >>, except it starts a thread, and never fails (you |
1793 | Similar to C<< ->build >>, except it starts a thread, and never fails (you |
1783 | need to check the compilation status form the callback, or by polling). |
1794 | need to check the compilation status form the callback, or by polling). |
1784 | |
1795 | |
1785 | build_status: OpenCL::BUILD_SUCCESS, OpenCL::BUILD_NONE, |
1796 | =item $program->compile (\@devices = undef, $options = "", \%headers = undef, $cb->($program) = undef) |
1786 | OpenCL::BUILD_ERROR, OpenCL::BUILD_IN_PROGRESS. |
1797 | |
|
|
1798 | Compiles the given program for the given devices (or all devices if |
|
|
1799 | undef). If C<$headers> is given, it must be a hashref with include name => |
|
|
1800 | OpenCL::Program pairs. |
|
|
1801 | |
|
|
1802 | L<http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clCompileProgram.html> |
1787 | |
1803 | |
1788 | =item $packed_value = $program->build_info ($device, $name) |
1804 | =item $packed_value = $program->build_info ($device, $name) |
1789 | |
1805 | |
1790 | Similar to C<< $platform->info >>, but returns build info for a previous |
1806 | Similar to C<< $platform->info >>, but returns build info for a previous |
1791 | build attempt for the given device. |
1807 | build attempt for the given device. |