You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
169 lines
15 KiB
169 lines
15 KiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>tbb::strict_ppl::concurrent_queue< T, A > Class Template Reference</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.4.7 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li id="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
</ul></div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul></div>
|
|
<div class="nav">
|
|
<a class="el" href="a00428.html">tbb</a>::<b>strict_ppl</b>::<a class="el" href="a00286.html">concurrent_queue</a></div>
|
|
<h1>tbb::strict_ppl::concurrent_queue< T, A > Class Template Reference<br>
|
|
<small>
|
|
[<a class="el" href="a00442.html">Containers</a>]</small>
|
|
</h1><!-- doxytag: class="tbb::strict_ppl::concurrent_queue" -->A high-performance thread-safe non-blocking concurrent queue.
|
|
<a href="#_details">More...</a>
|
|
<p>
|
|
<code>#include <concurrent_queue.h></code>
|
|
<p>
|
|
<a href="a00035.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="682c3978d5cb0620000994f11c44a476"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::value_type" ref="682c3978d5cb0620000994f11c44a476" args="" -->
|
|
typedef T </td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#682c3978d5cb0620000994f11c44a476">value_type</a></td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Element type in the queue. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8d725c50a9834bb7af5b67c0aff92b8"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::reference" ref="a8d725c50a9834bb7af5b67c0aff92b8" args="" -->
|
|
typedef T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#a8d725c50a9834bb7af5b67c0aff92b8">reference</a></td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Reference type. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4d48e7ff93f81636bca2c74f7da34750"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::const_reference" ref="4d48e7ff93f81636bca2c74f7da34750" args="" -->
|
|
typedef const T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#4d48e7ff93f81636bca2c74f7da34750">const_reference</a></td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Const reference type. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8fc30e93f8342a1960357f71e4fe8a2b"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::size_type" ref="8fc30e93f8342a1960357f71e4fe8a2b" args="" -->
|
|
typedef size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#8fc30e93f8342a1960357f71e4fe8a2b">size_type</a></td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Integral type for representing size of the queue. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="068576d16c7e4e05d52f9db7a45b5b65"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::difference_type" ref="068576d16c7e4e05d52f9db7a45b5b65" args="" -->
|
|
typedef ptrdiff_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#068576d16c7e4e05d52f9db7a45b5b65">difference_type</a></td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Difference type for iterator. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a3956341728eaa558d8827063718cac"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::allocator_type" ref="5a3956341728eaa558d8827063718cac" args="" -->
|
|
typedef A </td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#5a3956341728eaa558d8827063718cac">allocator_type</a></td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocator type. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9736ac047d6da3363895c7e5b121d0c4"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::iterator" ref="9736ac047d6da3363895c7e5b121d0c4" args="" -->
|
|
typedef internal::concurrent_queue_iterator<<br>
|
|
<a class="el" href="a00286.html">concurrent_queue</a>, T > </td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9cd76d19af8c78be1bafc6ca0123ac0d"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::const_iterator" ref="9cd76d19af8c78be1bafc6ca0123ac0d" args="" -->
|
|
typedef internal::concurrent_queue_iterator<<br>
|
|
<a class="el" href="a00286.html">concurrent_queue</a>, const T > </td><td class="memItemRight" valign="bottom"><b>const_iterator</b></td></tr>
|
|
|
|
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7c48a05a94a1f4f98fdfadfbef98ecf6"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::concurrent_queue" ref="7c48a05a94a1f4f98fdfadfbef98ecf6" args="(const allocator_type &a=allocator_type())" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#7c48a05a94a1f4f98fdfadfbef98ecf6">concurrent_queue</a> (const <a class="el" href="a00286.html#5a3956341728eaa558d8827063718cac">allocator_type</a> &a=<a class="el" href="a00286.html#5a3956341728eaa558d8827063718cac">allocator_type</a>())</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty queue. <br></td></tr>
|
|
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="25209656c84f2f9b030e2f9162713341"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::concurrent_queue" ref="25209656c84f2f9b030e2f9162713341" args="(InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())" -->
|
|
template<typename InputIterator> </td></tr>
|
|
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00286.html#25209656c84f2f9b030e2f9162713341">concurrent_queue</a> (InputIterator begin, InputIterator end, const <a class="el" href="a00286.html#5a3956341728eaa558d8827063718cac">allocator_type</a> &a=<a class="el" href="a00286.html#5a3956341728eaa558d8827063718cac">allocator_type</a>())</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">[begin,end) constructor <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8a6b98ea11a867db8ac868f0113ca429"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::concurrent_queue" ref="8a6b98ea11a867db8ac868f0113ca429" args="(const concurrent_queue &src, const allocator_type &a=allocator_type())" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#8a6b98ea11a867db8ac868f0113ca429">concurrent_queue</a> (const <a class="el" href="a00286.html">concurrent_queue</a> &src, const <a class="el" href="a00286.html#5a3956341728eaa558d8827063718cac">allocator_type</a> &a=<a class="el" href="a00286.html#5a3956341728eaa558d8827063718cac">allocator_type</a>())</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="830b33753d6b149c366344e29b2edd8c"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::~concurrent_queue" ref="830b33753d6b149c366344e29b2edd8c" args="()" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#830b33753d6b149c366344e29b2edd8c">~concurrent_queue</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy queue. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="73c47563ffcc4c2f6452f25a04ebe2e2"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::push" ref="73c47563ffcc4c2f6452f25a04ebe2e2" args="(const T &source)" -->
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#73c47563ffcc4c2f6452f25a04ebe2e2">push</a> (const T &source)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enqueue an item at tail of queue. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#ae31ca0db34ef96ef1e74aa0d28c95f8">try_pop</a> (T &result)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Attempt to dequeue an item from head of queue. <a href="#ae31ca0db34ef96ef1e74aa0d28c95f8"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eaa35a5274606779802e9a669a706260"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::unsafe_size" ref="eaa35a5274606779802e9a669a706260" args="() const " -->
|
|
<a class="el" href="a00286.html#8fc30e93f8342a1960357f71e4fe8a2b">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#eaa35a5274606779802e9a669a706260">unsafe_size</a> () const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the number of items in the queue; thread unsafe. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f3f6fce0cfa2d581d6f3b47e0613ad64"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::empty" ref="f3f6fce0cfa2d581d6f3b47e0613ad64" args="() const " -->
|
|
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#f3f6fce0cfa2d581d6f3b47e0613ad64">empty</a> () const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Equivalent to size()==0. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c32e8e84c0524155133b4aae32d2a827"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::clear" ref="c32e8e84c0524155133b4aae32d2a827" args="()" -->
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#c32e8e84c0524155133b4aae32d2a827">clear</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear the queue. not thread-safe. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f034f70caef445fe8abc9113ec926a8d"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::get_allocator" ref="f034f70caef445fe8abc9113ec926a8d" args="() const " -->
|
|
<a class="el" href="a00286.html#5a3956341728eaa558d8827063718cac">allocator_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00286.html#f034f70caef445fe8abc9113ec926a8d">get_allocator</a> () const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return allocator object. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6297f48808dd7c14e6c2fe81559ca190"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::unsafe_begin" ref="6297f48808dd7c14e6c2fe81559ca190" args="()" -->
|
|
iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_begin</b> ()</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1569f70e70521fe71944a5b0138c6ef5"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::unsafe_end" ref="1569f70e70521fe71944a5b0138c6ef5" args="()" -->
|
|
iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_end</b> ()</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e3e6746f7b6ecfbc16f781665ac51112"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::unsafe_begin" ref="e3e6746f7b6ecfbc16f781665ac51112" args="() const " -->
|
|
const_iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_begin</b> () const </td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="83bf90849c08f44d25dd7a3b207a8956"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::unsafe_end" ref="83bf90849c08f44d25dd7a3b207a8956" args="() const " -->
|
|
const_iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_end</b> () const </td></tr>
|
|
|
|
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="05bffad9626d51abbd4bb82ae2a1cceb"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::internal::concurrent_queue_iterator" ref="05bffad9626d51abbd4bb82ae2a1cceb" args="" -->
|
|
class </td><td class="memItemRight" valign="bottom"><b>internal::concurrent_queue_iterator</b></td></tr>
|
|
|
|
</table>
|
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
<h3>template<typename T, typename A = cache_aligned_allocator<T>><br>
|
|
class tbb::strict_ppl::concurrent_queue< T, A ></h3>
|
|
|
|
A high-performance thread-safe non-blocking concurrent queue.
|
|
<p>
|
|
Multiple threads may each push and pop concurrently. Assignment construction is not allowed.
|
|
<p>
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="ae31ca0db34ef96ef1e74aa0d28c95f8"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::try_pop" ref="ae31ca0db34ef96ef1e74aa0d28c95f8" args="(T &result)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T, typename A = cache_aligned_allocator<T>> </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool <a class="el" href="a00286.html">tbb::strict_ppl::concurrent_queue</a>< T, A >::try_pop </td>
|
|
<td>(</td>
|
|
<td class="paramtype">T & </td>
|
|
<td class="paramname"> <em>result</em> </td>
|
|
<td> ) </td>
|
|
<td width="100%"><code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Attempt to dequeue an item from head of queue.
|
|
<p>
|
|
Does not wait for item to become available. Returns true if successful; false otherwise.
|
|
</div>
|
|
</div><p>
|
|
<hr>The documentation for this class was generated from the following file:<ul>
|
|
<li>concurrent_queue.h</ul>
|
|
<hr>
|
|
<p></p>
|
|
Copyright © 2005-2013 Intel Corporation. All Rights Reserved.
|
|
<p></p>
|
|
Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
|
|
registered trademarks or trademarks of Intel Corporation or its
|
|
subsidiaries in the United States and other countries.
|
|
<p></p>
|
|
* Other names and brands may be claimed as the property of others.
|