mesytec-mnode/external/taskflow-3.8.0/docs/xml/classtf_1_1cudaScopedDevice.xml
2025-01-04 01:25:05 +01:00

138 lines
8 KiB
XML

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.9.1" xml:lang="en-US">
<compounddef id="classtf_1_1cudaScopedDevice" kind="class" language="C++" prot="public">
<compoundname>tf::cudaScopedDevice</compoundname>
<includes refid="cuda__device_8hpp" local="no">taskflow/cuda/cuda_device.hpp</includes>
<sectiondef kind="private-attrib">
<memberdef kind="variable" id="classtf_1_1cudaScopedDevice_1a350583393e3c5edb51543726ca659687" prot="private" static="no" mutable="no">
<type>int</type>
<definition>int tf::cudaScopedDevice::_p</definition>
<argsstring></argsstring>
<name>_p</name>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="taskflow/cuda/cuda_device.hpp" line="315" column="9" bodyfile="taskflow/cuda/cuda_device.hpp" bodystart="315" bodyend="-1"/>
</memberdef>
</sectiondef>
<sectiondef kind="public-func">
<memberdef kind="function" id="classtf_1_1cudaScopedDevice_1a03d75e2c0b084c8e926a00a922302653" prot="public" static="no" const="no" explicit="yes" inline="yes" virt="non-virtual">
<type></type>
<definition>tf::cudaScopedDevice::cudaScopedDevice</definition>
<argsstring>(int device)</argsstring>
<name>cudaScopedDevice</name>
<param>
<type>int</type>
<declname>device</declname>
</param>
<briefdescription>
<para>constructs a RAII-styled device switcher </para>
</briefdescription>
<detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>device</parametername>
</parameternamelist>
<parameterdescription>
<para>device context to scope in the guard </para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="taskflow/cuda/cuda_device.hpp" line="302" column="14" bodyfile="taskflow/cuda/cuda_device.hpp" bodystart="319" bodyend="327"/>
</memberdef>
<memberdef kind="function" id="classtf_1_1cudaScopedDevice_1ad2c9212f42d80d1f7436bb52651006ee" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
<type></type>
<definition>tf::cudaScopedDevice::~cudaScopedDevice</definition>
<argsstring>()</argsstring>
<name>~cudaScopedDevice</name>
<briefdescription>
<para>destructs the guard and switches back to the previous device context </para>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="taskflow/cuda/cuda_device.hpp" line="307" column="5" bodyfile="taskflow/cuda/cuda_device.hpp" bodystart="330" bodyend="335"/>
</memberdef>
</sectiondef>
<sectiondef kind="private-func">
<memberdef kind="function" id="classtf_1_1cudaScopedDevice_1a4315f5b72224a82ec8a7d6e5e2a45a7d" prot="private" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type></type>
<definition>tf::cudaScopedDevice::cudaScopedDevice</definition>
<argsstring>()=delete</argsstring>
<name>cudaScopedDevice</name>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="taskflow/cuda/cuda_device.hpp" line="311" column="5"/>
</memberdef>
<memberdef kind="function" id="classtf_1_1cudaScopedDevice_1ad15f7efad106ae6e8ba3ee5057a014f0" prot="private" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type></type>
<definition>tf::cudaScopedDevice::cudaScopedDevice</definition>
<argsstring>(const cudaScopedDevice &amp;)=delete</argsstring>
<name>cudaScopedDevice</name>
<param>
<type>const <ref refid="classtf_1_1cudaScopedDevice" kindref="compound">cudaScopedDevice</ref> &amp;</type>
</param>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="taskflow/cuda/cuda_device.hpp" line="312" column="5"/>
</memberdef>
<memberdef kind="function" id="classtf_1_1cudaScopedDevice_1a75ddad61a5ea8029bfc112a19d4a45dc" prot="private" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type></type>
<definition>tf::cudaScopedDevice::cudaScopedDevice</definition>
<argsstring>(cudaScopedDevice &amp;&amp;)=delete</argsstring>
<name>cudaScopedDevice</name>
<param>
<type><ref refid="classtf_1_1cudaScopedDevice" kindref="compound">cudaScopedDevice</ref> &amp;&amp;</type>
</param>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="taskflow/cuda/cuda_device.hpp" line="313" column="5"/>
</memberdef>
</sectiondef>
<briefdescription>
<para>class to create an RAII-styled context switch </para>
</briefdescription>
<detaileddescription>
<para>Sample usage:</para>
<para><programlisting filename=".cpp"><codeline><highlight class="normal">{</highlight></codeline>
<codeline><highlight class="normal"><sp/><sp/><ref refid="classtf_1_1cudaScopedDevice" kindref="compound">tf::cudaScopedDevice</ref><sp/>device(1);<sp/><sp/></highlight><highlight class="comment">//<sp/>switch<sp/>to<sp/>the<sp/>device<sp/>context<sp/>1</highlight><highlight class="normal"></highlight></codeline>
<codeline><highlight class="normal"></highlight></codeline>
<codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>create<sp/>a<sp/>stream<sp/>under<sp/>device<sp/>context<sp/>1</highlight><highlight class="normal"></highlight></codeline>
<codeline><highlight class="normal"><sp/><sp/>cudaStream_t<sp/>stream;</highlight></codeline>
<codeline><highlight class="normal"><sp/><sp/>cudaStreamCreate(&amp;stream);</highlight></codeline>
<codeline><highlight class="normal"></highlight></codeline>
<codeline><highlight class="normal">}<sp/><sp/></highlight><highlight class="comment">//<sp/>leaving<sp/>the<sp/>scope<sp/>and<sp/>goes<sp/>back<sp/>to<sp/>the<sp/>previous<sp/>device<sp/>context</highlight></codeline>
</programlisting></para>
<para>cudaScopedDevice is neither movable nor copyable. </para>
</detaileddescription>
<location file="taskflow/cuda/cuda_device.hpp" line="293" column="1" bodyfile="taskflow/cuda/cuda_device.hpp" bodystart="293" bodyend="316"/>
<listofallmembers>
<member refid="classtf_1_1cudaScopedDevice_1a350583393e3c5edb51543726ca659687" prot="private" virt="non-virtual"><scope>tf::cudaScopedDevice</scope><name>_p</name></member>
<member refid="classtf_1_1cudaScopedDevice_1a03d75e2c0b084c8e926a00a922302653" prot="public" virt="non-virtual"><scope>tf::cudaScopedDevice</scope><name>cudaScopedDevice</name></member>
<member refid="classtf_1_1cudaScopedDevice_1a4315f5b72224a82ec8a7d6e5e2a45a7d" prot="private" virt="non-virtual"><scope>tf::cudaScopedDevice</scope><name>cudaScopedDevice</name></member>
<member refid="classtf_1_1cudaScopedDevice_1ad15f7efad106ae6e8ba3ee5057a014f0" prot="private" virt="non-virtual"><scope>tf::cudaScopedDevice</scope><name>cudaScopedDevice</name></member>
<member refid="classtf_1_1cudaScopedDevice_1a75ddad61a5ea8029bfc112a19d4a45dc" prot="private" virt="non-virtual"><scope>tf::cudaScopedDevice</scope><name>cudaScopedDevice</name></member>
<member refid="classtf_1_1cudaScopedDevice_1ad2c9212f42d80d1f7436bb52651006ee" prot="public" virt="non-virtual"><scope>tf::cudaScopedDevice</scope><name>~cudaScopedDevice</name></member>
</listofallmembers>
</compounddef>
</doxygen>