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.

646 lines
49 KiB

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
  3. <title>tbb::interface5::concurrent_hash_map&lt; Key, T, HashCompare, Allocator &gt; Class Template Reference</title>
  4. <link href="doxygen.css" rel="stylesheet" type="text/css">
  5. <link href="tabs.css" rel="stylesheet" type="text/css">
  6. </head><body>
  7. <!-- Generated by Doxygen 1.4.7 -->
  8. <div class="tabs">
  9. <ul>
  10. <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
  11. <li><a href="modules.html"><span>Modules</span></a></li>
  12. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  13. <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
  14. <li><a href="files.html"><span>Files</span></a></li>
  15. <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  16. </ul></div>
  17. <div class="tabs">
  18. <ul>
  19. <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
  20. <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
  21. <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  22. </ul></div>
  23. <div class="nav">
  24. <a class="el" href="a00428.html">tbb</a>::<b>interface5</b>::<a class="el" href="a00281.html">concurrent_hash_map</a></div>
  25. <h1>tbb::interface5::concurrent_hash_map&lt; Key, T, HashCompare, Allocator &gt; Class Template Reference<br>
  26. <small>
  27. [<a class="el" href="a00442.html">Containers</a>]</small>
  28. </h1><!-- doxytag: class="tbb::interface5::concurrent_hash_map" -->Unordered map from Key to T.
  29. <a href="#_details">More...</a>
  30. <p>
  31. <code>#include &lt;concurrent_hash_map.h&gt;</code>
  32. <p>
  33. <a href="a00019.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
  34. <tr><td></td></tr>
  35. <tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
  36. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e664e41a5b735a677f2ebbbcca0fcd80"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::key_type" ref="e664e41a5b735a677f2ebbbcca0fcd80" args="" -->
  37. typedef Key&nbsp;</td><td class="memItemRight" valign="bottom"><b>key_type</b></td></tr>
  38. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="616243d5a0b6159299f2a34413e077e4"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::mapped_type" ref="616243d5a0b6159299f2a34413e077e4" args="" -->
  39. typedef T&nbsp;</td><td class="memItemRight" valign="bottom"><b>mapped_type</b></td></tr>
  40. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ece048b19778bc31377185392ecf312b"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::value_type" ref="ece048b19778bc31377185392ecf312b" args="" -->
  41. typedef std::pair&lt; const Key,<br>
  42. T &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
  43. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="549109620a3331c83e46b8fe0636b883"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::size_type" ref="549109620a3331c83e46b8fe0636b883" args="" -->
  44. typedef hash_map_base::size_type&nbsp;</td><td class="memItemRight" valign="bottom"><b>size_type</b></td></tr>
  45. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0a4ffc8ac85bb2eb80a4e1909a373e2c"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::difference_type" ref="0a4ffc8ac85bb2eb80a4e1909a373e2c" args="" -->
  46. typedef ptrdiff_t&nbsp;</td><td class="memItemRight" valign="bottom"><b>difference_type</b></td></tr>
  47. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="341d2ae1e5e9d8ba05e5306a3933f31a"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::pointer" ref="341d2ae1e5e9d8ba05e5306a3933f31a" args="" -->
  48. typedef value_type *&nbsp;</td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
  49. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4b401731d22f457617f950416fde9bff"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::const_pointer" ref="4b401731d22f457617f950416fde9bff" args="" -->
  50. typedef const value_type *&nbsp;</td><td class="memItemRight" valign="bottom"><b>const_pointer</b></td></tr>
  51. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2765bbab7bac8b74cfd79d269a2008b8"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::reference" ref="2765bbab7bac8b74cfd79d269a2008b8" args="" -->
  52. typedef value_type &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>reference</b></td></tr>
  53. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3b62b1930b2b88c98cb617f67bb9545"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::const_reference" ref="a3b62b1930b2b88c98cb617f67bb9545" args="" -->
  54. typedef const value_type &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>const_reference</b></td></tr>
  55. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="83603b64f2507ee6560133d79a001eb2"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::iterator" ref="83603b64f2507ee6560133d79a001eb2" args="" -->
  56. typedef internal::hash_map_iterator&lt;<br>
  57. <a class="el" href="a00281.html">concurrent_hash_map</a>, value_type &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
  58. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d47cbc7e0b0999b849187040f02557f5"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::const_iterator" ref="d47cbc7e0b0999b849187040f02557f5" args="" -->
  59. typedef internal::hash_map_iterator&lt;<br>
  60. <a class="el" href="a00281.html">concurrent_hash_map</a>, const <br>
  61. value_type &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>const_iterator</b></td></tr>
  62. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="baeed4327d9c77f084bfb5ac8d519c96"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::range_type" ref="baeed4327d9c77f084bfb5ac8d519c96" args="" -->
  63. typedef internal::hash_map_range&lt;<br>
  64. iterator &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>range_type</b></td></tr>
  65. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1e7700e8872566a5dc6d1c702b7949f4"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::const_range_type" ref="1e7700e8872566a5dc6d1c702b7949f4" args="" -->
  66. typedef internal::hash_map_range&lt;<br>
  67. const_iterator &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>const_range_type</b></td></tr>
  68. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf2a3ebce78da6d8be3b1803eb31a2e3"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::allocator_type" ref="bf2a3ebce78da6d8be3b1803eb31a2e3" args="" -->
  69. typedef Allocator&nbsp;</td><td class="memItemRight" valign="bottom"><b>allocator_type</b></td></tr>
  70. <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
  71. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1ad413f5b666176e7669bf4c87d1ff3f"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::concurrent_hash_map" ref="1ad413f5b666176e7669bf4c87d1ff3f" args="(const allocator_type &amp;a=allocator_type())" -->
  72. &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#1ad413f5b666176e7669bf4c87d1ff3f">concurrent_hash_map</a> (const allocator_type &amp;a=allocator_type())</td></tr>
  73. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct empty table. <br></td></tr>
  74. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="46b9896317662c3cfa3c876ad7592a7c"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::concurrent_hash_map" ref="46b9896317662c3cfa3c876ad7592a7c" args="(size_type n, const allocator_type &amp;a=allocator_type())" -->
  75. &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#46b9896317662c3cfa3c876ad7592a7c">concurrent_hash_map</a> (size_type n, const allocator_type &amp;a=allocator_type())</td></tr>
  76. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct empty table with n preallocated buckets. This number serves also as initial concurrency level. <br></td></tr>
  77. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6fb14710893308fb47aaeee55ee30dc3"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::concurrent_hash_map" ref="6fb14710893308fb47aaeee55ee30dc3" args="(const concurrent_hash_map &amp;table, const allocator_type &amp;a=allocator_type())" -->
  78. &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#6fb14710893308fb47aaeee55ee30dc3">concurrent_hash_map</a> (const <a class="el" href="a00281.html">concurrent_hash_map</a> &amp;table, const allocator_type &amp;a=allocator_type())</td></tr>
  79. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. <br></td></tr>
  80. <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="83c40f2053f208861b90390e12a36436"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::concurrent_hash_map" ref="83c40f2053f208861b90390e12a36436" args="(I first, I last, const allocator_type &amp;a=allocator_type())" -->
  81. template&lt;typename I&gt; </td></tr>
  82. <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00281.html#83c40f2053f208861b90390e12a36436">concurrent_hash_map</a> (I first, I last, const allocator_type &amp;a=allocator_type())</td></tr>
  83. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construction with copying iteration range and given allocator instance. <br></td></tr>
  84. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="088d1aaccc816884a49e38f7065622c8"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::operator=" ref="088d1aaccc816884a49e38f7065622c8" args="(const concurrent_hash_map &amp;table)" -->
  85. <a class="el" href="a00281.html">concurrent_hash_map</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#088d1aaccc816884a49e38f7065622c8">operator=</a> (const <a class="el" href="a00281.html">concurrent_hash_map</a> &amp;table)</td></tr>
  86. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment. <br></td></tr>
  87. <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#94758113d8993cfe5afdf2d63a728869">rehash</a> (size_type n=0)</td></tr>
  88. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Rehashes and optionally resizes the whole table. <a href="#94758113d8993cfe5afdf2d63a728869"></a><br></td></tr>
  89. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="220686fe17b197eedf19dd856cd02e36"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::clear" ref="220686fe17b197eedf19dd856cd02e36" args="()" -->
  90. void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#220686fe17b197eedf19dd856cd02e36">clear</a> ()</td></tr>
  91. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clear table. <br></td></tr>
  92. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2aa8e2d28d5af1284cf78d20a9c22731"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::~concurrent_hash_map" ref="2aa8e2d28d5af1284cf78d20a9c22731" args="()" -->
  93. &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#2aa8e2d28d5af1284cf78d20a9c22731">~concurrent_hash_map</a> ()</td></tr>
  94. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clear table and destroy it. <br></td></tr>
  95. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ee6b69f390111c92318a85600dd9c559"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::range" ref="ee6b69f390111c92318a85600dd9c559" args="(size_type grainsize=1)" -->
  96. range_type&nbsp;</td><td class="memItemRight" valign="bottom"><b>range</b> (size_type grainsize=1)</td></tr>
  97. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d9a834a345415581bd801647945ea96b"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::range" ref="d9a834a345415581bd801647945ea96b" args="(size_type grainsize=1) const " -->
  98. const_range_type&nbsp;</td><td class="memItemRight" valign="bottom"><b>range</b> (size_type grainsize=1) const </td></tr>
  99. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="35a8c373fc3d52099ae18f0553162491"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::begin" ref="35a8c373fc3d52099ae18f0553162491" args="()" -->
  100. iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>begin</b> ()</td></tr>
  101. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67c50bddda53b9a10318f8981e4fc4fa"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::end" ref="67c50bddda53b9a10318f8981e4fc4fa" args="()" -->
  102. iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>end</b> ()</td></tr>
  103. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c8ad3d9bb833063b3d09164199b8f7de"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::begin" ref="c8ad3d9bb833063b3d09164199b8f7de" args="() const " -->
  104. const_iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>begin</b> () const </td></tr>
  105. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="75e7c0fb6addae180b6cc483b771fded"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::end" ref="75e7c0fb6addae180b6cc483b771fded" args="() const " -->
  106. const_iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>end</b> () const </td></tr>
  107. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8262e9ef1208a39e7ea087487fbe8368"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::equal_range" ref="8262e9ef1208a39e7ea087487fbe8368" args="(const Key &amp;key)" -->
  108. std::pair&lt; iterator, iterator &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>equal_range</b> (const Key &amp;key)</td></tr>
  109. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b94bf1d3724f26299640e8b82787a75c"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::equal_range" ref="b94bf1d3724f26299640e8b82787a75c" args="(const Key &amp;key) const " -->
  110. std::pair&lt; const_iterator,<br>
  111. const_iterator &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>equal_range</b> (const Key &amp;key) const </td></tr>
  112. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6aa56a8b5a25e61a97fa0b54fe2b5659"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::size" ref="6aa56a8b5a25e61a97fa0b54fe2b5659" args="() const " -->
  113. size_type&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#6aa56a8b5a25e61a97fa0b54fe2b5659">size</a> () const </td></tr>
  114. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of items in table. <br></td></tr>
  115. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="61ff2e5bb44e5469366fd5295e5d0ebe"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::empty" ref="61ff2e5bb44e5469366fd5295e5d0ebe" args="() const " -->
  116. bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#61ff2e5bb44e5469366fd5295e5d0ebe">empty</a> () const </td></tr>
  117. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">True if <a class="el" href="a00281.html#6aa56a8b5a25e61a97fa0b54fe2b5659">size()</a>==0. <br></td></tr>
  118. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2bce57fe9b594abe1e6d2568aea8b357"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::max_size" ref="2bce57fe9b594abe1e6d2568aea8b357" args="() const " -->
  119. size_type&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#2bce57fe9b594abe1e6d2568aea8b357">max_size</a> () const </td></tr>
  120. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Upper bound on size. <br></td></tr>
  121. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af34cb91b1d0f36a885a1a3432dd9af1"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::bucket_count" ref="af34cb91b1d0f36a885a1a3432dd9af1" args="() const " -->
  122. size_type&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#af34cb91b1d0f36a885a1a3432dd9af1">bucket_count</a> () const </td></tr>
  123. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the current number of buckets. <br></td></tr>
  124. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6cbcacb4a256a85bf89576c101373ca7"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::get_allocator" ref="6cbcacb4a256a85bf89576c101373ca7" args="() const " -->
  125. allocator_type&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#6cbcacb4a256a85bf89576c101373ca7">get_allocator</a> () const </td></tr>
  126. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return allocator object <br></td></tr>
  127. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="076f8d9e16110aac5f558777aa744eb6"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::swap" ref="076f8d9e16110aac5f558777aa744eb6" args="(concurrent_hash_map &amp;table)" -->
  128. void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#076f8d9e16110aac5f558777aa744eb6">swap</a> (<a class="el" href="a00281.html">concurrent_hash_map</a> &amp;table)</td></tr>
  129. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">swap two instances. Iterators are invalidated <br></td></tr>
  130. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6968eb6feed2df36be421df0464297af"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::count" ref="6968eb6feed2df36be421df0464297af" args="(const Key &amp;key) const " -->
  131. size_type&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#6968eb6feed2df36be421df0464297af">count</a> (const Key &amp;key) const </td></tr>
  132. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return count of items (0 or 1). <br></td></tr>
  133. <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#2afcc33dade7bb24e008d60c0df38230">find</a> (<a class="el" href="a00284.html">const_accessor</a> &amp;result, const Key &amp;key) const </td></tr>
  134. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find item and acquire a read lock on the item. <a href="#2afcc33dade7bb24e008d60c0df38230"></a><br></td></tr>
  135. <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#7bc475d1968f7f0af3d736d7e8a0d7df">find</a> (<a class="el" href="a00282.html">accessor</a> &amp;result, const Key &amp;key)</td></tr>
  136. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find item and acquire a write lock on the item. <a href="#7bc475d1968f7f0af3d736d7e8a0d7df"></a><br></td></tr>
  137. <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#47fe0e60151a9bd7a444db827772a4e6">insert</a> (<a class="el" href="a00284.html">const_accessor</a> &amp;result, const Key &amp;key)</td></tr>
  138. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Insert item (if not already present) and acquire a read lock on the item. <a href="#47fe0e60151a9bd7a444db827772a4e6"></a><br></td></tr>
  139. <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#54e0955ecd11575b4c07166838a72893">insert</a> (<a class="el" href="a00282.html">accessor</a> &amp;result, const Key &amp;key)</td></tr>
  140. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Insert item (if not already present) and acquire a write lock on the item. <a href="#54e0955ecd11575b4c07166838a72893"></a><br></td></tr>
  141. <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#091efd2d12fdad4fe9e54d9629a9dfc3">insert</a> (<a class="el" href="a00284.html">const_accessor</a> &amp;result, const value_type &amp;value)</td></tr>
  142. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Insert item by copying if there is no such key present already and acquire a read lock on the item. <a href="#091efd2d12fdad4fe9e54d9629a9dfc3"></a><br></td></tr>
  143. <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#39183d78d6e8425917555ab542ab92de">insert</a> (<a class="el" href="a00282.html">accessor</a> &amp;result, const value_type &amp;value)</td></tr>
  144. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Insert item by copying if there is no such key present already and acquire a write lock on the item. <a href="#39183d78d6e8425917555ab542ab92de"></a><br></td></tr>
  145. <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#3f121a316af8135de476a30fae6d7c07">insert</a> (const value_type &amp;value)</td></tr>
  146. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Insert item by copying if there is no such key present already. <a href="#3f121a316af8135de476a30fae6d7c07"></a><br></td></tr>
  147. <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="1dd37fad87e561151ba1e242ca94bcc1"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::insert" ref="1dd37fad87e561151ba1e242ca94bcc1" args="(I first, I last)" -->
  148. template&lt;typename I&gt; </td></tr>
  149. <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00281.html#1dd37fad87e561151ba1e242ca94bcc1">insert</a> (I first, I last)</td></tr>
  150. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Insert range [first, last). <br></td></tr>
  151. <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#f27802b3a8d1863c29e743e9c6b4e870">erase</a> (const Key &amp;key)</td></tr>
  152. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Erase item. <a href="#f27802b3a8d1863c29e743e9c6b4e870"></a><br></td></tr>
  153. <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#e698ef3d70b2d1a29a7a5551784d3653">erase</a> (<a class="el" href="a00284.html">const_accessor</a> &amp;item_accessor)</td></tr>
  154. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Erase item by <a class="el" href="a00284.html">const_accessor</a>. <a href="#e698ef3d70b2d1a29a7a5551784d3653"></a><br></td></tr>
  155. <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#5f12d150d421420965db07368666a84f">erase</a> (<a class="el" href="a00282.html">accessor</a> &amp;item_accessor)</td></tr>
  156. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Erase item by accessor. <a href="#5f12d150d421420965db07368666a84f"></a><br></td></tr>
  157. <tr><td colspan="2"><br><h2>Protected Types</h2></td></tr>
  158. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2066e7e0fec7813db8fe9c8b9368c9e5"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::node_allocator_type" ref="2066e7e0fec7813db8fe9c8b9368c9e5" args="" -->
  159. typedef Allocator::template <br>
  160. rebind&lt; node &gt;::other&nbsp;</td><td class="memItemRight" valign="bottom"><b>node_allocator_type</b></td></tr>
  161. <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
  162. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="559190b7953177b4967a3312f557318f"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::delete_node" ref="559190b7953177b4967a3312f557318f" args="(node_base *n)" -->
  163. void&nbsp;</td><td class="memItemRight" valign="bottom"><b>delete_node</b> (node_base *n)</td></tr>
  164. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="32ec82223d843f1c2b95fa37acb7f4bb"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::search_bucket" ref="32ec82223d843f1c2b95fa37acb7f4bb" args="(const key_type &amp;key, bucket *b) const " -->
  165. node *&nbsp;</td><td class="memItemRight" valign="bottom"><b>search_bucket</b> (const key_type &amp;key, bucket *b) const </td></tr>
  166. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4962c7da24793ccc05524cc3bbcf1efa"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::rehash_bucket" ref="4962c7da24793ccc05524cc3bbcf1efa" args="(bucket *b_new, const hashcode_t h)" -->
  167. void&nbsp;</td><td class="memItemRight" valign="bottom"><b>rehash_bucket</b> (bucket *b_new, const hashcode_t h)</td></tr>
  168. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3f3413264a99174a224ef96f6c4ea769"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::lookup" ref="3f3413264a99174a224ef96f6c4ea769" args="(bool op_insert, const Key &amp;key, const T *t, const_accessor *result, bool write)" -->
  169. bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#3f3413264a99174a224ef96f6c4ea769">lookup</a> (bool op_insert, const Key &amp;key, const T *t, <a class="el" href="a00284.html">const_accessor</a> *result, bool write)</td></tr>
  170. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Insert or find item and optionally acquire a lock on the item. <br></td></tr>
  171. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0c964214eb38f54603aa75fdff6d2709"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::exclude" ref="0c964214eb38f54603aa75fdff6d2709" args="(const_accessor &amp;item_accessor)" -->
  172. bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#0c964214eb38f54603aa75fdff6d2709">exclude</a> (<a class="el" href="a00284.html">const_accessor</a> &amp;item_accessor)</td></tr>
  173. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">delete item by accessor <br></td></tr>
  174. <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="8f5373b8e1864619d1ffcf3bf3f1f13d"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::internal_equal_range" ref="8f5373b8e1864619d1ffcf3bf3f1f13d" args="(const Key &amp;key, I end) const " -->
  175. template&lt;typename I&gt; </td></tr>
  176. <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">std::pair&lt; I, I &gt;&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00281.html#8f5373b8e1864619d1ffcf3bf3f1f13d">internal_equal_range</a> (const Key &amp;key, I end) const </td></tr>
  177. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns an iterator for an item defined by the key, or for the next item after it (if upper==true). <br></td></tr>
  178. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="72c9c9e9655fcf096f5f0ed9c8ba6669"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::internal_copy" ref="72c9c9e9655fcf096f5f0ed9c8ba6669" args="(const concurrent_hash_map &amp;source)" -->
  179. void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#72c9c9e9655fcf096f5f0ed9c8ba6669">internal_copy</a> (const <a class="el" href="a00281.html">concurrent_hash_map</a> &amp;source)</td></tr>
  180. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy "source" to *this, where *this must start out empty. <br></td></tr>
  181. <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="1ec1fe8dfa2d7894bf0589bfdbcb1f96"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::internal_copy" ref="1ec1fe8dfa2d7894bf0589bfdbcb1f96" args="(I first, I last)" -->
  182. template&lt;typename I&gt; </td></tr>
  183. <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>internal_copy</b> (I first, I last)</td></tr>
  184. <tr><td class="memItemLeft" nowrap align="right" valign="top">const_pointer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00281.html#2f76ed101a0ccc8875b846c2f747897e">internal_fast_find</a> (const Key &amp;key) const </td></tr>
  185. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fast find when no concurrent erasure is used. For internal use inside TBB only! <a href="#2f76ed101a0ccc8875b846c2f747897e"></a><br></td></tr>
  186. <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
  187. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a72cb6e9873e5541295682179e5a7f74"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::my_allocator" ref="a72cb6e9873e5541295682179e5a7f74" args="" -->
  188. node_allocator_type&nbsp;</td><td class="memItemRight" valign="bottom"><b>my_allocator</b></td></tr>
  189. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="53c747a3f2d2d2c85aec866e19c31c29"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::my_hash_compare" ref="53c747a3f2d2d2c85aec866e19c31c29" args="" -->
  190. HashCompare&nbsp;</td><td class="memItemRight" valign="bottom"><b>my_hash_compare</b></td></tr>
  191. <tr><td colspan="2"><br><h2>Friends</h2></td></tr>
  192. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e24acd2f6849db3377a3942807639758"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::internal::hash_map_iterator" ref="e24acd2f6849db3377a3942807639758" args="" -->
  193. class&nbsp;</td><td class="memItemRight" valign="bottom"><b>internal::hash_map_iterator</b></td></tr>
  194. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c94f21746c8902f7e0b5115a8d4da1d2"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::internal::hash_map_range" ref="c94f21746c8902f7e0b5115a8d4da1d2" args="" -->
  195. class&nbsp;</td><td class="memItemRight" valign="bottom"><b>internal::hash_map_range</b></td></tr>
  196. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c0028dfa75a6baa14007355ab1ef7fc"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::const_accessor" ref="2c0028dfa75a6baa14007355ab1ef7fc" args="" -->
  197. class&nbsp;</td><td class="memItemRight" valign="bottom"><b>const_accessor</b></td></tr>
  198. <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
  199. <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00282.html">accessor</a></td></tr>
  200. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allows write access to elements and combines data access, locking, and garbage collection. <a href="a00282.html#_details">More...</a><br></td></tr>
  201. <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00283.html">bucket_accessor</a></td></tr>
  202. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">bucket accessor is to find, rehash, acquire a lock, and access a bucket <a href="a00283.html#_details">More...</a><br></td></tr>
  203. <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00284.html">const_accessor</a></td></tr>
  204. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Combines data access, locking, and garbage collection. <a href="a00284.html#_details">More...</a><br></td></tr>
  205. <tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><b>node</b></td></tr>
  206. </table>
  207. <hr><a name="_details"></a><h2>Detailed Description</h2>
  208. <h3>template&lt;typename Key, typename T, typename HashCompare, typename Allocator&gt;<br>
  209. class tbb::interface5::concurrent_hash_map&lt; Key, T, HashCompare, Allocator &gt;</h3>
  210. Unordered map from Key to T.
  211. <p>
  212. <a class="el" href="a00281.html">concurrent_hash_map</a> is associative container with concurrent access.<p>
  213. <dl compact><dt><b>Compatibility</b></dt><dd>The class meets all Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1).</dd></dl>
  214. <dl compact><dt><b>Exception Safety</b></dt><dd><ul>
  215. <li>Hash function is not permitted to throw an exception. User-defined types Key and T are forbidden from throwing an exception in destructors.</li><li>If exception happens during <a class="el" href="a00281.html#47fe0e60151a9bd7a444db827772a4e6">insert()</a> operations, it has no effect (unless exception raised by HashCompare::hash() function during grow_segment).</li><li>If exception happens during <a class="el" href="a00281.html#088d1aaccc816884a49e38f7065622c8">operator=()</a> operation, the container can have a part of source items, and methods <a class="el" href="a00281.html#6aa56a8b5a25e61a97fa0b54fe2b5659">size()</a> and <a class="el" href="a00281.html#61ff2e5bb44e5469366fd5295e5d0ebe">empty()</a> can return wrong results.</li></ul>
  216. </dd></dl>
  217. <dl compact><dt><b>Changes since TBB 2.1</b></dt><dd><ul>
  218. <li>Replaced internal algorithm and data structure. Patent is pending.</li><li>Added buckets number argument for constructor</li></ul>
  219. </dd></dl>
  220. <dl compact><dt><b>Changes since TBB 2.0</b></dt><dd><ul>
  221. <li>Fixed exception-safety</li><li>Added template argument for allocator</li><li>Added allocator argument in constructors</li><li>Added constructor from a range of iterators</li><li>Added several new overloaded <a class="el" href="a00281.html#47fe0e60151a9bd7a444db827772a4e6">insert()</a> methods</li><li>Added <a class="el" href="a00281.html#6cbcacb4a256a85bf89576c101373ca7">get_allocator()</a></li><li>Added <a class="el" href="a00281.html#076f8d9e16110aac5f558777aa744eb6">swap()</a></li><li>Added <a class="el" href="a00281.html#6968eb6feed2df36be421df0464297af">count()</a></li><li>Added overloaded <a class="el" href="a00281.html#5f12d150d421420965db07368666a84f">erase(accessor &amp;)</a> and <a class="el" href="a00281.html#e698ef3d70b2d1a29a7a5551784d3653">erase(const_accessor&amp;)</a></li><li>Added equal_range() [const]</li><li>Added [const_]pointer, [const_]reference, and allocator_type types</li><li>Added global functions: operator==(), operator!=(), and <a class="el" href="a00281.html#076f8d9e16110aac5f558777aa744eb6">swap()</a> </li></ul>
  222. </dd></dl>
  223. <p>
  224. <hr><h2>Member Function Documentation</h2>
  225. <a class="anchor" name="5f12d150d421420965db07368666a84f"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::erase" ref="5f12d150d421420965db07368666a84f" args="(accessor &amp;item_accessor)" -->
  226. <div class="memitem">
  227. <div class="memproto">
  228. <div class="memtemplate">
  229. template&lt;typename Key, typename T, typename HashCompare, typename Allocator&gt; </div>
  230. <table class="memname">
  231. <tr>
  232. <td class="memname">bool <a class="el" href="a00281.html">tbb::interface5::concurrent_hash_map</a>&lt; Key, T, HashCompare, Allocator &gt;::erase </td>
  233. <td>(</td>
  234. <td class="paramtype"><a class="el" href="a00282.html">accessor</a> &amp;&nbsp;</td>
  235. <td class="paramname"> <em>item_accessor</em> </td>
  236. <td>&nbsp;)&nbsp;</td>
  237. <td width="100%"><code> [inline]</code></td>
  238. </tr>
  239. </table>
  240. </div>
  241. <div class="memdoc">
  242. <p>
  243. Erase item by accessor.
  244. <p>
  245. Return true if item was erased by particularly this call.
  246. </div>
  247. </div><p>
  248. <a class="anchor" name="e698ef3d70b2d1a29a7a5551784d3653"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::erase" ref="e698ef3d70b2d1a29a7a5551784d3653" args="(const_accessor &amp;item_accessor)" -->
  249. <div class="memitem">
  250. <div class="memproto">
  251. <div class="memtemplate">
  252. template&lt;typename Key, typename T, typename HashCompare, typename Allocator&gt; </div>
  253. <table class="memname">
  254. <tr>
  255. <td class="memname">bool <a class="el" href="a00281.html">tbb::interface5::concurrent_hash_map</a>&lt; Key, T, HashCompare, Allocator &gt;::erase </td>
  256. <td>(</td>
  257. <td class="paramtype"><a class="el" href="a00284.html">const_accessor</a> &amp;&nbsp;</td>
  258. <td class="paramname"> <em>item_accessor</em> </td>
  259. <td>&nbsp;)&nbsp;</td>
  260. <td width="100%"><code> [inline]</code></td>
  261. </tr>
  262. </table>
  263. </div>
  264. <div class="memdoc">
  265. <p>
  266. Erase item by <a class="el" href="a00284.html">const_accessor</a>.
  267. <p>
  268. Return true if item was erased by particularly this call.
  269. </div>
  270. </div><p>
  271. <a class="anchor" name="f27802b3a8d1863c29e743e9c6b4e870"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::erase" ref="f27802b3a8d1863c29e743e9c6b4e870" args="(const Key &amp;key)" -->
  272. <div class="memitem">
  273. <div class="memproto">
  274. <div class="memtemplate">
  275. template&lt;typename Key, typename T, typename HashCompare, typename A&gt; </div>
  276. <table class="memname">
  277. <tr>
  278. <td class="memname">bool <a class="el" href="a00281.html">tbb::interface5::concurrent_hash_map</a>&lt; Key, T, HashCompare, A &gt;::erase </td>
  279. <td>(</td>
  280. <td class="paramtype">const Key &amp;&nbsp;</td>
  281. <td class="paramname"> <em>key</em> </td>
  282. <td>&nbsp;)&nbsp;</td>
  283. <td width="100%"></td>
  284. </tr>
  285. </table>
  286. </div>
  287. <div class="memdoc">
  288. <p>
  289. Erase item.
  290. <p>
  291. Return true if item was erased by particularly this call.
  292. </div>
  293. </div><p>
  294. <a class="anchor" name="7bc475d1968f7f0af3d736d7e8a0d7df"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::find" ref="7bc475d1968f7f0af3d736d7e8a0d7df" args="(accessor &amp;result, const Key &amp;key)" -->
  295. <div class="memitem">
  296. <div class="memproto">
  297. <div class="memtemplate">
  298. template&lt;typename Key, typename T, typename HashCompare, typename Allocator&gt; </div>
  299. <table class="memname">
  300. <tr>
  301. <td class="memname">bool <a class="el" href="a00281.html">tbb::interface5::concurrent_hash_map</a>&lt; Key, T, HashCompare, Allocator &gt;::find </td>
  302. <td>(</td>
  303. <td class="paramtype"><a class="el" href="a00282.html">accessor</a> &amp;&nbsp;</td>
  304. <td class="paramname"> <em>result</em>, </td>
  305. </tr>
  306. <tr>
  307. <td class="paramkey"></td>
  308. <td></td>
  309. <td class="paramtype">const Key &amp;&nbsp;</td>
  310. <td class="paramname"> <em>key</em></td><td>&nbsp;</td>
  311. </tr>
  312. <tr>
  313. <td></td>
  314. <td>)</td>
  315. <td></td><td></td><td width="100%"><code> [inline]</code></td>
  316. </tr>
  317. </table>
  318. </div>
  319. <div class="memdoc">
  320. <p>
  321. Find item and acquire a write lock on the item.
  322. <p>
  323. Return true if item is found, false otherwise.
  324. </div>
  325. </div><p>
  326. <a class="anchor" name="2afcc33dade7bb24e008d60c0df38230"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::find" ref="2afcc33dade7bb24e008d60c0df38230" args="(const_accessor &amp;result, const Key &amp;key) const " -->
  327. <div class="memitem">
  328. <div class="memproto">
  329. <div class="memtemplate">
  330. template&lt;typename Key, typename T, typename HashCompare, typename Allocator&gt; </div>
  331. <table class="memname">
  332. <tr>
  333. <td class="memname">bool <a class="el" href="a00281.html">tbb::interface5::concurrent_hash_map</a>&lt; Key, T, HashCompare, Allocator &gt;::find </td>
  334. <td>(</td>
  335. <td class="paramtype"><a class="el" href="a00284.html">const_accessor</a> &amp;&nbsp;</td>
  336. <td class="paramname"> <em>result</em>, </td>
  337. </tr>
  338. <tr>
  339. <td class="paramkey"></td>
  340. <td></td>
  341. <td class="paramtype">const Key &amp;&nbsp;</td>
  342. <td class="paramname"> <em>key</em></td><td>&nbsp;</td>
  343. </tr>
  344. <tr>
  345. <td></td>
  346. <td>)</td>
  347. <td></td><td></td><td width="100%"> const<code> [inline]</code></td>
  348. </tr>
  349. </table>
  350. </div>
  351. <div class="memdoc">
  352. <p>
  353. Find item and acquire a read lock on the item.
  354. <p>
  355. Return true if item is found, false otherwise.
  356. </div>
  357. </div><p>
  358. <a class="anchor" name="3f121a316af8135de476a30fae6d7c07"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::insert" ref="3f121a316af8135de476a30fae6d7c07" args="(const value_type &amp;value)" -->
  359. <div class="memitem">
  360. <div class="memproto">
  361. <div class="memtemplate">
  362. template&lt;typename Key, typename T, typename HashCompare, typename Allocator&gt; </div>
  363. <table class="memname">
  364. <tr>
  365. <td class="memname">bool <a class="el" href="a00281.html">tbb::interface5::concurrent_hash_map</a>&lt; Key, T, HashCompare, Allocator &gt;::insert </td>
  366. <td>(</td>
  367. <td class="paramtype">const value_type &amp;&nbsp;</td>
  368. <td class="paramname"> <em>value</em> </td>
  369. <td>&nbsp;)&nbsp;</td>
  370. <td width="100%"><code> [inline]</code></td>
  371. </tr>
  372. </table>
  373. </div>
  374. <div class="memdoc">
  375. <p>
  376. Insert item by copying if there is no such key present already.
  377. <p>
  378. Returns true if item is inserted.
  379. </div>
  380. </div><p>
  381. <a class="anchor" name="39183d78d6e8425917555ab542ab92de"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::insert" ref="39183d78d6e8425917555ab542ab92de" args="(accessor &amp;result, const value_type &amp;value)" -->
  382. <div class="memitem">
  383. <div class="memproto">
  384. <div class="memtemplate">
  385. template&lt;typename Key, typename T, typename HashCompare, typename Allocator&gt; </div>
  386. <table class="memname">
  387. <tr>
  388. <td class="memname">bool <a class="el" href="a00281.html">tbb::interface5::concurrent_hash_map</a>&lt; Key, T, HashCompare, Allocator &gt;::insert </td>
  389. <td>(</td>
  390. <td class="paramtype"><a class="el" href="a00282.html">accessor</a> &amp;&nbsp;</td>
  391. <td class="paramname"> <em>result</em>, </td>
  392. </tr>
  393. <tr>
  394. <td class="paramkey"></td>
  395. <td></td>
  396. <td class="paramtype">const value_type &amp;&nbsp;</td>
  397. <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
  398. </tr>
  399. <tr>
  400. <td></td>
  401. <td>)</td>
  402. <td></td><td></td><td width="100%"><code> [inline]</code></td>
  403. </tr>
  404. </table>
  405. </div>
  406. <div class="memdoc">
  407. <p>
  408. Insert item by copying if there is no such key present already and acquire a write lock on the item.
  409. <p>
  410. Returns true if item is new.
  411. </div>
  412. </div><p>
  413. <a class="anchor" name="091efd2d12fdad4fe9e54d9629a9dfc3"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::insert" ref="091efd2d12fdad4fe9e54d9629a9dfc3" args="(const_accessor &amp;result, const value_type &amp;value)" -->
  414. <div class="memitem">
  415. <div class="memproto">
  416. <div class="memtemplate">
  417. template&lt;typename Key, typename T, typename HashCompare, typename Allocator&gt; </div>
  418. <table class="memname">
  419. <tr>
  420. <td class="memname">bool <a class="el" href="a00281.html">tbb::interface5::concurrent_hash_map</a>&lt; Key, T, HashCompare, Allocator &gt;::insert </td>
  421. <td>(</td>
  422. <td class="paramtype"><a class="el" href="a00284.html">const_accessor</a> &amp;&nbsp;</td>
  423. <td class="paramname"> <em>result</em>, </td>
  424. </tr>
  425. <tr>
  426. <td class="paramkey"></td>
  427. <td></td>
  428. <td class="paramtype">const value_type &amp;&nbsp;</td>
  429. <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
  430. </tr>
  431. <tr>
  432. <td></td>
  433. <td>)</td>
  434. <td></td><td></td><td width="100%"><code> [inline]</code></td>
  435. </tr>
  436. </table>
  437. </div>
  438. <div class="memdoc">
  439. <p>
  440. Insert item by copying if there is no such key present already and acquire a read lock on the item.
  441. <p>
  442. Returns true if item is new.
  443. </div>
  444. </div><p>
  445. <a class="anchor" name="54e0955ecd11575b4c07166838a72893"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::insert" ref="54e0955ecd11575b4c07166838a72893" args="(accessor &amp;result, const Key &amp;key)" -->
  446. <div class="memitem">
  447. <div class="memproto">
  448. <div class="memtemplate">
  449. template&lt;typename Key, typename T, typename HashCompare, typename Allocator&gt; </div>
  450. <table class="memname">
  451. <tr>
  452. <td class="memname">bool <a class="el" href="a00281.html">tbb::interface5::concurrent_hash_map</a>&lt; Key, T, HashCompare, Allocator &gt;::insert </td>
  453. <td>(</td>
  454. <td class="paramtype"><a class="el" href="a00282.html">accessor</a> &amp;&nbsp;</td>
  455. <td class="paramname"> <em>result</em>, </td>
  456. </tr>
  457. <tr>
  458. <td class="paramkey"></td>
  459. <td></td>
  460. <td class="paramtype">const Key &amp;&nbsp;</td>
  461. <td class="paramname"> <em>key</em></td><td>&nbsp;</td>
  462. </tr>
  463. <tr>
  464. <td></td>
  465. <td>)</td>
  466. <td></td><td></td><td width="100%"><code> [inline]</code></td>
  467. </tr>
  468. </table>
  469. </div>
  470. <div class="memdoc">
  471. <p>
  472. Insert item (if not already present) and acquire a write lock on the item.
  473. <p>
  474. Returns true if item is new.
  475. </div>
  476. </div><p>
  477. <a class="anchor" name="47fe0e60151a9bd7a444db827772a4e6"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::insert" ref="47fe0e60151a9bd7a444db827772a4e6" args="(const_accessor &amp;result, const Key &amp;key)" -->
  478. <div class="memitem">
  479. <div class="memproto">
  480. <div class="memtemplate">
  481. template&lt;typename Key, typename T, typename HashCompare, typename Allocator&gt; </div>
  482. <table class="memname">
  483. <tr>
  484. <td class="memname">bool <a class="el" href="a00281.html">tbb::interface5::concurrent_hash_map</a>&lt; Key, T, HashCompare, Allocator &gt;::insert </td>
  485. <td>(</td>
  486. <td class="paramtype"><a class="el" href="a00284.html">const_accessor</a> &amp;&nbsp;</td>
  487. <td class="paramname"> <em>result</em>, </td>
  488. </tr>
  489. <tr>
  490. <td class="paramkey"></td>
  491. <td></td>
  492. <td class="paramtype">const Key &amp;&nbsp;</td>
  493. <td class="paramname"> <em>key</em></td><td>&nbsp;</td>
  494. </tr>
  495. <tr>
  496. <td></td>
  497. <td>)</td>
  498. <td></td><td></td><td width="100%"><code> [inline]</code></td>
  499. </tr>
  500. </table>
  501. </div>
  502. <div class="memdoc">
  503. <p>
  504. Insert item (if not already present) and acquire a read lock on the item.
  505. <p>
  506. Returns true if item is new.
  507. </div>
  508. </div><p>
  509. <a class="anchor" name="2f76ed101a0ccc8875b846c2f747897e"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::internal_fast_find" ref="2f76ed101a0ccc8875b846c2f747897e" args="(const Key &amp;key) const " -->
  510. <div class="memitem">
  511. <div class="memproto">
  512. <div class="memtemplate">
  513. template&lt;typename Key, typename T, typename HashCompare, typename Allocator&gt; </div>
  514. <table class="memname">
  515. <tr>
  516. <td class="memname">const_pointer <a class="el" href="a00281.html">tbb::interface5::concurrent_hash_map</a>&lt; Key, T, HashCompare, Allocator &gt;::internal_fast_find </td>
  517. <td>(</td>
  518. <td class="paramtype">const Key &amp;&nbsp;</td>
  519. <td class="paramname"> <em>key</em> </td>
  520. <td>&nbsp;)&nbsp;</td>
  521. <td width="100%"> const<code> [inline, protected]</code></td>
  522. </tr>
  523. </table>
  524. </div>
  525. <div class="memdoc">
  526. <p>
  527. Fast find when no concurrent erasure is used. For internal use inside TBB only!
  528. <p>
  529. Return pointer to item with given key, or NULL if no such item exists. Must not be called concurrently with erasure operations.
  530. </div>
  531. </div><p>
  532. <a class="anchor" name="94758113d8993cfe5afdf2d63a728869"></a><!-- doxytag: member="tbb::interface5::concurrent_hash_map::rehash" ref="94758113d8993cfe5afdf2d63a728869" args="(size_type n=0)" -->
  533. <div class="memitem">
  534. <div class="memproto">
  535. <div class="memtemplate">
  536. template&lt;typename Key, typename T, typename HashCompare, typename A&gt; </div>
  537. <table class="memname">
  538. <tr>
  539. <td class="memname">void <a class="el" href="a00281.html">tbb::interface5::concurrent_hash_map</a>&lt; Key, T, HashCompare, A &gt;::rehash </td>
  540. <td>(</td>
  541. <td class="paramtype">size_type&nbsp;</td>
  542. <td class="paramname"> <em>n</em> = <code>0</code> </td>
  543. <td>&nbsp;)&nbsp;</td>
  544. <td width="100%"></td>
  545. </tr>
  546. </table>
  547. </div>
  548. <div class="memdoc">
  549. <p>
  550. Rehashes and optionally resizes the whole table.
  551. <p>
  552. Useful to optimize performance before or after concurrent operations. Also enables using of <a class="el" href="a00281.html#2afcc33dade7bb24e008d60c0df38230">find()</a> and <a class="el" href="a00281.html#6968eb6feed2df36be421df0464297af">count()</a> concurrent methods in serial context.
  553. </div>
  554. </div><p>
  555. <hr>The documentation for this class was generated from the following file:<ul>
  556. <li>concurrent_hash_map.h</ul>
  557. <hr>
  558. <p></p>
  559. Copyright &copy; 2005-2013 Intel Corporation. All Rights Reserved.
  560. <p></p>
  561. Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
  562. registered trademarks or trademarks of Intel Corporation or its
  563. subsidiaries in the United States and other countries.
  564. <p></p>
  565. * Other names and brands may be claimed as the property of others.