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.

157 lines
14 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::tbb_allocator&lt; T &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"><a class="el" href="a00144.html">tbb_allocator</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="#pub-static-methods">Static Public Member Functions</a> &#124;
  45. <a href="a00289.html">List of all members</a> </div>
  46. <div class="headertitle">
  47. <div class="title">tbb::tbb_allocator&lt; T &gt; Class Template Reference<div class="ingroups"><a class="el" href="a00236.html">Memory Allocation</a></div></div> </div>
  48. </div><!--header-->
  49. <div class="contents">
  50. <p>Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.
  51. <a href="a00144.html#details">More...</a></p>
  52. <p><code>#include &lt;tbb_allocator.h&gt;</code></p>
  53. <table class="memberdecls">
  54. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
  55. Classes</h2></td></tr>
  56. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00098.html">rebind</a></td></tr>
  57. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  58. </table><table class="memberdecls">
  59. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
  60. Public Types</h2></td></tr>
  61. <tr class="memitem:a60463a571d5c20f7762112367261ad94"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00144.html#a60463a571d5c20f7762112367261ad94">malloc_type</a> { <b>scalable</b>,
  62. <b>standard</b>
  63. }</td></tr>
  64. <tr class="memdesc:a60463a571d5c20f7762112367261ad94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies current allocator. <br/></td></tr>
  65. <tr class="separator:a60463a571d5c20f7762112367261ad94"><td class="memSeparator" colspan="2">&#160;</td></tr>
  66. <tr class="memitem:a26be966de4164e37002247c2c2266df9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a26be966de4164e37002247c2c2266df9"></a>
  67. typedef <br class="typebreak"/>
  68. internal::allocator_type&lt; T &gt;<br class="typebreak"/>
  69. ::value_type&#160;</td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
  70. <tr class="separator:a26be966de4164e37002247c2c2266df9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  71. <tr class="memitem:a452a6c09408f425c9a005b5f2aad1761"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a452a6c09408f425c9a005b5f2aad1761"></a>
  72. typedef value_type *&#160;</td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
  73. <tr class="separator:a452a6c09408f425c9a005b5f2aad1761"><td class="memSeparator" colspan="2">&#160;</td></tr>
  74. <tr class="memitem:a63122d559635096a2618aecd1ba6664b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a63122d559635096a2618aecd1ba6664b"></a>
  75. typedef const value_type *&#160;</td><td class="memItemRight" valign="bottom"><b>const_pointer</b></td></tr>
  76. <tr class="separator:a63122d559635096a2618aecd1ba6664b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  77. <tr class="memitem:a5ec6bd5e8cdd5b7abb99f5d72760c7a2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ec6bd5e8cdd5b7abb99f5d72760c7a2"></a>
  78. typedef value_type &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>reference</b></td></tr>
  79. <tr class="separator:a5ec6bd5e8cdd5b7abb99f5d72760c7a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  80. <tr class="memitem:a24d98ce3ab908bc4b10d21dad6622364"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a24d98ce3ab908bc4b10d21dad6622364"></a>
  81. typedef const value_type &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>const_reference</b></td></tr>
  82. <tr class="separator:a24d98ce3ab908bc4b10d21dad6622364"><td class="memSeparator" colspan="2">&#160;</td></tr>
  83. <tr class="memitem:a812817d50e8df15df54998caec9892eb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a812817d50e8df15df54998caec9892eb"></a>
  84. typedef size_t&#160;</td><td class="memItemRight" valign="bottom"><b>size_type</b></td></tr>
  85. <tr class="separator:a812817d50e8df15df54998caec9892eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  86. <tr class="memitem:acba390757f664df03a15e933e3e34941"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acba390757f664df03a15e933e3e34941"></a>
  87. typedef ptrdiff_t&#160;</td><td class="memItemRight" valign="bottom"><b>difference_type</b></td></tr>
  88. <tr class="separator:acba390757f664df03a15e933e3e34941"><td class="memSeparator" colspan="2">&#160;</td></tr>
  89. </table><table class="memberdecls">
  90. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  91. Public Member Functions</h2></td></tr>
  92. <tr class="memitem:a8371538bc959f41f342012e363564aed"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8371538bc959f41f342012e363564aed"></a>
  93. &#160;</td><td class="memItemRight" valign="bottom"><b>tbb_allocator</b> (const <a class="el" href="a00144.html">tbb_allocator</a> &amp;) throw ()</td></tr>
  94. <tr class="separator:a8371538bc959f41f342012e363564aed"><td class="memSeparator" colspan="2">&#160;</td></tr>
  95. <tr class="memitem:a9faff9ae2c2cd3ed2ca064b562224974"><td class="memTemplParams" colspan="2"><a class="anchor" id="a9faff9ae2c2cd3ed2ca064b562224974"></a>
  96. template&lt;typename U &gt; </td></tr>
  97. <tr class="memitem:a9faff9ae2c2cd3ed2ca064b562224974"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><b>tbb_allocator</b> (const <a class="el" href="a00144.html">tbb_allocator</a>&lt; U &gt; &amp;) throw ()</td></tr>
  98. <tr class="separator:a9faff9ae2c2cd3ed2ca064b562224974"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <tr class="memitem:ac1370dbb1f06fed57273bddcae688255"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac1370dbb1f06fed57273bddcae688255"></a>
  100. pointer&#160;</td><td class="memItemRight" valign="bottom"><b>address</b> (reference x) const </td></tr>
  101. <tr class="separator:ac1370dbb1f06fed57273bddcae688255"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. <tr class="memitem:afb9c91d548d4a5affe3ec1de1c1b9327"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afb9c91d548d4a5affe3ec1de1c1b9327"></a>
  103. const_pointer&#160;</td><td class="memItemRight" valign="bottom"><b>address</b> (const_reference x) const </td></tr>
  104. <tr class="separator:afb9c91d548d4a5affe3ec1de1c1b9327"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <tr class="memitem:afedd8a64eed9692083c708f419338e0c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afedd8a64eed9692083c708f419338e0c"></a>
  106. pointer&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00144.html#afedd8a64eed9692083c708f419338e0c">allocate</a> (size_type n, const void *=0)</td></tr>
  107. <tr class="memdesc:afedd8a64eed9692083c708f419338e0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate space for n objects. <br/></td></tr>
  108. <tr class="separator:afedd8a64eed9692083c708f419338e0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. <tr class="memitem:a28e333e0fff56dd53c20b82cfee430ab"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a28e333e0fff56dd53c20b82cfee430ab"></a>
  110. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00144.html#a28e333e0fff56dd53c20b82cfee430ab">deallocate</a> (pointer p, size_type)</td></tr>
  111. <tr class="memdesc:a28e333e0fff56dd53c20b82cfee430ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free previously allocated block of memory. <br/></td></tr>
  112. <tr class="separator:a28e333e0fff56dd53c20b82cfee430ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. <tr class="memitem:a0a2676fb8a2f931961d373b88848c93e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0a2676fb8a2f931961d373b88848c93e"></a>
  114. size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00144.html#a0a2676fb8a2f931961d373b88848c93e">max_size</a> () const throw ()</td></tr>
  115. <tr class="memdesc:a0a2676fb8a2f931961d373b88848c93e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Largest value for which method allocate might succeed. <br/></td></tr>
  116. <tr class="separator:a0a2676fb8a2f931961d373b88848c93e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <tr class="memitem:af54fa3029e33cebe5ba64a8538306fdf"><td class="memTemplParams" colspan="2"><a class="anchor" id="af54fa3029e33cebe5ba64a8538306fdf"></a>
  118. template&lt;typename U , typename... Args&gt; </td></tr>
  119. <tr class="memitem:af54fa3029e33cebe5ba64a8538306fdf"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00144.html#af54fa3029e33cebe5ba64a8538306fdf">construct</a> (U *p, Args &amp;&amp;...args)</td></tr>
  120. <tr class="memdesc:af54fa3029e33cebe5ba64a8538306fdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy-construct value at location pointed to by p. <br/></td></tr>
  121. <tr class="separator:af54fa3029e33cebe5ba64a8538306fdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <tr class="memitem:a694e266db657afba34ecb60111b2e2d3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a694e266db657afba34ecb60111b2e2d3"></a>
  123. void&#160;</td><td class="memItemRight" valign="bottom"><b>construct</b> (pointer p, const value_type &amp;value)</td></tr>
  124. <tr class="separator:a694e266db657afba34ecb60111b2e2d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  125. <tr class="memitem:ac7b1b393a8ff3399079328c0971c1996"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac7b1b393a8ff3399079328c0971c1996"></a>
  126. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00144.html#ac7b1b393a8ff3399079328c0971c1996">destroy</a> (pointer p)</td></tr>
  127. <tr class="memdesc:ac7b1b393a8ff3399079328c0971c1996"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy value at location pointed to by p. <br/></td></tr>
  128. <tr class="separator:ac7b1b393a8ff3399079328c0971c1996"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. </table><table class="memberdecls">
  130. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
  131. Static Public Member Functions</h2></td></tr>
  132. <tr class="memitem:aa4606cff0156ec4237c1571204851bfb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa4606cff0156ec4237c1571204851bfb"></a>
  133. static <a class="el" href="a00144.html#a60463a571d5c20f7762112367261ad94">malloc_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00144.html#aa4606cff0156ec4237c1571204851bfb">allocator_type</a> ()</td></tr>
  134. <tr class="memdesc:aa4606cff0156ec4237c1571204851bfb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns current allocator. <br/></td></tr>
  135. <tr class="separator:aa4606cff0156ec4237c1571204851bfb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  136. </table>
  137. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  138. <div class="textblock"><h3>template&lt;typename T&gt;<br/>
  139. class tbb::tbb_allocator&lt; T &gt;</h3>
  140. <p>Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. </p>
  141. <p>The class selects the best memory allocation mechanism available from scalable_malloc and standard malloc. The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. </p>
  142. </div><hr/>The documentation for this class was generated from the following file:<ul>
  143. <li>tbb_allocator.h</li>
  144. </ul>
  145. </div><!-- contents -->
  146. <hr>
  147. <p></p>
  148. Copyright &copy; 2005-2014 Intel Corporation. All Rights Reserved.
  149. <p></p>
  150. Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
  151. registered trademarks or trademarks of Intel Corporation or its
  152. subsidiaries in the United States and other countries.
  153. <p></p>
  154. * Other names and brands may be claimed as the property of others.