mirror of
https://github.com/boostorg/compute.git
synced 2026-01-27 18:52:15 +00:00
This cleans up the constructor methods for the OpenCL wrapper classes and unifies the API used for creating a wrapper class object from the underlying OpenCL objects. Now, every wrapper class has a constructor taking the OpenCL object and an optional boolean retain parameter which indicates whether the constructor should increment the reference count.
136 lines
3.9 KiB
XML
136 lines
3.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<header name="boost/compute/buffer.hpp">
|
|
<namespace name="boost">
|
|
<namespace name="compute">
|
|
|
|
<!-- boost::compute::buffer -->
|
|
<class name="buffer">
|
|
<purpose>A memory buffer</purpose>
|
|
|
|
<description>
|
|
<para>
|
|
The <code>buffer</code> class represents a memory buffer on a
|
|
compute device.
|
|
</para>
|
|
<para>
|
|
See also: <classname>context</classname>,
|
|
<classname>command_queue</classname>
|
|
</para>
|
|
</description>
|
|
|
|
<!-- buffer::buffer(context, size, flags, host_ptr) -->
|
|
<constructor>
|
|
<parameter name="context">
|
|
<paramtype>const <classname>context</classname>&</paramtype>
|
|
</parameter>
|
|
<parameter name="size">
|
|
<paramtype>size_t</paramtype>
|
|
</parameter>
|
|
<parameter name="flags">
|
|
<paramtype>cl_mem_flags</paramtype>
|
|
<default>read_write</default>
|
|
</parameter>
|
|
<parameter name="host_ptr">
|
|
<paramtype>void *</paramtype>
|
|
<default>0</default>
|
|
</parameter>
|
|
|
|
<description>
|
|
<para>
|
|
Creates a new compute buffer in <code>context</code> containing
|
|
<code>size</code> bytes.
|
|
</para>
|
|
</description>
|
|
</constructor>
|
|
|
|
<!-- buffer::buffer(cl_buffer, bool) -->
|
|
<constructor specifiers="explicit">
|
|
<parameter name="buffer">
|
|
<paramtype>cl_buffer</paramtype>
|
|
</parameter>
|
|
<parameter name="retain">
|
|
<paramtype>bool</paramtype>
|
|
<default>true</default>
|
|
</parameter>
|
|
|
|
<description>
|
|
<para>
|
|
Creates a new buffer object for <code>buffer</code>. If
|
|
<code>retain</code> is <code>true</code> (the default) the
|
|
reference count for <code>buffer</code> will be incremented.
|
|
</para>
|
|
</description>
|
|
</constructor>
|
|
|
|
<!-- buffer::buffer(other) -->
|
|
<constructor>
|
|
<parameter name="other">
|
|
<paramtype>const <classname>buffer</classname> &</paramtype>
|
|
</parameter>
|
|
|
|
<description>
|
|
<para>
|
|
Creates a new buffer object as a copy of <code>other</code>.
|
|
</para>
|
|
</description>
|
|
</constructor>
|
|
|
|
<!-- operator=(other) -->
|
|
<copy-assignment>
|
|
<parameter name="other">
|
|
<paramtype>const <classname>buffer</classname> &</paramtype>
|
|
</parameter>
|
|
|
|
<description>
|
|
<para>
|
|
Copies the buffer from <code>other</code>.
|
|
</para>
|
|
</description>
|
|
</copy-assignment>
|
|
|
|
<!-- buffer::~buffer() -->
|
|
<destructor>
|
|
<description>
|
|
<para>
|
|
Destroys the buffer object.
|
|
</para>
|
|
</description>
|
|
</destructor>
|
|
|
|
<method-group name="public member functions">
|
|
|
|
<!-- buffer::size() -->
|
|
<method name="size" cv="size">
|
|
<type>size_t</type>
|
|
|
|
<description>
|
|
<para>
|
|
Returns the size of the buffer in bytes.
|
|
</para>
|
|
</description>
|
|
</method>
|
|
|
|
<!-- buffer::get_info<T>(info) -->
|
|
<method name="get_info" cv="const">
|
|
<template>
|
|
<template-type-parameter name="T"/>
|
|
</template>
|
|
|
|
<type>T</type>
|
|
|
|
<parameter name="info">
|
|
<paramtype>cl_mem_info</paramtype>
|
|
</parameter>
|
|
|
|
<description>
|
|
<para>
|
|
Returns information about the buffer.
|
|
</para>
|
|
</description>
|
|
</method>
|
|
</method-group>
|
|
</class>
|
|
</namespace>
|
|
</namespace>
|
|
</header>
|