203 lines
30 KiB
HTML
203 lines
30 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.10.0"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>EnTT: src/entt/core/algorithm.hpp Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<script type="text/javascript" src="clipboard.js"></script>
|
|
<script type="text/javascript" src="cookie.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr id="projectrow">
|
|
<td id="projectalign">
|
|
<div id="projectname">EnTT<span id="projectnumber"> 3.14.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.10.0 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(function() { init_search(); });
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() { codefold.init(0); });
|
|
/* @license-end */
|
|
</script>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_66e9674e8206a335795995fa32a03c91.html">entt</a></li><li class="navelem"><a class="el" href="dir_de8f4e6ba3f54a2a21309f742e93a373.html">core</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle"><div class="title">algorithm.hpp</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef ENTT_CORE_ALGORITHM_HPP</span></div>
|
|
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define ENTT_CORE_ALGORITHM_HPP</span></div>
|
|
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
|
|
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include <algorithm></span></div>
|
|
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include <functional></span></div>
|
|
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include <iterator></span></div>
|
|
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include <utility></span></div>
|
|
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include <vector></span></div>
|
|
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include "utility.hpp"</span></div>
|
|
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
|
|
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceentt.html">entt</a> {</div>
|
|
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
|
|
<div class="foldopen" id="foldopen00021" data-start="{" data-end="};">
|
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="structentt_1_1std__sort.html"> 21</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structentt_1_1std__sort.html">std_sort</a> {</div>
|
|
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">template</span><<span class="keyword">typename</span> It, <span class="keyword">typename</span> Compare = std::less<>, <span class="keyword">typename</span>... Args></div>
|
|
<div class="foldopen" id="foldopen00036" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="structentt_1_1std__sort.html#a8895e4acd1677a60e07d7e28748fe667"> 36</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structentt_1_1std__sort.html#a8895e4acd1677a60e07d7e28748fe667">operator()</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">It</a> first, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">It</a> last, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Compare</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">compare</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Compare</a>{}, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Args</a> &&...args) <span class="keyword">const</span> {</div>
|
|
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> std::sort(std::forward<Args>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">args</a>)..., std::move(first), std::move(last), std::move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">compare</a>));</div>
|
|
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span>};</div>
|
|
</div>
|
|
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
|
|
<div class="foldopen" id="foldopen00042" data-start="{" data-end="};">
|
|
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="structentt_1_1insertion__sort.html"> 42</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structentt_1_1insertion__sort.html">insertion_sort</a> {</div>
|
|
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">template</span><<span class="keyword">typename</span> It, <span class="keyword">typename</span> Compare = std::less<>></div>
|
|
<div class="foldopen" id="foldopen00055" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="structentt_1_1insertion__sort.html#a73a5644fe5b683f9b9376c89ac47f2b8"> 55</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structentt_1_1insertion__sort.html#a73a5644fe5b683f9b9376c89ac47f2b8">operator()</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">It</a> first, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">It</a> last, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Compare</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">compare</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Compare</a>{}) <span class="keyword">const</span> {</div>
|
|
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">if</span>(first < last) {</div>
|
|
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> = first + 1; <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> < last; ++<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>) {</div>
|
|
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keyword">auto</span> value = std::move(*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>);</div>
|
|
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pre</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>;</div>
|
|
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
|
|
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="comment">// NOLINTBEGIN(cppcoreguidelines-pro-bounds-pointer-arithmetic)</span></div>
|
|
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">for</span>(; <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pre</a> > first && <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">compare</a>(value, *(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pre</a> - 1)); --<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pre</a>) {</div>
|
|
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> *<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pre</a> = std::move(*(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pre</a> - 1));</div>
|
|
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> }</div>
|
|
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="comment">// NOLINTEND(cppcoreguidelines-pro-bounds-pointer-arithmetic)</span></div>
|
|
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
|
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> *<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pre</a> = std::move(value);</div>
|
|
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> }</div>
|
|
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> }</div>
|
|
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>};</div>
|
|
</div>
|
|
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
|
|
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span><span class="keyword">template</span><std::<span class="keywordtype">size_t</span> Bit, std::<span class="keywordtype">size_t</span> N></div>
|
|
<div class="foldopen" id="foldopen00079" data-start="{" data-end="};">
|
|
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="structentt_1_1radix__sort.html"> 79</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structentt_1_1radix__sort.html">radix_sort</a> {</div>
|
|
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keyword">static_assert</span>((<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">N</a> % <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Bit</a>) == 0, <span class="stringliteral">"The maximum number of bits to sort must be a multiple of the number of bits processed per pass"</span>);</div>
|
|
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
|
|
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keyword">template</span><<span class="keyword">typename</span> It, <span class="keyword">typename</span> Getter = <span class="keywordtype">id</span>entity></div>
|
|
<div class="foldopen" id="foldopen00098" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"><a class="line" href="structentt_1_1radix__sort.html#a1989f6fbe18d3d82fdea9745d6b9ee96"> 98</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structentt_1_1radix__sort.html#a1989f6fbe18d3d82fdea9745d6b9ee96">operator()</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">It</a> first, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">It</a> last, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Getter</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">getter</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Getter</a>{}) <span class="keyword">const</span> {</div>
|
|
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordflow">if</span>(first < last) {</div>
|
|
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keyword">constexpr</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">passes</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">N</a> / <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Bit</a>;</div>
|
|
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> </div>
|
|
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keyword">using </span>value_type = <span class="keyword">typename</span> std::iterator_traits<It>::value_type;</div>
|
|
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> std::vector<value_type> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">aux</a>(std::distance(first, last));</div>
|
|
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
|
|
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">part</a> = [<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">getter</a> = std::move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">getter</a>)](<span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>, <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a>, <span class="keyword">auto</span> out, <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">start</a>) {</div>
|
|
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keyword">constexpr</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">mask</a> = (1 << <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Bit</a>) - 1;</div>
|
|
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keyword">constexpr</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">buckets</a> = 1 << <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Bit</a>;</div>
|
|
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
|
|
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="comment">// NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)</span></div>
|
|
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> std::size_t count[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">buckets</a>]{};</div>
|
|
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> </div>
|
|
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>; <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> != <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a>; ++<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>) {</div>
|
|
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> ++count[(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">getter</a>(*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>) >> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">start</a>) & <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">mask</a>];</div>
|
|
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> }</div>
|
|
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
|
|
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="comment">// NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)</span></div>
|
|
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> std::size_t index[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">buckets</a>]{};</div>
|
|
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div>
|
|
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordflow">for</span>(std::size_t <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>{}, end = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">buckets</a> - 1u; <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> < end; ++<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>) {</div>
|
|
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> index[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> + 1u] = index[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>] + count[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>];</div>
|
|
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> }</div>
|
|
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> </div>
|
|
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>; <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> != <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a>; ++<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>) {</div>
|
|
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> out[index[(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">getter</a>(*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>) >> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">start</a>) & <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">mask</a>]++] = std::move(*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>);</div>
|
|
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> }</div>
|
|
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> };</div>
|
|
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> </div>
|
|
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordflow">for</span>(std::size_t <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pass</a> = 0; <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pass</a> < (<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">passes</a> & ~1); <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pass</a> += 2) {</div>
|
|
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">part</a>(first, last, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">aux</a>.begin(), <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pass</a> * <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Bit</a>);</div>
|
|
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">part</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">aux</a>.begin(), <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">aux</a>.end(), first, (<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pass</a> + 1) * <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Bit</a>);</div>
|
|
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> }</div>
|
|
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
|
|
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">passes</a> & 1) {</div>
|
|
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">part</a>(first, last, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">aux</a>.begin(), (<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">passes</a> - 1) * <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Bit</a>);</div>
|
|
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> std::move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">aux</a>.begin(), <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">aux</a>.end(), first);</div>
|
|
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> }</div>
|
|
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> }</div>
|
|
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span>};</div>
|
|
</div>
|
|
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> </div>
|
|
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span>} <span class="comment">// namespace entt</span></div>
|
|
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div>
|
|
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span><span class="preprocessor">#endif</span></div>
|
|
<div class="ttc" id="anamespaceentt_html"><div class="ttname"><a href="namespaceentt.html">entt</a></div><div class="ttdoc">EnTT default namespace.</div><div class="ttdef"><b>Definition</b> <a href="dense__map_8hpp_source.html#l00022">dense_map.hpp:22</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_a12e4d0c58f9c4cc6f5513c39c530b9b7"><div class="ttname"><a href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">entt::make_obj_using_allocator</a></div><div class="ttdeci">constexpr Type make_obj_using_allocator(const Allocator &allocator, Args &&...args)</div><div class="ttdoc">Uses-allocator construction utility (waiting for C++20).</div><div class="ttdef"><b>Definition</b> <a href="memory_8hpp_source.html#l00219">memory.hpp:219</a></div></div>
|
|
<div class="ttc" id="astructentt_1_1insertion__sort_html"><div class="ttname"><a href="structentt_1_1insertion__sort.html">entt::insertion_sort</a></div><div class="ttdoc">Function object for performing insertion sort.</div><div class="ttdef"><b>Definition</b> <a href="#l00042">algorithm.hpp:42</a></div></div>
|
|
<div class="ttc" id="astructentt_1_1insertion__sort_html_a73a5644fe5b683f9b9376c89ac47f2b8"><div class="ttname"><a href="structentt_1_1insertion__sort.html#a73a5644fe5b683f9b9376c89ac47f2b8">entt::insertion_sort::operator()</a></div><div class="ttdeci">void operator()(It first, It last, Compare compare=Compare{}) const</div><div class="ttdoc">Sorts the elements in a range.</div><div class="ttdef"><b>Definition</b> <a href="#l00055">algorithm.hpp:55</a></div></div>
|
|
<div class="ttc" id="astructentt_1_1radix__sort_html"><div class="ttname"><a href="structentt_1_1radix__sort.html">entt::radix_sort</a></div><div class="ttdoc">Function object for performing LSD radix sort.</div><div class="ttdef"><b>Definition</b> <a href="#l00079">algorithm.hpp:79</a></div></div>
|
|
<div class="ttc" id="astructentt_1_1radix__sort_html_a1989f6fbe18d3d82fdea9745d6b9ee96"><div class="ttname"><a href="structentt_1_1radix__sort.html#a1989f6fbe18d3d82fdea9745d6b9ee96">entt::radix_sort::operator()</a></div><div class="ttdeci">void operator()(It first, It last, Getter getter=Getter{}) const</div><div class="ttdoc">Sorts the elements in a range.</div><div class="ttdef"><b>Definition</b> <a href="#l00098">algorithm.hpp:98</a></div></div>
|
|
<div class="ttc" id="astructentt_1_1std__sort_html"><div class="ttname"><a href="structentt_1_1std__sort.html">entt::std_sort</a></div><div class="ttdoc">Function object to wrap std::sort in a class type.</div><div class="ttdef"><b>Definition</b> <a href="#l00021">algorithm.hpp:21</a></div></div>
|
|
<div class="ttc" id="astructentt_1_1std__sort_html_a8895e4acd1677a60e07d7e28748fe667"><div class="ttname"><a href="structentt_1_1std__sort.html#a8895e4acd1677a60e07d7e28748fe667">entt::std_sort::operator()</a></div><div class="ttdeci">void operator()(It first, It last, Compare compare=Compare{}, Args &&...args) const</div><div class="ttdoc">Sorts the elements in a range.</div><div class="ttdef"><b>Definition</b> <a href="#l00036">algorithm.hpp:36</a></div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
|
|
</small></address>
|
|
</body>
|
|
</html>
|