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.
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.4"/> <title>tbb::strict_ppl::concurrent_queue< T, A > Class Template Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <!-- end header part --> <!-- Generated by Doxygen 1.8.4 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <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 id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="a00222.html">tbb</a></li><li class="navelem"><b>strict_ppl</b></li><li class="navelem"><a class="el" href="a00038.html">concurrent_queue</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-types">Public Types</a> | <a href="#pub-methods">Public Member Functions</a> | <a href="#friends">Friends</a> | <a href="a00383.html">List of all members</a> </div> <div class="headertitle"> <div class="title">tbb::strict_ppl::concurrent_queue< T, A > Class Template Reference<div class="ingroups"><a class="el" href="a00235.html">Containers</a></div></div> </div> </div><!--header--> <div class="contents">
<p>A high-performance thread-safe non-blocking concurrent queue. <a href="a00038.html#details">More...</a></p>
<p><code>#include <concurrent_queue.h></code></p> <div class="dynheader"> Inheritance diagram for tbb::strict_ppl::concurrent_queue< T, A >:</div> <div class="dyncontent"> <div class="center"> <img src="a00038.png" usemap="#tbb::strict_ppl::concurrent_queue< T, A >_map" alt=""/> <map id="tbb::strict_ppl::concurrent_queue< T, A >_map" name="tbb::strict_ppl::concurrent_queue< T, A >_map"> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a> Public Types</h2></td></tr> <tr class="memitem:aeeee93a7ac2eecc80bbf3e857e900538"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeeee93a7ac2eecc80bbf3e857e900538"></a> typedef T </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#aeeee93a7ac2eecc80bbf3e857e900538">value_type</a></td></tr> <tr class="memdesc:aeeee93a7ac2eecc80bbf3e857e900538"><td class="mdescLeft"> </td><td class="mdescRight">Element type in the queue. <br/></td></tr> <tr class="separator:aeeee93a7ac2eecc80bbf3e857e900538"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab26ddf11b15d61ac87e6c1ae67af92a2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab26ddf11b15d61ac87e6c1ae67af92a2"></a> typedef T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ab26ddf11b15d61ac87e6c1ae67af92a2">reference</a></td></tr> <tr class="memdesc:ab26ddf11b15d61ac87e6c1ae67af92a2"><td class="mdescLeft"> </td><td class="mdescRight">Reference type. <br/></td></tr> <tr class="separator:ab26ddf11b15d61ac87e6c1ae67af92a2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a478c2b7f763b2e821e01cc14e13baf4c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a478c2b7f763b2e821e01cc14e13baf4c"></a> typedef const T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a478c2b7f763b2e821e01cc14e13baf4c">const_reference</a></td></tr> <tr class="memdesc:a478c2b7f763b2e821e01cc14e13baf4c"><td class="mdescLeft"> </td><td class="mdescRight">Const reference type. <br/></td></tr> <tr class="separator:a478c2b7f763b2e821e01cc14e13baf4c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9f883e49afea16293ba92da779981bb8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f883e49afea16293ba92da779981bb8"></a> typedef size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a9f883e49afea16293ba92da779981bb8">size_type</a></td></tr> <tr class="memdesc:a9f883e49afea16293ba92da779981bb8"><td class="mdescLeft"> </td><td class="mdescRight">Integral type for representing size of the queue. <br/></td></tr> <tr class="separator:a9f883e49afea16293ba92da779981bb8"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a63b42d83a9ed13fc6741e0b4388b0e96"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a63b42d83a9ed13fc6741e0b4388b0e96"></a> typedef ptrdiff_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a63b42d83a9ed13fc6741e0b4388b0e96">difference_type</a></td></tr> <tr class="memdesc:a63b42d83a9ed13fc6741e0b4388b0e96"><td class="mdescLeft"> </td><td class="mdescRight">Difference type for iterator. <br/></td></tr> <tr class="separator:a63b42d83a9ed13fc6741e0b4388b0e96"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:acbdd1a5bd034358fb0774b322a66b1ed"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acbdd1a5bd034358fb0774b322a66b1ed"></a> typedef A </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#acbdd1a5bd034358fb0774b322a66b1ed">allocator_type</a></td></tr> <tr class="memdesc:acbdd1a5bd034358fb0774b322a66b1ed"><td class="mdescLeft"> </td><td class="mdescRight">Allocator type. <br/></td></tr> <tr class="separator:acbdd1a5bd034358fb0774b322a66b1ed"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab1361aa7fd454fe593609be740ab8a4c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab1361aa7fd454fe593609be740ab8a4c"></a> typedef <br class="typebreak"/> internal::concurrent_queue_iterator<br class="typebreak"/> < <a class="el" href="a00038.html">concurrent_queue</a>, T > </td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr> <tr class="separator:ab1361aa7fd454fe593609be740ab8a4c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a674e375edf0a3463ae1cec5d6158593d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a674e375edf0a3463ae1cec5d6158593d"></a> typedef <br class="typebreak"/> internal::concurrent_queue_iterator<br class="typebreak"/> < <a class="el" href="a00038.html">concurrent_queue</a>, const T > </td><td class="memItemRight" valign="bottom"><b>const_iterator</b></td></tr> <tr class="separator:a674e375edf0a3463ae1cec5d6158593d"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a49b2e16902577cd3174355be0fa684e5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a49b2e16902577cd3174355be0fa684e5"></a>  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a49b2e16902577cd3174355be0fa684e5">concurrent_queue</a> (const <a class="el" href="a00038.html#acbdd1a5bd034358fb0774b322a66b1ed">allocator_type</a> &a=<a class="el" href="a00038.html#acbdd1a5bd034358fb0774b322a66b1ed">allocator_type</a>())</td></tr> <tr class="memdesc:a49b2e16902577cd3174355be0fa684e5"><td class="mdescLeft"> </td><td class="mdescRight">Construct empty queue. <br/></td></tr> <tr class="separator:a49b2e16902577cd3174355be0fa684e5"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a43ac953152e60815c09fe4a4d4a623a9"><td class="memTemplParams" colspan="2"><a class="anchor" id="a43ac953152e60815c09fe4a4d4a623a9"></a> template<typename InputIterator > </td></tr> <tr class="memitem:a43ac953152e60815c09fe4a4d4a623a9"><td class="memTemplItemLeft" align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00038.html#a43ac953152e60815c09fe4a4d4a623a9">concurrent_queue</a> (InputIterator begin, InputIterator end, const <a class="el" href="a00038.html#acbdd1a5bd034358fb0774b322a66b1ed">allocator_type</a> &a=<a class="el" href="a00038.html#acbdd1a5bd034358fb0774b322a66b1ed">allocator_type</a>())</td></tr> <tr class="memdesc:a43ac953152e60815c09fe4a4d4a623a9"><td class="mdescLeft"> </td><td class="mdescRight">[begin,end) constructor <br/></td></tr> <tr class="separator:a43ac953152e60815c09fe4a4d4a623a9"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae918807d098d5d5b41cc6d606fa2e7a1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae918807d098d5d5b41cc6d606fa2e7a1"></a>  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ae918807d098d5d5b41cc6d606fa2e7a1">concurrent_queue</a> (const <a class="el" href="a00038.html">concurrent_queue</a> &src, const <a class="el" href="a00038.html#acbdd1a5bd034358fb0774b322a66b1ed">allocator_type</a> &a=<a class="el" href="a00038.html#acbdd1a5bd034358fb0774b322a66b1ed">allocator_type</a>())</td></tr> <tr class="memdesc:ae918807d098d5d5b41cc6d606fa2e7a1"><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br/></td></tr> <tr class="separator:ae918807d098d5d5b41cc6d606fa2e7a1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aa0056b242f280f5e25332ce998f9f670"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa0056b242f280f5e25332ce998f9f670"></a>  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#aa0056b242f280f5e25332ce998f9f670">~concurrent_queue</a> ()</td></tr> <tr class="memdesc:aa0056b242f280f5e25332ce998f9f670"><td class="mdescLeft"> </td><td class="mdescRight">Destroy queue. <br/></td></tr> <tr class="separator:aa0056b242f280f5e25332ce998f9f670"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9330ca6590980d80ef7b1ea3613a699a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9330ca6590980d80ef7b1ea3613a699a"></a> void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a9330ca6590980d80ef7b1ea3613a699a">push</a> (const T &source)</td></tr> <tr class="memdesc:a9330ca6590980d80ef7b1ea3613a699a"><td class="mdescLeft"> </td><td class="mdescRight">Enqueue an item at tail of queue. <br/></td></tr> <tr class="separator:a9330ca6590980d80ef7b1ea3613a699a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aabb1acef18196fa11ed7db8e046c3943"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#aabb1acef18196fa11ed7db8e046c3943">try_pop</a> (T &result)</td></tr> <tr class="memdesc:aabb1acef18196fa11ed7db8e046c3943"><td class="mdescLeft"> </td><td class="mdescRight">Attempt to dequeue an item from head of queue. <a href="#aabb1acef18196fa11ed7db8e046c3943">More...</a><br/></td></tr> <tr class="separator:aabb1acef18196fa11ed7db8e046c3943"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aad4b253ba595637b0b146eb6565556f2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aad4b253ba595637b0b146eb6565556f2"></a> <a class="el" href="a00038.html#a9f883e49afea16293ba92da779981bb8">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#aad4b253ba595637b0b146eb6565556f2">unsafe_size</a> () const </td></tr> <tr class="memdesc:aad4b253ba595637b0b146eb6565556f2"><td class="mdescLeft"> </td><td class="mdescRight">Return the number of items in the queue; thread unsafe. <br/></td></tr> <tr class="separator:aad4b253ba595637b0b146eb6565556f2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aeda3156929d0c250faed7b807ca6ab0e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeda3156929d0c250faed7b807ca6ab0e"></a> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#aeda3156929d0c250faed7b807ca6ab0e">empty</a> () const </td></tr> <tr class="memdesc:aeda3156929d0c250faed7b807ca6ab0e"><td class="mdescLeft"> </td><td class="mdescRight">Equivalent to size()==0. <br/></td></tr> <tr class="separator:aeda3156929d0c250faed7b807ca6ab0e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad3384818fb6350a494d5ec62445e59ee"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad3384818fb6350a494d5ec62445e59ee"></a> void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ad3384818fb6350a494d5ec62445e59ee">clear</a> ()</td></tr> <tr class="memdesc:ad3384818fb6350a494d5ec62445e59ee"><td class="mdescLeft"> </td><td class="mdescRight">Clear the queue. not thread-safe. <br/></td></tr> <tr class="separator:ad3384818fb6350a494d5ec62445e59ee"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7f2b39f350281590b86db906eca6c480"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7f2b39f350281590b86db906eca6c480"></a> <a class="el" href="a00038.html#acbdd1a5bd034358fb0774b322a66b1ed">allocator_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a7f2b39f350281590b86db906eca6c480">get_allocator</a> () const </td></tr> <tr class="memdesc:a7f2b39f350281590b86db906eca6c480"><td class="mdescLeft"> </td><td class="mdescRight">Return allocator object. <br/></td></tr> <tr class="separator:a7f2b39f350281590b86db906eca6c480"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6658faeae3c10135a553fedadddde239"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6658faeae3c10135a553fedadddde239"></a> iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_begin</b> ()</td></tr> <tr class="separator:a6658faeae3c10135a553fedadddde239"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aa7593de5e76006ed3adef4d060f0009c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa7593de5e76006ed3adef4d060f0009c"></a> iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_end</b> ()</td></tr> <tr class="separator:aa7593de5e76006ed3adef4d060f0009c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a0f84b37020f4267f17c7e91acfc0c446"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0f84b37020f4267f17c7e91acfc0c446"></a> const_iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_begin</b> () const </td></tr> <tr class="separator:a0f84b37020f4267f17c7e91acfc0c446"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a118a79d7e20cdbd807fa7fccc2a5b848"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a118a79d7e20cdbd807fa7fccc2a5b848"></a> const_iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_end</b> () const </td></tr> <tr class="separator:a118a79d7e20cdbd807fa7fccc2a5b848"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a> Friends</h2></td></tr> <tr class="memitem:a1f5eec0de2e660ea5372d19393f0920b"><td class="memTemplParams" colspan="2"><a class="anchor" id="a1f5eec0de2e660ea5372d19393f0920b"></a> template<typename Container , typename Value > </td></tr> <tr class="memitem:a1f5eec0de2e660ea5372d19393f0920b"><td class="memTemplItemLeft" align="right" valign="top">class </td><td class="memTemplItemRight" valign="bottom"><b>internal::concurrent_queue_iterator</b></td></tr> <tr class="separator:a1f5eec0de2e660ea5372d19393f0920b"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><h3>template<typename T, typename A = cache_aligned_allocator<T>><br/> class tbb::strict_ppl::concurrent_queue< T, A ></h3>
<p>A high-performance thread-safe non-blocking concurrent queue. </p> <p>Multiple threads may each push and pop concurrently. Assignment construction is not allowed. </p> </div><h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="aabb1acef18196fa11ed7db8e046c3943"></a> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename T , typename A = cache_aligned_allocator<T>> </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">bool <a class="el" href="a00038.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></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inline</span></span> </td> </tr> </table> </div><div class="memdoc">
<p>Attempt to dequeue an item from head of queue. </p> <p>Does not wait for item to become available. Returns true if successful; false otherwise. </p>
</div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>concurrent_queue.h</li> </ul> </div><!-- contents --> <hr> <p></p> Copyright © 2005-2014 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.
|