2
0
mirror of https://github.com/boostorg/compute.git synced 2026-01-29 07:22:19 +00:00
Files
compute/doc/reference/system.xml
Kyle Lutz 4ab37ada07 Add system-wide default command queue
This adds a system-wide default command queue. This queue is
accessible via the new static system::default_queue() method.
The default command queue is created for the default compute
device in the default context and is analogous to the default
stream in CUDA.

This changes how algorithms operate when invoked without an
explicit command queue. Previously, each algorithm had two
overloads, the first expected a command queue to be explicitly
passed and the second would create and use a temporary command
queue. Now, all algorithms take a command queue argument which
has a default value equal to system::default_queue().

This fixes a number of race-conditions and performance issues
througout the library associated with create, using, and
destroying many separate command queues.
2013-05-15 20:59:56 -04:00

85 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<header name="boost/compute/system.hpp">
<namespace name="boost">
<namespace name="compute">
<!-- boost::compute::system -->
<class name="system">
<purpose>Represents the compute system.</purpose>
<description>
<para>
The system class provides an interface to an OpenCL system.
</para>
</description>
<method-group name="public static functions">
<!-- system::default_device() -->
<method name="default_device" specifiers="static">
<type><classname>device</classname></type>
<description>
<para>
Returns the default compute device for the system. The default
device returned is the first GPU device found. If no GPU devices
are available then the first CPU device is returned. If no OpenCL
devices are found on the system then a null device object is
returned.
</para>
</description>
</method>
<!-- system::default_context() -->
<method name="default_context" specifiers="static">
<type><classname>context</classname></type>
<description>
<para>
Returns the default compute context for the system.
</para>
</description>
</method>
<!-- system::default_queue() -->
<method name="default_queue" specifiers="static">
<type><classname>command_queue</classname>&amp;</type>
<description>
<para>
Returns the default command queue for the system. The default
command queue is created for the default compute device in the
default context.
</para>
</description>
</method>
<!-- system::platforms() -->
<method name="platforms" specifiers="static">
<type>std::vector&lt;<classname>platform</classname>&gt;</type>
<description>
<para>
Returns a vector of all the OpenCL platforms available on the
system.
</para>
</description>
</method>
<!-- system::platform_count() -->
<method name="platform_count" specifiers="static">
<type>size_t</type>
<description>
<para>
Returns the total number of OpenCL platforms available on the
system.
</para>
</description>
</method>
</method-group>
</class>
</namespace>
</namespace>
</header>