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.

433 lines
30 KiB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.4"/>
  7. <title>tbb::interface5::concurrent_priority_queue&lt; T, Compare, A &gt; Class Template Reference</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  12. </head>
  13. <body>
  14. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  15. <!-- end header part -->
  16. <!-- Generated by Doxygen 1.8.4 -->
  17. <div id="navrow1" class="tabs">
  18. <ul class="tablist">
  19. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  20. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  21. <li><a href="modules.html"><span>Modules</span></a></li>
  22. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  23. <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
  24. <li><a href="files.html"><span>Files</span></a></li>
  25. </ul>
  26. </div>
  27. <div id="navrow2" class="tabs2">
  28. <ul class="tablist">
  29. <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
  30. <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
  31. <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
  32. </ul>
  33. </div>
  34. <div id="nav-path" class="navpath">
  35. <ul>
  36. <li class="navelem"><a class="el" href="a00222.html">tbb</a></li><li class="navelem"><b>interface5</b></li><li class="navelem"><a class="el" href="a00037.html">concurrent_priority_queue</a></li> </ul>
  37. </div>
  38. </div><!-- top -->
  39. <div class="header">
  40. <div class="summary">
  41. <a href="#nested-classes">Classes</a> &#124;
  42. <a href="#pub-types">Public Types</a> &#124;
  43. <a href="#pub-methods">Public Member Functions</a> &#124;
  44. <a href="a00339.html">List of all members</a> </div>
  45. <div class="headertitle">
  46. <div class="title">tbb::interface5::concurrent_priority_queue&lt; T, Compare, A &gt; Class Template Reference</div> </div>
  47. </div><!--header-->
  48. <div class="contents">
  49. <p>Concurrent priority queue.
  50. <a href="a00037.html#details">More...</a></p>
  51. <p><code>#include &lt;concurrent_priority_queue.h&gt;</code></p>
  52. <table class="memberdecls">
  53. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
  54. Public Types</h2></td></tr>
  55. <tr class="memitem:a2c75d97ae429019363ab6fd1a872512e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c75d97ae429019363ab6fd1a872512e"></a>
  56. typedef T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a2c75d97ae429019363ab6fd1a872512e">value_type</a></td></tr>
  57. <tr class="memdesc:a2c75d97ae429019363ab6fd1a872512e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Element type in the queue. <br/></td></tr>
  58. <tr class="separator:a2c75d97ae429019363ab6fd1a872512e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  59. <tr class="memitem:ae4b7ed2ddc8ec6cc910f935c9d299c7a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae4b7ed2ddc8ec6cc910f935c9d299c7a"></a>
  60. typedef T &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#ae4b7ed2ddc8ec6cc910f935c9d299c7a">reference</a></td></tr>
  61. <tr class="memdesc:ae4b7ed2ddc8ec6cc910f935c9d299c7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference type. <br/></td></tr>
  62. <tr class="separator:ae4b7ed2ddc8ec6cc910f935c9d299c7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  63. <tr class="memitem:a0bd617fe8e4657777e86f0ae15d8094f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0bd617fe8e4657777e86f0ae15d8094f"></a>
  64. typedef const T &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a0bd617fe8e4657777e86f0ae15d8094f">const_reference</a></td></tr>
  65. <tr class="memdesc:a0bd617fe8e4657777e86f0ae15d8094f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Const reference type. <br/></td></tr>
  66. <tr class="separator:a0bd617fe8e4657777e86f0ae15d8094f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  67. <tr class="memitem:a7d3da9b47ec58e1c09e3550f702edcfc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7d3da9b47ec58e1c09e3550f702edcfc"></a>
  68. typedef size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a7d3da9b47ec58e1c09e3550f702edcfc">size_type</a></td></tr>
  69. <tr class="memdesc:a7d3da9b47ec58e1c09e3550f702edcfc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Integral type for representing size of the queue. <br/></td></tr>
  70. <tr class="separator:a7d3da9b47ec58e1c09e3550f702edcfc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  71. <tr class="memitem:ae010b1fa9c0942504737228474b51a0b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae010b1fa9c0942504737228474b51a0b"></a>
  72. typedef ptrdiff_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#ae010b1fa9c0942504737228474b51a0b">difference_type</a></td></tr>
  73. <tr class="memdesc:ae010b1fa9c0942504737228474b51a0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Difference type for iterator. <br/></td></tr>
  74. <tr class="separator:ae010b1fa9c0942504737228474b51a0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  75. <tr class="memitem:a1d2cebf242fa83d88eebdc3ad6891fb1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1d2cebf242fa83d88eebdc3ad6891fb1"></a>
  76. typedef A&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a1d2cebf242fa83d88eebdc3ad6891fb1">allocator_type</a></td></tr>
  77. <tr class="memdesc:a1d2cebf242fa83d88eebdc3ad6891fb1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocator type. <br/></td></tr>
  78. <tr class="separator:a1d2cebf242fa83d88eebdc3ad6891fb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  79. </table><table class="memberdecls">
  80. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  81. Public Member Functions</h2></td></tr>
  82. <tr class="memitem:a405be01bac4048f214797c287e2571a1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a405be01bac4048f214797c287e2571a1"></a>
  83. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a405be01bac4048f214797c287e2571a1">concurrent_priority_queue</a> (const <a class="el" href="a00037.html#a1d2cebf242fa83d88eebdc3ad6891fb1">allocator_type</a> &amp;a=<a class="el" href="a00037.html#a1d2cebf242fa83d88eebdc3ad6891fb1">allocator_type</a>())</td></tr>
  84. <tr class="memdesc:a405be01bac4048f214797c287e2571a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new <a class="el" href="a00037.html" title="Concurrent priority queue. ">concurrent_priority_queue</a> with default capacity. <br/></td></tr>
  85. <tr class="separator:a405be01bac4048f214797c287e2571a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  86. <tr class="memitem:a43c3917ea8a19cf1fec947e29ad4ff3e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a43c3917ea8a19cf1fec947e29ad4ff3e"></a>
  87. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a43c3917ea8a19cf1fec947e29ad4ff3e">concurrent_priority_queue</a> (<a class="el" href="a00037.html#a7d3da9b47ec58e1c09e3550f702edcfc">size_type</a> init_capacity, const <a class="el" href="a00037.html#a1d2cebf242fa83d88eebdc3ad6891fb1">allocator_type</a> &amp;a=<a class="el" href="a00037.html#a1d2cebf242fa83d88eebdc3ad6891fb1">allocator_type</a>())</td></tr>
  88. <tr class="memdesc:a43c3917ea8a19cf1fec947e29ad4ff3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new <a class="el" href="a00037.html" title="Concurrent priority queue. ">concurrent_priority_queue</a> with init_sz capacity. <br/></td></tr>
  89. <tr class="separator:a43c3917ea8a19cf1fec947e29ad4ff3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:a0cebee26cc0d00d4dcbb1c74e08029f7"><td class="memTemplParams" colspan="2"><a class="anchor" id="a0cebee26cc0d00d4dcbb1c74e08029f7"></a>
  91. template&lt;typename InputIterator &gt; </td></tr>
  92. <tr class="memitem:a0cebee26cc0d00d4dcbb1c74e08029f7"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00037.html#a0cebee26cc0d00d4dcbb1c74e08029f7">concurrent_priority_queue</a> (InputIterator begin, InputIterator end, const <a class="el" href="a00037.html#a1d2cebf242fa83d88eebdc3ad6891fb1">allocator_type</a> &amp;a=<a class="el" href="a00037.html#a1d2cebf242fa83d88eebdc3ad6891fb1">allocator_type</a>())</td></tr>
  93. <tr class="memdesc:a0cebee26cc0d00d4dcbb1c74e08029f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">[begin,end) constructor <br/></td></tr>
  94. <tr class="separator:a0cebee26cc0d00d4dcbb1c74e08029f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  95. <tr class="memitem:a111763d621fa792f281c2a13bd3e5edf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a111763d621fa792f281c2a13bd3e5edf"></a>
  96. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a111763d621fa792f281c2a13bd3e5edf">concurrent_priority_queue</a> (std::initializer_list&lt; T &gt; const &amp;init_list, const <a class="el" href="a00037.html#a1d2cebf242fa83d88eebdc3ad6891fb1">allocator_type</a> &amp;a=<a class="el" href="a00037.html#a1d2cebf242fa83d88eebdc3ad6891fb1">allocator_type</a>())</td></tr>
  97. <tr class="memdesc:a111763d621fa792f281c2a13bd3e5edf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor from std::initializer_list. <br/></td></tr>
  98. <tr class="separator:a111763d621fa792f281c2a13bd3e5edf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <tr class="memitem:a332d26234f9c37a6b7ba269c648815d0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a332d26234f9c37a6b7ba269c648815d0">concurrent_priority_queue</a> (const <a class="el" href="a00037.html">concurrent_priority_queue</a> &amp;src)</td></tr>
  100. <tr class="memdesc:a332d26234f9c37a6b7ba269c648815d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor. <a href="#a332d26234f9c37a6b7ba269c648815d0">More...</a><br/></td></tr>
  101. <tr class="separator:a332d26234f9c37a6b7ba269c648815d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. <tr class="memitem:aa52cea369b6630699ee78cc42622be9d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#aa52cea369b6630699ee78cc42622be9d">concurrent_priority_queue</a> (const <a class="el" href="a00037.html">concurrent_priority_queue</a> &amp;src, const <a class="el" href="a00037.html#a1d2cebf242fa83d88eebdc3ad6891fb1">allocator_type</a> &amp;a)</td></tr>
  103. <tr class="memdesc:aa52cea369b6630699ee78cc42622be9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor with specific allocator. <a href="#aa52cea369b6630699ee78cc42622be9d">More...</a><br/></td></tr>
  104. <tr class="separator:aa52cea369b6630699ee78cc42622be9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <tr class="memitem:ac0c3f41b10f04547f3438517c40cf8a5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00037.html">concurrent_priority_queue</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#ac0c3f41b10f04547f3438517c40cf8a5">operator=</a> (const <a class="el" href="a00037.html">concurrent_priority_queue</a> &amp;src)</td></tr>
  106. <tr class="memdesc:ac0c3f41b10f04547f3438517c40cf8a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator. <a href="#ac0c3f41b10f04547f3438517c40cf8a5">More...</a><br/></td></tr>
  107. <tr class="separator:ac0c3f41b10f04547f3438517c40cf8a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  108. <tr class="memitem:ac64c7b627708f0d6b2e5421fb0d49150"><td class="memTemplParams" colspan="2"><a class="anchor" id="ac64c7b627708f0d6b2e5421fb0d49150"></a>
  109. template&lt;typename InputIterator &gt; </td></tr>
  110. <tr class="memitem:ac64c7b627708f0d6b2e5421fb0d49150"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00037.html#ac64c7b627708f0d6b2e5421fb0d49150">assign</a> (InputIterator begin, InputIterator end)</td></tr>
  111. <tr class="memdesc:ac64c7b627708f0d6b2e5421fb0d49150"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assign the queue from [begin,end) range, not thread-safe. <br/></td></tr>
  112. <tr class="separator:ac64c7b627708f0d6b2e5421fb0d49150"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. <tr class="memitem:ada4a58867572d9ff340c6692a226d457"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ada4a58867572d9ff340c6692a226d457"></a>
  114. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#ada4a58867572d9ff340c6692a226d457">assign</a> (std::initializer_list&lt; T &gt; const &amp;il)</td></tr>
  115. <tr class="memdesc:ada4a58867572d9ff340c6692a226d457"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assign the queue from std::initializer_list, not thread-safe. <br/></td></tr>
  116. <tr class="separator:ada4a58867572d9ff340c6692a226d457"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <tr class="memitem:a32eb9c65caf399b62fac7c13e65af05f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a32eb9c65caf399b62fac7c13e65af05f"></a>
  118. <a class="el" href="a00037.html">concurrent_priority_queue</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a32eb9c65caf399b62fac7c13e65af05f">operator=</a> (std::initializer_list&lt; T &gt; const &amp;il)</td></tr>
  119. <tr class="memdesc:a32eb9c65caf399b62fac7c13e65af05f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assign from std::initializer_list, not thread-safe. <br/></td></tr>
  120. <tr class="separator:a32eb9c65caf399b62fac7c13e65af05f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  121. <tr class="memitem:a8dec2dd0e8b22af14f1753eaef1bf5eb"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a8dec2dd0e8b22af14f1753eaef1bf5eb">empty</a> () const </td></tr>
  122. <tr class="memdesc:a8dec2dd0e8b22af14f1753eaef1bf5eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if empty, false otherwise. <a href="#a8dec2dd0e8b22af14f1753eaef1bf5eb">More...</a><br/></td></tr>
  123. <tr class="separator:a8dec2dd0e8b22af14f1753eaef1bf5eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  124. <tr class="memitem:a7d86ba200474b51ec99a6b917429c6bb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00037.html#a7d3da9b47ec58e1c09e3550f702edcfc">size_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a7d86ba200474b51ec99a6b917429c6bb">size</a> () const </td></tr>
  125. <tr class="memdesc:a7d86ba200474b51ec99a6b917429c6bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current number of elements contained in the queue. <a href="#a7d86ba200474b51ec99a6b917429c6bb">More...</a><br/></td></tr>
  126. <tr class="separator:a7d86ba200474b51ec99a6b917429c6bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  127. <tr class="memitem:a1bfa0e7269b3407d6bb5c706264d2406"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a1bfa0e7269b3407d6bb5c706264d2406">push</a> (<a class="el" href="a00037.html#a0bd617fe8e4657777e86f0ae15d8094f">const_reference</a> elem)</td></tr>
  128. <tr class="memdesc:a1bfa0e7269b3407d6bb5c706264d2406"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pushes elem onto the queue, increasing capacity of queue if necessary. <a href="#a1bfa0e7269b3407d6bb5c706264d2406">More...</a><br/></td></tr>
  129. <tr class="separator:a1bfa0e7269b3407d6bb5c706264d2406"><td class="memSeparator" colspan="2">&#160;</td></tr>
  130. <tr class="memitem:a954177b09e184cf3db47f1b180a7ef5e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a954177b09e184cf3db47f1b180a7ef5e">try_pop</a> (<a class="el" href="a00037.html#ae4b7ed2ddc8ec6cc910f935c9d299c7a">reference</a> elem)</td></tr>
  131. <tr class="memdesc:a954177b09e184cf3db47f1b180a7ef5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets a reference to and removes highest priority element. <a href="#a954177b09e184cf3db47f1b180a7ef5e">More...</a><br/></td></tr>
  132. <tr class="separator:a954177b09e184cf3db47f1b180a7ef5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  133. <tr class="memitem:a2459166998a4103880d603b237c429e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a2459166998a4103880d603b237c429e6">clear</a> ()</td></tr>
  134. <tr class="memdesc:a2459166998a4103880d603b237c429e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the queue; not thread-safe. <a href="#a2459166998a4103880d603b237c429e6">More...</a><br/></td></tr>
  135. <tr class="separator:a2459166998a4103880d603b237c429e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  136. <tr class="memitem:aa6ee6d356e538b67a7cb4e242e6e36c9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#aa6ee6d356e538b67a7cb4e242e6e36c9">swap</a> (<a class="el" href="a00037.html">concurrent_priority_queue</a> &amp;q)</td></tr>
  137. <tr class="memdesc:aa6ee6d356e538b67a7cb4e242e6e36c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swap this queue with another; not thread-safe. <a href="#aa6ee6d356e538b67a7cb4e242e6e36c9">More...</a><br/></td></tr>
  138. <tr class="separator:aa6ee6d356e538b67a7cb4e242e6e36c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  139. <tr class="memitem:a312e88e51246da4c516d35abbb30721a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a312e88e51246da4c516d35abbb30721a"></a>
  140. <a class="el" href="a00037.html#a1d2cebf242fa83d88eebdc3ad6891fb1">allocator_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#a312e88e51246da4c516d35abbb30721a">get_allocator</a> () const </td></tr>
  141. <tr class="memdesc:a312e88e51246da4c516d35abbb30721a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return allocator object. <br/></td></tr>
  142. <tr class="separator:a312e88e51246da4c516d35abbb30721a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  143. </table>
  144. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  145. <div class="textblock"><h3>template&lt;typename T, typename Compare = std::less&lt;T&gt;, typename A = cache_aligned_allocator&lt;T&gt;&gt;<br/>
  146. class tbb::interface5::concurrent_priority_queue&lt; T, Compare, A &gt;</h3>
  147. <p>Concurrent priority queue. </p>
  148. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  149. <a class="anchor" id="a332d26234f9c37a6b7ba269c648815d0"></a>
  150. <div class="memitem">
  151. <div class="memproto">
  152. <div class="memtemplate">
  153. template&lt;typename T , typename Compare = std::less&lt;T&gt;, typename A = cache_aligned_allocator&lt;T&gt;&gt; </div>
  154. <table class="mlabels">
  155. <tr>
  156. <td class="mlabels-left">
  157. <table class="memname">
  158. <tr>
  159. <td class="memname"><a class="el" href="a00037.html">tbb::interface5::concurrent_priority_queue</a>&lt; T, Compare, A &gt;::<a class="el" href="a00037.html">concurrent_priority_queue</a> </td>
  160. <td>(</td>
  161. <td class="paramtype">const <a class="el" href="a00037.html">concurrent_priority_queue</a>&lt; T, Compare, A &gt; &amp;&#160;</td>
  162. <td class="paramname"><em>src</em>)</td><td></td>
  163. <td></td>
  164. </tr>
  165. </table>
  166. </td>
  167. <td class="mlabels-right">
  168. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
  169. </tr>
  170. </table>
  171. </div><div class="memdoc">
  172. <p>Copy constructor. </p>
  173. <p>This operation is unsafe if there are pending concurrent operations on the src queue. </p>
  174. </div>
  175. </div>
  176. <a class="anchor" id="aa52cea369b6630699ee78cc42622be9d"></a>
  177. <div class="memitem">
  178. <div class="memproto">
  179. <div class="memtemplate">
  180. template&lt;typename T , typename Compare = std::less&lt;T&gt;, typename A = cache_aligned_allocator&lt;T&gt;&gt; </div>
  181. <table class="mlabels">
  182. <tr>
  183. <td class="mlabels-left">
  184. <table class="memname">
  185. <tr>
  186. <td class="memname"><a class="el" href="a00037.html">tbb::interface5::concurrent_priority_queue</a>&lt; T, Compare, A &gt;::<a class="el" href="a00037.html">concurrent_priority_queue</a> </td>
  187. <td>(</td>
  188. <td class="paramtype">const <a class="el" href="a00037.html">concurrent_priority_queue</a>&lt; T, Compare, A &gt; &amp;&#160;</td>
  189. <td class="paramname"><em>src</em>, </td>
  190. </tr>
  191. <tr>
  192. <td class="paramkey"></td>
  193. <td></td>
  194. <td class="paramtype">const <a class="el" href="a00037.html#a1d2cebf242fa83d88eebdc3ad6891fb1">allocator_type</a> &amp;&#160;</td>
  195. <td class="paramname"><em>a</em>&#160;</td>
  196. </tr>
  197. <tr>
  198. <td></td>
  199. <td>)</td>
  200. <td></td><td></td>
  201. </tr>
  202. </table>
  203. </td>
  204. <td class="mlabels-right">
  205. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  206. </tr>
  207. </table>
  208. </div><div class="memdoc">
  209. <p>Copy constructor with specific allocator. </p>
  210. <p>This operation is unsafe if there are pending concurrent operations on the src queue. </p>
  211. </div>
  212. </div>
  213. <h2 class="groupheader">Member Function Documentation</h2>
  214. <a class="anchor" id="a2459166998a4103880d603b237c429e6"></a>
  215. <div class="memitem">
  216. <div class="memproto">
  217. <div class="memtemplate">
  218. template&lt;typename T , typename Compare = std::less&lt;T&gt;, typename A = cache_aligned_allocator&lt;T&gt;&gt; </div>
  219. <table class="mlabels">
  220. <tr>
  221. <td class="mlabels-left">
  222. <table class="memname">
  223. <tr>
  224. <td class="memname">void <a class="el" href="a00037.html">tbb::interface5::concurrent_priority_queue</a>&lt; T, Compare, A &gt;::clear </td>
  225. <td>(</td>
  226. <td class="paramname">)</td><td></td>
  227. <td></td>
  228. </tr>
  229. </table>
  230. </td>
  231. <td class="mlabels-right">
  232. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  233. </tr>
  234. </table>
  235. </div><div class="memdoc">
  236. <p>Clear the queue; not thread-safe. </p>
  237. <p>This operation is unsafe if there are pending concurrent operations on the queue. Resets size, effectively emptying queue; does not free space. May not clear elements added in pending operations. </p>
  238. </div>
  239. </div>
  240. <a class="anchor" id="a8dec2dd0e8b22af14f1753eaef1bf5eb"></a>
  241. <div class="memitem">
  242. <div class="memproto">
  243. <div class="memtemplate">
  244. template&lt;typename T , typename Compare = std::less&lt;T&gt;, typename A = cache_aligned_allocator&lt;T&gt;&gt; </div>
  245. <table class="mlabels">
  246. <tr>
  247. <td class="mlabels-left">
  248. <table class="memname">
  249. <tr>
  250. <td class="memname">bool <a class="el" href="a00037.html">tbb::interface5::concurrent_priority_queue</a>&lt; T, Compare, A &gt;::empty </td>
  251. <td>(</td>
  252. <td class="paramname">)</td><td></td>
  253. <td> const</td>
  254. </tr>
  255. </table>
  256. </td>
  257. <td class="mlabels-right">
  258. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  259. </tr>
  260. </table>
  261. </div><div class="memdoc">
  262. <p>Returns true if empty, false otherwise. </p>
  263. <p>Returned value may not reflect results of pending operations. This operation reads shared data and will trigger a race condition. </p>
  264. </div>
  265. </div>
  266. <a class="anchor" id="ac0c3f41b10f04547f3438517c40cf8a5"></a>
  267. <div class="memitem">
  268. <div class="memproto">
  269. <div class="memtemplate">
  270. template&lt;typename T , typename Compare = std::less&lt;T&gt;, typename A = cache_aligned_allocator&lt;T&gt;&gt; </div>
  271. <table class="mlabels">
  272. <tr>
  273. <td class="mlabels-left">
  274. <table class="memname">
  275. <tr>
  276. <td class="memname"><a class="el" href="a00037.html">concurrent_priority_queue</a>&amp; <a class="el" href="a00037.html">tbb::interface5::concurrent_priority_queue</a>&lt; T, Compare, A &gt;::operator= </td>
  277. <td>(</td>
  278. <td class="paramtype">const <a class="el" href="a00037.html">concurrent_priority_queue</a>&lt; T, Compare, A &gt; &amp;&#160;</td>
  279. <td class="paramname"><em>src</em>)</td><td></td>
  280. <td></td>
  281. </tr>
  282. </table>
  283. </td>
  284. <td class="mlabels-right">
  285. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  286. </tr>
  287. </table>
  288. </div><div class="memdoc">
  289. <p>Assignment operator. </p>
  290. <p>This operation is unsafe if there are pending concurrent operations on the src queue. </p>
  291. </div>
  292. </div>
  293. <a class="anchor" id="a1bfa0e7269b3407d6bb5c706264d2406"></a>
  294. <div class="memitem">
  295. <div class="memproto">
  296. <div class="memtemplate">
  297. template&lt;typename T , typename Compare = std::less&lt;T&gt;, typename A = cache_aligned_allocator&lt;T&gt;&gt; </div>
  298. <table class="mlabels">
  299. <tr>
  300. <td class="mlabels-left">
  301. <table class="memname">
  302. <tr>
  303. <td class="memname">void <a class="el" href="a00037.html">tbb::interface5::concurrent_priority_queue</a>&lt; T, Compare, A &gt;::push </td>
  304. <td>(</td>
  305. <td class="paramtype"><a class="el" href="a00037.html#a0bd617fe8e4657777e86f0ae15d8094f">const_reference</a>&#160;</td>
  306. <td class="paramname"><em>elem</em>)</td><td></td>
  307. <td></td>
  308. </tr>
  309. </table>
  310. </td>
  311. <td class="mlabels-right">
  312. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  313. </tr>
  314. </table>
  315. </div><div class="memdoc">
  316. <p>Pushes elem onto the queue, increasing capacity of queue if necessary. </p>
  317. <p>This operation can be safely used concurrently with other push, try_pop or reserve operations. </p>
  318. </div>
  319. </div>
  320. <a class="anchor" id="a7d86ba200474b51ec99a6b917429c6bb"></a>
  321. <div class="memitem">
  322. <div class="memproto">
  323. <div class="memtemplate">
  324. template&lt;typename T , typename Compare = std::less&lt;T&gt;, typename A = cache_aligned_allocator&lt;T&gt;&gt; </div>
  325. <table class="mlabels">
  326. <tr>
  327. <td class="mlabels-left">
  328. <table class="memname">
  329. <tr>
  330. <td class="memname"><a class="el" href="a00037.html#a7d3da9b47ec58e1c09e3550f702edcfc">size_type</a> <a class="el" href="a00037.html">tbb::interface5::concurrent_priority_queue</a>&lt; T, Compare, A &gt;::size </td>
  331. <td>(</td>
  332. <td class="paramname">)</td><td></td>
  333. <td> const</td>
  334. </tr>
  335. </table>
  336. </td>
  337. <td class="mlabels-right">
  338. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  339. </tr>
  340. </table>
  341. </div><div class="memdoc">
  342. <p>Returns the current number of elements contained in the queue. </p>
  343. <p>Returned value may not reflect results of pending operations. This operation reads shared data and will trigger a race condition. </p>
  344. </div>
  345. </div>
  346. <a class="anchor" id="aa6ee6d356e538b67a7cb4e242e6e36c9"></a>
  347. <div class="memitem">
  348. <div class="memproto">
  349. <div class="memtemplate">
  350. template&lt;typename T , typename Compare = std::less&lt;T&gt;, typename A = cache_aligned_allocator&lt;T&gt;&gt; </div>
  351. <table class="mlabels">
  352. <tr>
  353. <td class="mlabels-left">
  354. <table class="memname">
  355. <tr>
  356. <td class="memname">void <a class="el" href="a00037.html">tbb::interface5::concurrent_priority_queue</a>&lt; T, Compare, A &gt;::swap </td>
  357. <td>(</td>
  358. <td class="paramtype"><a class="el" href="a00037.html">concurrent_priority_queue</a>&lt; T, Compare, A &gt; &amp;&#160;</td>
  359. <td class="paramname"><em>q</em>)</td><td></td>
  360. <td></td>
  361. </tr>
  362. </table>
  363. </td>
  364. <td class="mlabels-right">
  365. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  366. </tr>
  367. </table>
  368. </div><div class="memdoc">
  369. <p>Swap this queue with another; not thread-safe. </p>
  370. <p>This operation is unsafe if there are pending concurrent operations on the queue. </p>
  371. </div>
  372. </div>
  373. <a class="anchor" id="a954177b09e184cf3db47f1b180a7ef5e"></a>
  374. <div class="memitem">
  375. <div class="memproto">
  376. <div class="memtemplate">
  377. template&lt;typename T , typename Compare = std::less&lt;T&gt;, typename A = cache_aligned_allocator&lt;T&gt;&gt; </div>
  378. <table class="mlabels">
  379. <tr>
  380. <td class="mlabels-left">
  381. <table class="memname">
  382. <tr>
  383. <td class="memname">bool <a class="el" href="a00037.html">tbb::interface5::concurrent_priority_queue</a>&lt; T, Compare, A &gt;::try_pop </td>
  384. <td>(</td>
  385. <td class="paramtype"><a class="el" href="a00037.html#ae4b7ed2ddc8ec6cc910f935c9d299c7a">reference</a>&#160;</td>
  386. <td class="paramname"><em>elem</em>)</td><td></td>
  387. <td></td>
  388. </tr>
  389. </table>
  390. </td>
  391. <td class="mlabels-right">
  392. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  393. </tr>
  394. </table>
  395. </div><div class="memdoc">
  396. <p>Gets a reference to and removes highest priority element. </p>
  397. <p>If a highest priority element was found, sets elem and returns true, otherwise returns false. This operation can be safely used concurrently with other push, try_pop or reserve operations. </p>
  398. </div>
  399. </div>
  400. <hr/>The documentation for this class was generated from the following file:<ul>
  401. <li>concurrent_priority_queue.h</li>
  402. </ul>
  403. </div><!-- contents -->
  404. <hr>
  405. <p></p>
  406. Copyright &copy; 2005-2014 Intel Corporation. All Rights Reserved.
  407. <p></p>
  408. Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
  409. registered trademarks or trademarks of Intel Corporation or its
  410. subsidiaries in the United States and other countries.
  411. <p></p>
  412. * Other names and brands may be claimed as the property of others.