<?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_1UnboundedTaskQueue" kind="class" language="C++" prot="public">
    <compoundname>tf::UnboundedTaskQueue</compoundname>
    <includes refid="tsq_8hpp" local="no">taskflow/core/tsq.hpp</includes>
    <innerclass refid="structtf_1_1UnboundedTaskQueue_1_1Array" prot="private">tf::UnboundedTaskQueue::Array</innerclass>
    <templateparamlist>
      <param>
        <type>typename T</type>
      </param>
    </templateparamlist>
      <sectiondef kind="private-attrib">
      <memberdef kind="variable" id="classtf_1_1UnboundedTaskQueue_1a7d91028a58dff5e905d58aeacdbe17ef" prot="private" static="no" mutable="no">
        <type><ref refid="cpp/atomic/atomic" kindref="compound" external="/home/thuang295/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml">std::atomic</ref>&lt; int64_t &gt;</type>
        <definition>std::atomic&lt;int64_t&gt; tf::UnboundedTaskQueue&lt; T &gt;::_top</definition>
        <argsstring></argsstring>
        <name>_top</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="taskflow/core/tsq.hpp" line="97" column="23" bodyfile="taskflow/core/tsq.hpp" bodystart="97" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="classtf_1_1UnboundedTaskQueue_1ac5998bba9d23eafbf9d98efed82af5e0" prot="private" static="no" mutable="no">
        <type><ref refid="cpp/atomic/atomic" kindref="compound" external="/home/thuang295/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml">std::atomic</ref>&lt; int64_t &gt;</type>
        <definition>std::atomic&lt;int64_t&gt; tf::UnboundedTaskQueue&lt; T &gt;::_bottom</definition>
        <argsstring></argsstring>
        <name>_bottom</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="taskflow/core/tsq.hpp" line="98" column="23" bodyfile="taskflow/core/tsq.hpp" bodystart="98" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="classtf_1_1UnboundedTaskQueue_1a0d29082bff41b8c94e9de565d3c4c970" prot="private" static="no" mutable="no">
        <type><ref refid="cpp/atomic/atomic" kindref="compound" external="/home/thuang295/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml">std::atomic</ref>&lt; Array * &gt;</type>
        <definition>std::atomic&lt;Array*&gt; tf::UnboundedTaskQueue&lt; T &gt;::_array</definition>
        <argsstring></argsstring>
        <name>_array</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="taskflow/core/tsq.hpp" line="99" column="15" bodyfile="taskflow/core/tsq.hpp" bodystart="99" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="classtf_1_1UnboundedTaskQueue_1a35bad5d9923949883d9c1a22aa89690f" prot="private" static="no" mutable="no">
        <type><ref refid="cpp/container/vector" kindref="compound" external="/home/thuang295/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml">std::vector</ref>&lt; Array * &gt;</type>
        <definition>std::vector&lt;Array*&gt; tf::UnboundedTaskQueue&lt; T &gt;::_garbage</definition>
        <argsstring></argsstring>
        <name>_garbage</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="taskflow/core/tsq.hpp" line="100" column="15" bodyfile="taskflow/core/tsq.hpp" bodystart="100" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="public-func">
      <memberdef kind="function" id="classtf_1_1UnboundedTaskQueue_1accc811a0a5d692a3cda366378367d7b6" prot="public" static="no" const="no" explicit="yes" inline="no" virt="non-virtual">
        <type></type>
        <definition>tf::UnboundedTaskQueue&lt; T &gt;::UnboundedTaskQueue</definition>
        <argsstring>(int64_t LogSize=TF_DEFAULT_UNBOUNDED_TASK_QUEUE_LOG_SIZE)</argsstring>
        <name>UnboundedTaskQueue</name>
        <param>
          <type>int64_t</type>
          <declname>LogSize</declname>
          <defval><ref refid="tsq_8hpp_1a45e25b85f72dd5c43f2c9010205c3e37" kindref="member">TF_DEFAULT_UNBOUNDED_TASK_QUEUE_LOG_SIZE</ref></defval>
        </param>
        <briefdescription>
<para>constructs the queue with the given size in the base-2 logarithm </para>
        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>LogSize</parametername>
</parameternamelist>
<parameterdescription>
<para>the base-2 logarithm of the queue size </para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="taskflow/core/tsq.hpp" line="109" column="12" bodyfile="taskflow/core/tsq.hpp" bodystart="165" bodyend="170"/>
      </memberdef>
      <memberdef kind="function" id="classtf_1_1UnboundedTaskQueue_1a72babe096da4ffc72a68b9ff76134e95" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>tf::UnboundedTaskQueue&lt; T &gt;::~UnboundedTaskQueue</definition>
        <argsstring>()</argsstring>
        <name>~UnboundedTaskQueue</name>
        <briefdescription>
<para>destructs the queue </para>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="taskflow/core/tsq.hpp" line="114" column="3" bodyfile="taskflow/core/tsq.hpp" bodystart="174" bodyend="179"/>
      </memberdef>
      <memberdef kind="function" id="classtf_1_1UnboundedTaskQueue_1a625c75d38982b8eb5d6e6d6f2aa49dec" prot="public" static="no" const="yes" explicit="no" inline="no" noexcept="yes" virt="non-virtual">
        <type>bool</type>
        <definition>bool tf::UnboundedTaskQueue&lt; T &gt;::empty</definition>
        <argsstring>() const noexcept</argsstring>
        <name>empty</name>
        <briefdescription>
<para>queries if the queue is empty at the time of this call </para>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="taskflow/core/tsq.hpp" line="119" column="8" bodyfile="taskflow/core/tsq.hpp" bodystart="183" bodyend="187"/>
      </memberdef>
      <memberdef kind="function" id="classtf_1_1UnboundedTaskQueue_1aa701e0781b063a889ee77f71d3b68d3d" prot="public" static="no" const="yes" explicit="no" inline="no" noexcept="yes" virt="non-virtual">
        <type>size_t</type>
        <definition>size_t tf::UnboundedTaskQueue&lt; T &gt;::size</definition>
        <argsstring>() const noexcept</argsstring>
        <name>size</name>
        <briefdescription>
<para>queries the number of items at the time of this call </para>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="taskflow/core/tsq.hpp" line="124" column="10" bodyfile="taskflow/core/tsq.hpp" bodystart="191" bodyend="195"/>
      </memberdef>
      <memberdef kind="function" id="classtf_1_1UnboundedTaskQueue_1a54eb8fe122dd783c486c683e7c50c5e5" prot="public" static="no" const="yes" explicit="no" inline="no" noexcept="yes" virt="non-virtual">
        <type>int64_t</type>
        <definition>int64_t tf::UnboundedTaskQueue&lt; T &gt;::capacity</definition>
        <argsstring>() const noexcept</argsstring>
        <name>capacity</name>
        <briefdescription>
<para>queries the capacity of the queue </para>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="taskflow/core/tsq.hpp" line="129" column="11" bodyfile="taskflow/core/tsq.hpp" bodystart="273" bodyend="275"/>
      </memberdef>
      <memberdef kind="function" id="classtf_1_1UnboundedTaskQueue_1a3d077fbe105a2712c1b22696edfbf061" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void tf::UnboundedTaskQueue&lt; T &gt;::push</definition>
        <argsstring>(T item)</argsstring>
        <name>push</name>
        <param>
          <type>T</type>
          <declname>item</declname>
        </param>
        <briefdescription>
<para>inserts an item to the queue </para>
        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>item</parametername>
</parameternamelist>
<parameterdescription>
<para>the item to push to the queue</para>
</parameterdescription>
</parameteritem>
</parameterlist>
Only the owner thread can insert an item to the queue. The operation can trigger the queue to resize its capacity if more space is required. </para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="taskflow/core/tsq.hpp" line="140" column="8" bodyfile="taskflow/core/tsq.hpp" bodystart="199" bodyend="215"/>
      </memberdef>
      <memberdef kind="function" id="classtf_1_1UnboundedTaskQueue_1a169eee6096445fe32ae0e34cae629c38" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>T</type>
        <definition>T tf::UnboundedTaskQueue&lt; T &gt;::pop</definition>
        <argsstring>()</argsstring>
        <name>pop</name>
        <briefdescription>
<para>pops out an item from the queue </para>
        </briefdescription>
        <detaileddescription>
<para>Only the owner thread can pop out an item from the queue. The return can be a <computeroutput>nullptr</computeroutput> if this operation failed (empty queue). </para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="taskflow/core/tsq.hpp" line="148" column="5" bodyfile="taskflow/core/tsq.hpp" bodystart="219" bodyend="246"/>
      </memberdef>
      <memberdef kind="function" id="classtf_1_1UnboundedTaskQueue_1a038400d9c48a421d3e27379cf319e2ff" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>T</type>
        <definition>T tf::UnboundedTaskQueue&lt; T &gt;::steal</definition>
        <argsstring>()</argsstring>
        <name>steal</name>
        <briefdescription>
<para>steals an item from the queue </para>
        </briefdescription>
        <detaileddescription>
<para>Any threads can try to steal an item from the queue. The return can be a <computeroutput>nullptr</computeroutput> if this operation failed (not necessary empty). </para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="taskflow/core/tsq.hpp" line="156" column="5" bodyfile="taskflow/core/tsq.hpp" bodystart="250" bodyend="269"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="private-func">
      <memberdef kind="function" id="classtf_1_1UnboundedTaskQueue_1a7925cbfb4473f5bd4b2dcf52da4985f7" prot="private" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>Array *</type>
        <definition>UnboundedTaskQueue&lt; T &gt;::Array * tf::UnboundedTaskQueue&lt; T &gt;::resize_array</definition>
        <argsstring>(Array *a, int64_t b, int64_t t)</argsstring>
        <name>resize_array</name>
        <param>
          <type>Array *</type>
          <declname>a</declname>
        </param>
        <param>
          <type>int64_t</type>
          <declname>b</declname>
        </param>
        <param>
          <type>int64_t</type>
          <declname>t</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="taskflow/core/tsq.hpp" line="160" column="9" bodyfile="taskflow/core/tsq.hpp" bodystart="279" bodyend="288"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
<para>class to create a lock-free unbounded work-stealing queue </para>
    </briefdescription>
    <detaileddescription>
<para><parameterlist kind="templateparam"><parameteritem>
<parameternamelist>
<parametername>T</parametername>
</parameternamelist>
<parameterdescription>
<para>data type (must be a pointer type)</para>
</parameterdescription>
</parameteritem>
</parameterlist>
This class implements the work-stealing queue described in the paper, <ulink url="https://www.di.ens.fr/~zappa/readings/ppopp13.pdf">Correct and Efficient Work-Stealing for Weak Memory Models</ulink>.</para>
<para>Only the queue owner can perform pop and push operations, while others can steal data from the queue simultaneously. </para>
    </detaileddescription>
    <location file="taskflow/core/tsq.hpp" line="53" column="1" bodyfile="taskflow/core/tsq.hpp" bodystart="53" bodyend="161"/>
    <listofallmembers>
      <member refid="classtf_1_1UnboundedTaskQueue_1a0d29082bff41b8c94e9de565d3c4c970" prot="private" virt="non-virtual"><scope>tf::UnboundedTaskQueue</scope><name>_array</name></member>
      <member refid="classtf_1_1UnboundedTaskQueue_1ac5998bba9d23eafbf9d98efed82af5e0" prot="private" virt="non-virtual"><scope>tf::UnboundedTaskQueue</scope><name>_bottom</name></member>
      <member refid="classtf_1_1UnboundedTaskQueue_1a35bad5d9923949883d9c1a22aa89690f" prot="private" virt="non-virtual"><scope>tf::UnboundedTaskQueue</scope><name>_garbage</name></member>
      <member refid="classtf_1_1UnboundedTaskQueue_1a7d91028a58dff5e905d58aeacdbe17ef" prot="private" virt="non-virtual"><scope>tf::UnboundedTaskQueue</scope><name>_top</name></member>
      <member refid="classtf_1_1UnboundedTaskQueue_1a54eb8fe122dd783c486c683e7c50c5e5" prot="public" virt="non-virtual"><scope>tf::UnboundedTaskQueue</scope><name>capacity</name></member>
      <member refid="classtf_1_1UnboundedTaskQueue_1a625c75d38982b8eb5d6e6d6f2aa49dec" prot="public" virt="non-virtual"><scope>tf::UnboundedTaskQueue</scope><name>empty</name></member>
      <member refid="classtf_1_1UnboundedTaskQueue_1a169eee6096445fe32ae0e34cae629c38" prot="public" virt="non-virtual"><scope>tf::UnboundedTaskQueue</scope><name>pop</name></member>
      <member refid="classtf_1_1UnboundedTaskQueue_1a3d077fbe105a2712c1b22696edfbf061" prot="public" virt="non-virtual"><scope>tf::UnboundedTaskQueue</scope><name>push</name></member>
      <member refid="classtf_1_1UnboundedTaskQueue_1a7925cbfb4473f5bd4b2dcf52da4985f7" prot="private" virt="non-virtual"><scope>tf::UnboundedTaskQueue</scope><name>resize_array</name></member>
      <member refid="classtf_1_1UnboundedTaskQueue_1aa701e0781b063a889ee77f71d3b68d3d" prot="public" virt="non-virtual"><scope>tf::UnboundedTaskQueue</scope><name>size</name></member>
      <member refid="classtf_1_1UnboundedTaskQueue_1a038400d9c48a421d3e27379cf319e2ff" prot="public" virt="non-virtual"><scope>tf::UnboundedTaskQueue</scope><name>steal</name></member>
      <member refid="classtf_1_1UnboundedTaskQueue_1accc811a0a5d692a3cda366378367d7b6" prot="public" virt="non-virtual"><scope>tf::UnboundedTaskQueue</scope><name>UnboundedTaskQueue</name></member>
      <member refid="classtf_1_1UnboundedTaskQueue_1a72babe096da4ffc72a68b9ff76134e95" prot="public" virt="non-virtual"><scope>tf::UnboundedTaskQueue</scope><name>~UnboundedTaskQueue</name></member>
    </listofallmembers>
  </compounddef>
</doxygen>
