-
Notifications
You must be signed in to change notification settings - Fork 0
/
aligned__allocator_8hpp_source.html
221 lines (219 loc) · 33 KB
/
aligned__allocator_8hpp_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<!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.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BioC++: bio/ranges/container/aligned_allocator.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>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.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>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="biocpp.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="projectlogo"><img alt="Logo" src="biocpp_logo.svg"/></td>
<td id="projectalign">
<div id="projectname">BioC++<span id="projectnumber"> core-0.7.0</span>
</div>
<div id="projectbrief">The Modern C++ libraries for Bioinformatics.</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"> </span>
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function(){initNavTree('aligned__allocator_8hpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- 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 class="header">
<div class="headertitle"><div class="title">aligned_allocator.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="aligned__allocator_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// -----------------------------------------------------------------------------------------------------</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// Copyright (c) 2022 deCODE Genetics</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">// Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">// shipped with this file and also available at: https://github.com/biocpp/biocpp-core/blob/main/LICENSE.md</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// -----------------------------------------------------------------------------------------------------</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include <<a class="codeRef" target="_blank" href="https://en.cppreference.com/w/cpp/header/limits.html">limits</a>></span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include <<a class="codeRef" target="_blank" href="https://en.cppreference.com/w/cpp/header/memory.html">memory</a>></span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include <<a class="codeRef" target="_blank" href="https://en.cppreference.com/w/cpp/header/type_traits.html">type_traits</a>></span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include <<a class="code" href="core_8hpp.html">bio/core.hpp</a>></span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacebio_1_1ranges.html">bio::ranges</a></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span>{</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="keyword">template</span> <<span class="keyword">typename</span> value_t, <span class="keywordtype">size_t</span> alignment_v = __STDCPP_DEFAULT_NEW_ALIGNMENT__></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html"> 70</a></span><span class="keyword">class </span><a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator</a></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>{</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#ae2bf35424730d02213e04b71b200d181"> 74</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="classbio_1_1ranges_1_1aligned__allocator.html#ae2bf35424730d02213e04b71b200d181">alignment</a> = alignment_v;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#a7e57eb6d82612b1a4c2a1b8b1dccc271"> 77</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classbio_1_1ranges_1_1aligned__allocator.html#a7e57eb6d82612b1a4c2a1b8b1dccc271">value_type</a> = value_t;</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#a47b46db889a57307d1099d98f74b1bee"> 79</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classbio_1_1ranges_1_1aligned__allocator.html#a47b46db889a57307d1099d98f74b1bee">pointer</a> = <a class="code hl_typedef" href="classbio_1_1ranges_1_1aligned__allocator.html#a7e57eb6d82612b1a4c2a1b8b1dccc271">value_type</a> *;</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#ac006b3d220a8eb5f7f4feeb553b610d0"> 81</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classbio_1_1ranges_1_1aligned__allocator.html#ac006b3d220a8eb5f7f4feeb553b610d0">difference_type</a> = <span class="keyword">typename</span> <a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/memory/pointer_traits.html">std::pointer_traits<pointer>::difference_type</a>;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#ac8e20482f883c34018431692264e7de4"> 83</a></span> <span class="keyword">using </span><a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/types/make_unsigned.html">size_type</a> = <a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/types/make_unsigned.html">std::make_unsigned_t<difference_type></a>;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#a5a17fa1d08f3056f14421e7760394f1d"> 86</a></span> <span class="keyword">using </span><a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/types/integral_constant.html">is_always_equal</a> = <a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/types/integral_constant.html">std::true_type</a>;</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#a61ac8b68a5981bef7b3e5de4e17e1ab5"> 91</a></span> <a class="code hl_function" href="classbio_1_1ranges_1_1aligned__allocator.html#a61ac8b68a5981bef7b3e5de4e17e1ab5">aligned_allocator</a>() noexcept = default; </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#affd6cdcc57704c12662f0c8f5bac3a18"> 92</a></span> <a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator</a>(<a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator</a> const &) noexcept = default; </div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#abe136f332ec8470329b9444d65ea7b9b"> 93</a></span> <a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator</a>(<a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator</a> &&) noexcept = default; </div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#a93561b10dd9bd84ec1d5bf38052f941f"> 94</a></span> <a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator</a> & operator=(<a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator</a> const &) noexcept = default; </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#a33fc04134ac4a440909291c86078d37c"> 95</a></span> <a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator</a> & operator=(<a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator</a> &&) noexcept = default; </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#a2983f75cba0eddbe6aade653fc42388f"> 96</a></span> ~<a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator</a>() noexcept = default; </div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> template <class other_value_type, <span class="keywordtype">size_t</span> other_alignment></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#a37ec88451bb34a6f9c2c6593cce0f1eb"> 100</a></span> constexpr <a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator</a>(<a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator</a><other_value_type, other_alignment> const &) noexcept</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> {}</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#a84a29ca821a6962382345076208a2020"> 135</a></span> [[nodiscard]] <a class="code hl_typedef" href="classbio_1_1ranges_1_1aligned__allocator.html#a47b46db889a57307d1099d98f74b1bee">pointer</a> <a class="code hl_function" href="classbio_1_1ranges_1_1aligned__allocator.html#a84a29ca821a6962382345076208a2020">allocate</a>(<a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/types/make_unsigned.html">size_type</a> <span class="keyword">const</span> n)<span class="keyword"> const</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span><span class="keyword"> </span>{</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keyword">constexpr</span> <a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/types/make_unsigned.html">size_type</a> max_size = <a class="code hl_functionRef" target="_blank" href="https://en.cppreference.com/w/cpp/types/numeric_limits/max.html">std::numeric_limits<size_type>::max</a>() / <span class="keyword">sizeof</span>(<a class="code hl_typedef" href="classbio_1_1ranges_1_1aligned__allocator.html#a7e57eb6d82612b1a4c2a1b8b1dccc271">value_type</a>);</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordflow">if</span> (n > max_size)</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keywordflow">throw</span> <a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/memory/new/bad_alloc.html">std::bad_alloc</a>{};</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="keywordtype">size_t</span> bytes_to_allocate = n * <span class="keyword">sizeof</span>(<a class="code hl_typedef" href="classbio_1_1ranges_1_1aligned__allocator.html#a7e57eb6d82612b1a4c2a1b8b1dccc271">value_type</a>);</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (<a class="code hl_variable" href="classbio_1_1ranges_1_1aligned__allocator.html#ae2bf35424730d02213e04b71b200d181">alignment</a> <= __STDCPP_DEFAULT_NEW_ALIGNMENT__)</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><a class="code hl_typedef" href="classbio_1_1ranges_1_1aligned__allocator.html#a47b46db889a57307d1099d98f74b1bee">pointer</a><span class="keyword">></span>(::operator <span class="keyword">new</span>(bytes_to_allocate));</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordflow">else</span> <span class="comment">// Use alignment aware allocator function.</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><a class="code hl_typedef" href="classbio_1_1ranges_1_1aligned__allocator.html#a47b46db889a57307d1099d98f74b1bee">pointer</a><span class="keyword">></span>(::operator <span class="keyword">new</span>(bytes_to_allocate, <span class="keyword">static_cast<</span><a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/memory/new/align_val_t.html">std::align_val_t</a><span class="keyword">></span>(<a class="code hl_variable" href="classbio_1_1ranges_1_1aligned__allocator.html#ae2bf35424730d02213e04b71b200d181">alignment</a>)));</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> }</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> </div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#a2797aecb49fec1b52bca500c10f452a0"> 174</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classbio_1_1ranges_1_1aligned__allocator.html#a2797aecb49fec1b52bca500c10f452a0">deallocate</a>(<a class="code hl_typedef" href="classbio_1_1ranges_1_1aligned__allocator.html#a47b46db889a57307d1099d98f74b1bee">pointer</a> <span class="keyword">const</span> p, <a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/types/make_unsigned.html">size_type</a> <span class="keyword">const</span> n) <span class="keyword">const</span> <span class="keyword">noexcept</span></div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> {</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="keywordtype">size_t</span> bytes_to_deallocate = n * <span class="keyword">sizeof</span>(<a class="code hl_typedef" href="classbio_1_1ranges_1_1aligned__allocator.html#a7e57eb6d82612b1a4c2a1b8b1dccc271">value_type</a>);</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (<a class="code hl_variable" href="classbio_1_1ranges_1_1aligned__allocator.html#ae2bf35424730d02213e04b71b200d181">alignment</a> <= __STDCPP_DEFAULT_NEW_ALIGNMENT__)</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> ::operator <span class="keyword">delete</span>(p, bytes_to_deallocate);</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="keywordflow">else</span> <span class="comment">// Use alignment aware deallocator function.</span></div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> ::operator <span class="keyword">delete</span>(p, bytes_to_deallocate, <span class="keyword">static_cast<</span><a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/memory/new/align_val_t.html">std::align_val_t</a><span class="keyword">></span>(<a class="code hl_variable" href="classbio_1_1ranges_1_1aligned__allocator.html#ae2bf35424730d02213e04b71b200d181">alignment</a>));</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> }</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> </div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keyword">template</span> <<span class="keyword">typename</span> new_value_type></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"><a class="line" href="structbio_1_1ranges_1_1aligned__allocator_1_1rebind.html"> 194</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structbio_1_1ranges_1_1aligned__allocator_1_1rebind.html">rebind</a></div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> {</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"><a class="line" href="structbio_1_1ranges_1_1aligned__allocator_1_1rebind.html#a180444a7cc51b4de3049c22b4157d524"> 197</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structbio_1_1ranges_1_1aligned__allocator_1_1rebind.html#a180444a7cc51b4de3049c22b4157d524">other_alignment</a> = <a class="code hl_functionRef" target="_blank" href="https://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a>(<span class="keyword">alignof</span>(new_value_type), <a class="code hl_variable" href="classbio_1_1ranges_1_1aligned__allocator.html#ae2bf35424730d02213e04b71b200d181">alignment</a>);</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"><a class="line" href="structbio_1_1ranges_1_1aligned__allocator_1_1rebind.html#a940eff16aa3716f2b42e901742591e3f"> 199</a></span> <span class="keyword">using </span><a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">other</a> = <a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator<new_value_type, other_alignment></a>;</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> };</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <span class="keyword">template</span> <<span class="keyword">class</span> value_type2, <span class="keywordtype">size_t</span> alignment2></div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"><a class="line" href="classbio_1_1ranges_1_1aligned__allocator.html#ad6ae8bee821fcafdc1c886a1bb404401"> 207</a></span> <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classbio_1_1ranges_1_1aligned__allocator.html#ad6ae8bee821fcafdc1c886a1bb404401">operator==</a>(<a class="code hl_class" href="classbio_1_1ranges_1_1aligned__allocator.html">aligned_allocator<value_type2, alignment2></a> <span class="keyword">const</span> &) <span class="keyword">noexcept</span></div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> {</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="classbio_1_1ranges_1_1aligned__allocator.html#ae2bf35424730d02213e04b71b200d181">alignment</a> == alignment2;</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> }</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span>};</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> </div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span>} <span class="comment">// namespace bio::ranges</span></div>
<div class="ttc" id="aalign_val_t_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/memory/new/align_val_t.html">std::align_val_t</a></div></div>
<div class="ttc" id="abad_alloc_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/memory/new/bad_alloc.html">std::bad_alloc</a></div></div>
<div class="ttc" id="aclassbio_1_1ranges_1_1aligned__allocator_html"><div class="ttname"><a href="classbio_1_1ranges_1_1aligned__allocator.html">bio::ranges::aligned_allocator</a></div><div class="ttdoc">Allocates uninitialized storage whose memory-alignment is specified by alignment.</div><div class="ttdef"><b>Definition:</b> aligned_allocator.hpp:71</div></div>
<div class="ttc" id="aclassbio_1_1ranges_1_1aligned__allocator_html_a2797aecb49fec1b52bca500c10f452a0"><div class="ttname"><a href="classbio_1_1ranges_1_1aligned__allocator.html#a2797aecb49fec1b52bca500c10f452a0">bio::ranges::aligned_allocator::deallocate</a></div><div class="ttdeci">void deallocate(pointer const p, size_type const n) const noexcept</div><div class="ttdoc">Deallocates the storage referenced by the pointer p, which must be a pointer obtained by an earlier c...</div><div class="ttdef"><b>Definition:</b> aligned_allocator.hpp:174</div></div>
<div class="ttc" id="aclassbio_1_1ranges_1_1aligned__allocator_html_a47b46db889a57307d1099d98f74b1bee"><div class="ttname"><a href="classbio_1_1ranges_1_1aligned__allocator.html#a47b46db889a57307d1099d98f74b1bee">bio::ranges::aligned_allocator::pointer</a></div><div class="ttdeci">value_type * pointer</div><div class="ttdoc">The pointer type of the allocation.</div><div class="ttdef"><b>Definition:</b> aligned_allocator.hpp:79</div></div>
<div class="ttc" id="aclassbio_1_1ranges_1_1aligned__allocator_html_a61ac8b68a5981bef7b3e5de4e17e1ab5"><div class="ttname"><a href="classbio_1_1ranges_1_1aligned__allocator.html#a61ac8b68a5981bef7b3e5de4e17e1ab5">bio::ranges::aligned_allocator::aligned_allocator</a></div><div class="ttdeci">aligned_allocator() noexcept=default</div><div class="ttdoc">Defaulted.</div></div>
<div class="ttc" id="aclassbio_1_1ranges_1_1aligned__allocator_html_a7e57eb6d82612b1a4c2a1b8b1dccc271"><div class="ttname"><a href="classbio_1_1ranges_1_1aligned__allocator.html#a7e57eb6d82612b1a4c2a1b8b1dccc271">bio::ranges::aligned_allocator::value_type</a></div><div class="ttdeci">value_t value_type</div><div class="ttdoc">The value type of the allocation.</div><div class="ttdef"><b>Definition:</b> aligned_allocator.hpp:77</div></div>
<div class="ttc" id="aclassbio_1_1ranges_1_1aligned__allocator_html_a84a29ca821a6962382345076208a2020"><div class="ttname"><a href="classbio_1_1ranges_1_1aligned__allocator.html#a84a29ca821a6962382345076208a2020">bio::ranges::aligned_allocator::allocate</a></div><div class="ttdeci">pointer allocate(size_type const n) const</div><div class="ttdoc">Allocates sufficiently large memory to hold n many elements of value_type.</div><div class="ttdef"><b>Definition:</b> aligned_allocator.hpp:135</div></div>
<div class="ttc" id="aclassbio_1_1ranges_1_1aligned__allocator_html_ac006b3d220a8eb5f7f4feeb553b610d0"><div class="ttname"><a href="classbio_1_1ranges_1_1aligned__allocator.html#ac006b3d220a8eb5f7f4feeb553b610d0">bio::ranges::aligned_allocator::difference_type</a></div><div class="ttdeci">typename std::pointer_traits< pointer >::difference_type difference_type</div><div class="ttdoc">The difference type of the allocation.</div><div class="ttdef"><b>Definition:</b> aligned_allocator.hpp:81</div></div>
<div class="ttc" id="aclassbio_1_1ranges_1_1aligned__allocator_html_ad6ae8bee821fcafdc1c886a1bb404401"><div class="ttname"><a href="classbio_1_1ranges_1_1aligned__allocator.html#ad6ae8bee821fcafdc1c886a1bb404401">bio::ranges::aligned_allocator::operator==</a></div><div class="ttdeci">constexpr bool operator==(aligned_allocator< value_type2, alignment2 > const &) noexcept</div><div class="ttdoc">Returns true if the memory-alignment matches.</div><div class="ttdef"><b>Definition:</b> aligned_allocator.hpp:207</div></div>
<div class="ttc" id="aclassbio_1_1ranges_1_1aligned__allocator_html_ae2bf35424730d02213e04b71b200d181"><div class="ttname"><a href="classbio_1_1ranges_1_1aligned__allocator.html#ae2bf35424730d02213e04b71b200d181">bio::ranges::aligned_allocator::alignment</a></div><div class="ttdeci">static constexpr size_t alignment</div><div class="ttdoc">The memory-alignment of the allocation.</div><div class="ttdef"><b>Definition:</b> aligned_allocator.hpp:74</div></div>
<div class="ttc" id="acore_8hpp_html"><div class="ttname"><a href="core_8hpp.html">core.hpp</a></div><div class="ttdoc">Provides platform and dependency checks.</div></div>
<div class="ttc" id="aintegral_constant_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/types/integral_constant.html">std::true_type</a></div></div>
<div class="ttc" id="alimits_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/header/limits.html">limits</a></div></div>
<div class="ttc" id="amake_unsigned_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/types/make_unsigned.html">std::make_unsigned_t</a></div></div>
<div class="ttc" id="amax_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/types/numeric_limits/max.html">std::numeric_limits::max</a></div><div class="ttdeci">T max(T... args)</div></div>
<div class="ttc" id="amemory_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/header/memory.html">memory</a></div></div>
<div class="ttc" id="anamespacebio_1_1ranges_html"><div class="ttname"><a href="namespacebio_1_1ranges.html">bio::ranges</a></div><div class="ttdoc">The ranges module's namespace.</div></div>
<div class="ttc" id="apointer_traits_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/memory/pointer_traits.html">std::pointer_traits</a></div></div>
<div class="ttc" id="astructbio_1_1ranges_1_1aligned__allocator_1_1rebind_html"><div class="ttname"><a href="structbio_1_1ranges_1_1aligned__allocator_1_1rebind.html">bio::ranges::aligned_allocator::rebind</a></div><div class="ttdoc">The aligned_allocator member template class aligned_allocator::rebind provides a way to obtain an all...</div><div class="ttdef"><b>Definition:</b> aligned_allocator.hpp:195</div></div>
<div class="ttc" id="astructbio_1_1ranges_1_1aligned__allocator_1_1rebind_html_a180444a7cc51b4de3049c22b4157d524"><div class="ttname"><a href="structbio_1_1ranges_1_1aligned__allocator_1_1rebind.html#a180444a7cc51b4de3049c22b4157d524">bio::ranges::aligned_allocator::rebind::other_alignment</a></div><div class="ttdeci">static constexpr size_t other_alignment</div><div class="ttdoc">The alignment for the rebound allocator.</div><div class="ttdef"><b>Definition:</b> aligned_allocator.hpp:197</div></div>
<div class="ttc" id="atype_traits_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/header/type_traits.html">type_traits</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.16-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<div id="list_bottom_right" style="text-align:right; float:left; color:black; padding: 0px 0px 0px 10px"></div>
<script type="text/javascript" charset="utf-8" src="version.js"></script>
<li class="navelem"><a class="el" href="dir_740f9cb2a3f5b47e1148c9e4d90d8bf4.html">bio</a></li><li class="navelem"><a class="el" href="dir_a05deca243559b9ee49c1fff2a7d2ca3.html">ranges</a></li><li class="navelem"><a class="el" href="dir_863a7aeecaebce89c36d5cb86386d0df.html">container</a></li><li class="navelem"><a class="el" href="aligned__allocator_8hpp.html">aligned_allocator.hpp</a></li>
<li class="footer">Generated on Thu Mar 30 2023 15:25:52 for BioC++ by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>