BayesNet/html/usr/include/c++/13/numeric.gcov.html

824 lines
86 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - coverage.info - usr/include/c++/13/numeric</title>
<link rel="stylesheet" type="text/css" href="../../../../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="10%" class="headerValue"><a href="../../../../index.html">top level</a> - <a href="index.html">/usr/include/c++/13</a> - numeric<span style="font-size: 80%;"> (source / <a href="numeric.func-c.html">functions</a>)</span></td>
<td width="5%"></td>
<td width="5%"></td>
<td width="5%" class="headerCovTableHead">Coverage</td>
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">coverage.info</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntryHi">100.0&nbsp;%</td>
<td class="headerCovTableEntry">12</td>
<td class="headerCovTableEntry">12</td>
</tr>
<tr>
<td class="headerItem">Test Date:</td>
<td class="headerValue">2024-04-30 13:17:26</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntryHi">100.0&nbsp;%</td>
<td class="headerCovTableEntry">2</td>
<td class="headerCovTableEntry">2</td>
</tr>
<tr><td><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td><br></td>
</tr>
<tr>
<td>
<pre class="sourceHeading"> Line data Source code</pre>
<pre class="source">
<span id="L1"><span class="lineNum"> 1</span> : // &lt;numeric&gt; -*- C++ -*-</span>
<span id="L2"><span class="lineNum"> 2</span> : </span>
<span id="L3"><span class="lineNum"> 3</span> : // Copyright (C) 2001-2023 Free Software Foundation, Inc.</span>
<span id="L4"><span class="lineNum"> 4</span> : //</span>
<span id="L5"><span class="lineNum"> 5</span> : // This file is part of the GNU ISO C++ Library. This library is free</span>
<span id="L6"><span class="lineNum"> 6</span> : // software; you can redistribute it and/or modify it under the</span>
<span id="L7"><span class="lineNum"> 7</span> : // terms of the GNU General Public License as published by the</span>
<span id="L8"><span class="lineNum"> 8</span> : // Free Software Foundation; either version 3, or (at your option)</span>
<span id="L9"><span class="lineNum"> 9</span> : // any later version.</span>
<span id="L10"><span class="lineNum"> 10</span> : </span>
<span id="L11"><span class="lineNum"> 11</span> : // This library is distributed in the hope that it will be useful,</span>
<span id="L12"><span class="lineNum"> 12</span> : // but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<span id="L13"><span class="lineNum"> 13</span> : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
<span id="L14"><span class="lineNum"> 14</span> : // GNU General Public License for more details.</span>
<span id="L15"><span class="lineNum"> 15</span> : </span>
<span id="L16"><span class="lineNum"> 16</span> : // Under Section 7 of GPL version 3, you are granted additional</span>
<span id="L17"><span class="lineNum"> 17</span> : // permissions described in the GCC Runtime Library Exception, version</span>
<span id="L18"><span class="lineNum"> 18</span> : // 3.1, as published by the Free Software Foundation.</span>
<span id="L19"><span class="lineNum"> 19</span> : </span>
<span id="L20"><span class="lineNum"> 20</span> : // You should have received a copy of the GNU General Public License and</span>
<span id="L21"><span class="lineNum"> 21</span> : // a copy of the GCC Runtime Library Exception along with this program;</span>
<span id="L22"><span class="lineNum"> 22</span> : // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see</span>
<span id="L23"><span class="lineNum"> 23</span> : // &lt;http://www.gnu.org/licenses/&gt;.</span>
<span id="L24"><span class="lineNum"> 24</span> : </span>
<span id="L25"><span class="lineNum"> 25</span> : /*</span>
<span id="L26"><span class="lineNum"> 26</span> : *</span>
<span id="L27"><span class="lineNum"> 27</span> : * Copyright (c) 1994</span>
<span id="L28"><span class="lineNum"> 28</span> : * Hewlett-Packard Company</span>
<span id="L29"><span class="lineNum"> 29</span> : *</span>
<span id="L30"><span class="lineNum"> 30</span> : * Permission to use, copy, modify, distribute and sell this software</span>
<span id="L31"><span class="lineNum"> 31</span> : * and its documentation for any purpose is hereby granted without fee,</span>
<span id="L32"><span class="lineNum"> 32</span> : * provided that the above copyright notice appear in all copies and</span>
<span id="L33"><span class="lineNum"> 33</span> : * that both that copyright notice and this permission notice appear</span>
<span id="L34"><span class="lineNum"> 34</span> : * in supporting documentation. Hewlett-Packard Company makes no</span>
<span id="L35"><span class="lineNum"> 35</span> : * representations about the suitability of this software for any</span>
<span id="L36"><span class="lineNum"> 36</span> : * purpose. It is provided &quot;as is&quot; without express or implied warranty.</span>
<span id="L37"><span class="lineNum"> 37</span> : *</span>
<span id="L38"><span class="lineNum"> 38</span> : *</span>
<span id="L39"><span class="lineNum"> 39</span> : * Copyright (c) 1996,1997</span>
<span id="L40"><span class="lineNum"> 40</span> : * Silicon Graphics Computer Systems, Inc.</span>
<span id="L41"><span class="lineNum"> 41</span> : *</span>
<span id="L42"><span class="lineNum"> 42</span> : * Permission to use, copy, modify, distribute and sell this software</span>
<span id="L43"><span class="lineNum"> 43</span> : * and its documentation for any purpose is hereby granted without fee,</span>
<span id="L44"><span class="lineNum"> 44</span> : * provided that the above copyright notice appear in all copies and</span>
<span id="L45"><span class="lineNum"> 45</span> : * that both that copyright notice and this permission notice appear</span>
<span id="L46"><span class="lineNum"> 46</span> : * in supporting documentation. Silicon Graphics makes no</span>
<span id="L47"><span class="lineNum"> 47</span> : * representations about the suitability of this software for any</span>
<span id="L48"><span class="lineNum"> 48</span> : * purpose. It is provided &quot;as is&quot; without express or implied warranty.</span>
<span id="L49"><span class="lineNum"> 49</span> : */</span>
<span id="L50"><span class="lineNum"> 50</span> : </span>
<span id="L51"><span class="lineNum"> 51</span> : /** @file include/numeric</span>
<span id="L52"><span class="lineNum"> 52</span> : * This is a Standard C++ Library header.</span>
<span id="L53"><span class="lineNum"> 53</span> : */</span>
<span id="L54"><span class="lineNum"> 54</span> : </span>
<span id="L55"><span class="lineNum"> 55</span> : #ifndef _GLIBCXX_NUMERIC</span>
<span id="L56"><span class="lineNum"> 56</span> : #define _GLIBCXX_NUMERIC 1</span>
<span id="L57"><span class="lineNum"> 57</span> : </span>
<span id="L58"><span class="lineNum"> 58</span> : #pragma GCC system_header</span>
<span id="L59"><span class="lineNum"> 59</span> : </span>
<span id="L60"><span class="lineNum"> 60</span> : #include &lt;bits/c++config.h&gt;</span>
<span id="L61"><span class="lineNum"> 61</span> : #include &lt;bits/stl_iterator_base_types.h&gt;</span>
<span id="L62"><span class="lineNum"> 62</span> : #include &lt;bits/stl_numeric.h&gt;</span>
<span id="L63"><span class="lineNum"> 63</span> : </span>
<span id="L64"><span class="lineNum"> 64</span> : #ifdef _GLIBCXX_PARALLEL</span>
<span id="L65"><span class="lineNum"> 65</span> : # include &lt;parallel/numeric&gt;</span>
<span id="L66"><span class="lineNum"> 66</span> : #endif</span>
<span id="L67"><span class="lineNum"> 67</span> : </span>
<span id="L68"><span class="lineNum"> 68</span> : #if __cplusplus &gt;= 201402L</span>
<span id="L69"><span class="lineNum"> 69</span> : # include &lt;type_traits&gt;</span>
<span id="L70"><span class="lineNum"> 70</span> : # include &lt;bit&gt;</span>
<span id="L71"><span class="lineNum"> 71</span> : # include &lt;ext/numeric_traits.h&gt;</span>
<span id="L72"><span class="lineNum"> 72</span> : #endif</span>
<span id="L73"><span class="lineNum"> 73</span> : </span>
<span id="L74"><span class="lineNum"> 74</span> : #if __cplusplus &gt;= 201703L</span>
<span id="L75"><span class="lineNum"> 75</span> : # include &lt;bits/stl_function.h&gt;</span>
<span id="L76"><span class="lineNum"> 76</span> : #endif</span>
<span id="L77"><span class="lineNum"> 77</span> : </span>
<span id="L78"><span class="lineNum"> 78</span> : #if __cplusplus &gt; 201703L</span>
<span id="L79"><span class="lineNum"> 79</span> : # include &lt;limits&gt;</span>
<span id="L80"><span class="lineNum"> 80</span> : #endif</span>
<span id="L81"><span class="lineNum"> 81</span> : </span>
<span id="L82"><span class="lineNum"> 82</span> : /**</span>
<span id="L83"><span class="lineNum"> 83</span> : * @defgroup numerics Numerics</span>
<span id="L84"><span class="lineNum"> 84</span> : *</span>
<span id="L85"><span class="lineNum"> 85</span> : * Components for performing numeric operations. Includes support for</span>
<span id="L86"><span class="lineNum"> 86</span> : * complex number types, random number generation, numeric (n-at-a-time)</span>
<span id="L87"><span class="lineNum"> 87</span> : * arrays, generalized numeric algorithms, and mathematical special functions.</span>
<span id="L88"><span class="lineNum"> 88</span> : */</span>
<span id="L89"><span class="lineNum"> 89</span> : </span>
<span id="L90"><span class="lineNum"> 90</span> : namespace std _GLIBCXX_VISIBILITY(default)</span>
<span id="L91"><span class="lineNum"> 91</span> : {</span>
<span id="L92"><span class="lineNum"> 92</span> : _GLIBCXX_BEGIN_NAMESPACE_VERSION</span>
<span id="L93"><span class="lineNum"> 93</span> : </span>
<span id="L94"><span class="lineNum"> 94</span> : #if __cplusplus &gt;= 201402L</span>
<span id="L95"><span class="lineNum"> 95</span> : namespace __detail</span>
<span id="L96"><span class="lineNum"> 96</span> : {</span>
<span id="L97"><span class="lineNum"> 97</span> : // Like std::abs, but supports unsigned types and returns the specified type,</span>
<span id="L98"><span class="lineNum"> 98</span> : // so |std::numeric_limits&lt;_Tp&gt;::min()| is OK if representable in _Res.</span>
<span id="L99"><span class="lineNum"> 99</span> : template&lt;typename _Res, typename _Tp&gt;</span>
<span id="L100"><span class="lineNum"> 100</span> : constexpr _Res</span>
<span id="L101"><span class="lineNum"> 101</span> : __abs_r(_Tp __val)</span>
<span id="L102"><span class="lineNum"> 102</span> : {</span>
<span id="L103"><span class="lineNum"> 103</span> : static_assert(sizeof(_Res) &gt;= sizeof(_Tp),</span>
<span id="L104"><span class="lineNum"> 104</span> : &quot;result type must be at least as wide as the input type&quot;);</span>
<span id="L105"><span class="lineNum"> 105</span> : </span>
<span id="L106"><span class="lineNum"> 106</span> : if (__val &gt;= 0)</span>
<span id="L107"><span class="lineNum"> 107</span> : return __val;</span>
<span id="L108"><span class="lineNum"> 108</span> : #ifdef _GLIBCXX_ASSERTIONS</span>
<span id="L109"><span class="lineNum"> 109</span> : if (!__is_constant_evaluated()) // overflow already detected in constexpr</span>
<span id="L110"><span class="lineNum"> 110</span> : __glibcxx_assert(__val != __gnu_cxx::__int_traits&lt;_Res&gt;::__min);</span>
<span id="L111"><span class="lineNum"> 111</span> : #endif</span>
<span id="L112"><span class="lineNum"> 112</span> : return -static_cast&lt;_Res&gt;(__val);</span>
<span id="L113"><span class="lineNum"> 113</span> : }</span>
<span id="L114"><span class="lineNum"> 114</span> : </span>
<span id="L115"><span class="lineNum"> 115</span> : template&lt;typename&gt; void __abs_r(bool) = delete;</span>
<span id="L116"><span class="lineNum"> 116</span> : </span>
<span id="L117"><span class="lineNum"> 117</span> : // GCD implementation, using Stein's algorithm</span>
<span id="L118"><span class="lineNum"> 118</span> : template&lt;typename _Tp&gt;</span>
<span id="L119"><span class="lineNum"> 119</span> : constexpr _Tp</span>
<span id="L120"><span class="lineNum"> 120</span> : __gcd(_Tp __m, _Tp __n)</span>
<span id="L121"><span class="lineNum"> 121</span> : {</span>
<span id="L122"><span class="lineNum"> 122</span> : static_assert(is_unsigned&lt;_Tp&gt;::value, &quot;type must be unsigned&quot;);</span>
<span id="L123"><span class="lineNum"> 123</span> : </span>
<span id="L124"><span class="lineNum"> 124</span> : if (__m == 0)</span>
<span id="L125"><span class="lineNum"> 125</span> : return __n;</span>
<span id="L126"><span class="lineNum"> 126</span> : if (__n == 0)</span>
<span id="L127"><span class="lineNum"> 127</span> : return __m;</span>
<span id="L128"><span class="lineNum"> 128</span> : </span>
<span id="L129"><span class="lineNum"> 129</span> : const int __i = std::__countr_zero(__m);</span>
<span id="L130"><span class="lineNum"> 130</span> : __m &gt;&gt;= __i;</span>
<span id="L131"><span class="lineNum"> 131</span> : const int __j = std::__countr_zero(__n);</span>
<span id="L132"><span class="lineNum"> 132</span> : __n &gt;&gt;= __j;</span>
<span id="L133"><span class="lineNum"> 133</span> : const int __k = __i &lt; __j ? __i : __j; // min(i, j)</span>
<span id="L134"><span class="lineNum"> 134</span> : </span>
<span id="L135"><span class="lineNum"> 135</span> : while (true)</span>
<span id="L136"><span class="lineNum"> 136</span> : {</span>
<span id="L137"><span class="lineNum"> 137</span> : if (__m &gt; __n)</span>
<span id="L138"><span class="lineNum"> 138</span> : {</span>
<span id="L139"><span class="lineNum"> 139</span> : _Tp __tmp = __m;</span>
<span id="L140"><span class="lineNum"> 140</span> : __m = __n;</span>
<span id="L141"><span class="lineNum"> 141</span> : __n = __tmp;</span>
<span id="L142"><span class="lineNum"> 142</span> : }</span>
<span id="L143"><span class="lineNum"> 143</span> : </span>
<span id="L144"><span class="lineNum"> 144</span> : __n -= __m;</span>
<span id="L145"><span class="lineNum"> 145</span> : </span>
<span id="L146"><span class="lineNum"> 146</span> : if (__n == 0)</span>
<span id="L147"><span class="lineNum"> 147</span> : return __m &lt;&lt; __k;</span>
<span id="L148"><span class="lineNum"> 148</span> : </span>
<span id="L149"><span class="lineNum"> 149</span> : __n &gt;&gt;= std::__countr_zero(__n);</span>
<span id="L150"><span class="lineNum"> 150</span> : }</span>
<span id="L151"><span class="lineNum"> 151</span> : }</span>
<span id="L152"><span class="lineNum"> 152</span> : } // namespace __detail</span>
<span id="L153"><span class="lineNum"> 153</span> : </span>
<span id="L154"><span class="lineNum"> 154</span> : #if __cplusplus &gt;= 201703L</span>
<span id="L155"><span class="lineNum"> 155</span> : </span>
<span id="L156"><span class="lineNum"> 156</span> : #define __cpp_lib_gcd_lcm 201606L</span>
<span id="L157"><span class="lineNum"> 157</span> : // These were used in drafts of SD-6:</span>
<span id="L158"><span class="lineNum"> 158</span> : #define __cpp_lib_gcd 201606L</span>
<span id="L159"><span class="lineNum"> 159</span> : #define __cpp_lib_lcm 201606L</span>
<span id="L160"><span class="lineNum"> 160</span> : </span>
<span id="L161"><span class="lineNum"> 161</span> : /// Greatest common divisor</span>
<span id="L162"><span class="lineNum"> 162</span> : template&lt;typename _Mn, typename _Nn&gt;</span>
<span id="L163"><span class="lineNum"> 163</span> : constexpr common_type_t&lt;_Mn, _Nn&gt;</span>
<span id="L164"><span class="lineNum"> 164</span> : gcd(_Mn __m, _Nn __n) noexcept</span>
<span id="L165"><span class="lineNum"> 165</span> : {</span>
<span id="L166"><span class="lineNum"> 166</span> : static_assert(is_integral_v&lt;_Mn&gt; &amp;&amp; is_integral_v&lt;_Nn&gt;,</span>
<span id="L167"><span class="lineNum"> 167</span> : &quot;std::gcd arguments must be integers&quot;);</span>
<span id="L168"><span class="lineNum"> 168</span> : static_assert(_Mn(2) == 2 &amp;&amp; _Nn(2) == 2,</span>
<span id="L169"><span class="lineNum"> 169</span> : &quot;std::gcd arguments must not be bool&quot;);</span>
<span id="L170"><span class="lineNum"> 170</span> : using _Ct = common_type_t&lt;_Mn, _Nn&gt;;</span>
<span id="L171"><span class="lineNum"> 171</span> : const _Ct __m2 = __detail::__abs_r&lt;_Ct&gt;(__m);</span>
<span id="L172"><span class="lineNum"> 172</span> : const _Ct __n2 = __detail::__abs_r&lt;_Ct&gt;(__n);</span>
<span id="L173"><span class="lineNum"> 173</span> : return __detail::__gcd&lt;make_unsigned_t&lt;_Ct&gt;&gt;(__m2, __n2);</span>
<span id="L174"><span class="lineNum"> 174</span> : }</span>
<span id="L175"><span class="lineNum"> 175</span> : </span>
<span id="L176"><span class="lineNum"> 176</span> : /// Least common multiple</span>
<span id="L177"><span class="lineNum"> 177</span> : template&lt;typename _Mn, typename _Nn&gt;</span>
<span id="L178"><span class="lineNum"> 178</span> : constexpr common_type_t&lt;_Mn, _Nn&gt;</span>
<span id="L179"><span class="lineNum"> 179</span> : lcm(_Mn __m, _Nn __n) noexcept</span>
<span id="L180"><span class="lineNum"> 180</span> : {</span>
<span id="L181"><span class="lineNum"> 181</span> : static_assert(is_integral_v&lt;_Mn&gt; &amp;&amp; is_integral_v&lt;_Nn&gt;,</span>
<span id="L182"><span class="lineNum"> 182</span> : &quot;std::lcm arguments must be integers&quot;);</span>
<span id="L183"><span class="lineNum"> 183</span> : static_assert(_Mn(2) == 2 &amp;&amp; _Nn(2) == 2,</span>
<span id="L184"><span class="lineNum"> 184</span> : &quot;std::lcm arguments must not be bool&quot;);</span>
<span id="L185"><span class="lineNum"> 185</span> : using _Ct = common_type_t&lt;_Mn, _Nn&gt;;</span>
<span id="L186"><span class="lineNum"> 186</span> : const _Ct __m2 = __detail::__abs_r&lt;_Ct&gt;(__m);</span>
<span id="L187"><span class="lineNum"> 187</span> : const _Ct __n2 = __detail::__abs_r&lt;_Ct&gt;(__n);</span>
<span id="L188"><span class="lineNum"> 188</span> : if (__m2 == 0 || __n2 == 0)</span>
<span id="L189"><span class="lineNum"> 189</span> : return 0;</span>
<span id="L190"><span class="lineNum"> 190</span> : _Ct __r = __m2 / __detail::__gcd&lt;make_unsigned_t&lt;_Ct&gt;&gt;(__m2, __n2);</span>
<span id="L191"><span class="lineNum"> 191</span> : </span>
<span id="L192"><span class="lineNum"> 192</span> : if constexpr (is_signed_v&lt;_Ct&gt;)</span>
<span id="L193"><span class="lineNum"> 193</span> : if (__is_constant_evaluated())</span>
<span id="L194"><span class="lineNum"> 194</span> : return __r * __n2; // constant evaluation can detect overflow here.</span>
<span id="L195"><span class="lineNum"> 195</span> : </span>
<span id="L196"><span class="lineNum"> 196</span> : bool __overflow = __builtin_mul_overflow(__r, __n2, &amp;__r);</span>
<span id="L197"><span class="lineNum"> 197</span> : __glibcxx_assert(!__overflow);</span>
<span id="L198"><span class="lineNum"> 198</span> : return __r;</span>
<span id="L199"><span class="lineNum"> 199</span> : }</span>
<span id="L200"><span class="lineNum"> 200</span> : </span>
<span id="L201"><span class="lineNum"> 201</span> : #endif // C++17</span>
<span id="L202"><span class="lineNum"> 202</span> : #endif // C++14</span>
<span id="L203"><span class="lineNum"> 203</span> : </span>
<span id="L204"><span class="lineNum"> 204</span> : #if __cplusplus &gt; 201703L</span>
<span id="L205"><span class="lineNum"> 205</span> : </span>
<span id="L206"><span class="lineNum"> 206</span> : // midpoint</span>
<span id="L207"><span class="lineNum"> 207</span> : # define __cpp_lib_interpolate 201902L</span>
<span id="L208"><span class="lineNum"> 208</span> : </span>
<span id="L209"><span class="lineNum"> 209</span> : template&lt;typename _Tp&gt;</span>
<span id="L210"><span class="lineNum"> 210</span> : constexpr</span>
<span id="L211"><span class="lineNum"> 211</span> : enable_if_t&lt;__and_v&lt;is_arithmetic&lt;_Tp&gt;, is_same&lt;remove_cv_t&lt;_Tp&gt;, _Tp&gt;,</span>
<span id="L212"><span class="lineNum"> 212</span> : __not_&lt;is_same&lt;_Tp, bool&gt;&gt;&gt;,</span>
<span id="L213"><span class="lineNum"> 213</span> : _Tp&gt;</span>
<span id="L214"><span class="lineNum"> 214</span> : midpoint(_Tp __a, _Tp __b) noexcept</span>
<span id="L215"><span class="lineNum"> 215</span> : {</span>
<span id="L216"><span class="lineNum"> 216</span> : if constexpr (is_integral_v&lt;_Tp&gt;)</span>
<span id="L217"><span class="lineNum"> 217</span> : {</span>
<span id="L218"><span class="lineNum"> 218</span> : using _Up = make_unsigned_t&lt;_Tp&gt;;</span>
<span id="L219"><span class="lineNum"> 219</span> : </span>
<span id="L220"><span class="lineNum"> 220</span> : int __k = 1;</span>
<span id="L221"><span class="lineNum"> 221</span> : _Up __m = __a;</span>
<span id="L222"><span class="lineNum"> 222</span> : _Up __M = __b;</span>
<span id="L223"><span class="lineNum"> 223</span> : if (__a &gt; __b)</span>
<span id="L224"><span class="lineNum"> 224</span> : {</span>
<span id="L225"><span class="lineNum"> 225</span> : __k = -1;</span>
<span id="L226"><span class="lineNum"> 226</span> : __m = __b;</span>
<span id="L227"><span class="lineNum"> 227</span> : __M = __a;</span>
<span id="L228"><span class="lineNum"> 228</span> : }</span>
<span id="L229"><span class="lineNum"> 229</span> : return __a + __k * _Tp(_Up(__M - __m) / 2);</span>
<span id="L230"><span class="lineNum"> 230</span> : }</span>
<span id="L231"><span class="lineNum"> 231</span> : else // is_floating</span>
<span id="L232"><span class="lineNum"> 232</span> : {</span>
<span id="L233"><span class="lineNum"> 233</span> : constexpr _Tp __lo = numeric_limits&lt;_Tp&gt;::min() * 2;</span>
<span id="L234"><span class="lineNum"> 234</span> : constexpr _Tp __hi = numeric_limits&lt;_Tp&gt;::max() / 2;</span>
<span id="L235"><span class="lineNum"> 235</span> : const _Tp __abs_a = __a &lt; 0 ? -__a : __a;</span>
<span id="L236"><span class="lineNum"> 236</span> : const _Tp __abs_b = __b &lt; 0 ? -__b : __b;</span>
<span id="L237"><span class="lineNum"> 237</span> : if (__abs_a &lt;= __hi &amp;&amp; __abs_b &lt;= __hi) [[likely]]</span>
<span id="L238"><span class="lineNum"> 238</span> : return (__a + __b) / 2; // always correctly rounded</span>
<span id="L239"><span class="lineNum"> 239</span> : if (__abs_a &lt; __lo) // not safe to halve __a</span>
<span id="L240"><span class="lineNum"> 240</span> : return __a + __b/2;</span>
<span id="L241"><span class="lineNum"> 241</span> : if (__abs_b &lt; __lo) // not safe to halve __b</span>
<span id="L242"><span class="lineNum"> 242</span> : return __a/2 + __b;</span>
<span id="L243"><span class="lineNum"> 243</span> : return __a/2 + __b/2; // otherwise correctly rounded</span>
<span id="L244"><span class="lineNum"> 244</span> : }</span>
<span id="L245"><span class="lineNum"> 245</span> : }</span>
<span id="L246"><span class="lineNum"> 246</span> : </span>
<span id="L247"><span class="lineNum"> 247</span> : template&lt;typename _Tp&gt;</span>
<span id="L248"><span class="lineNum"> 248</span> : constexpr enable_if_t&lt;is_object_v&lt;_Tp&gt;, _Tp*&gt;</span>
<span id="L249"><span class="lineNum"> 249</span> : midpoint(_Tp* __a, _Tp* __b) noexcept</span>
<span id="L250"><span class="lineNum"> 250</span> : {</span>
<span id="L251"><span class="lineNum"> 251</span> : static_assert( sizeof(_Tp) != 0, &quot;type must be complete&quot; );</span>
<span id="L252"><span class="lineNum"> 252</span> : return __a + (__b - __a) / 2;</span>
<span id="L253"><span class="lineNum"> 253</span> : }</span>
<span id="L254"><span class="lineNum"> 254</span> : #endif // C++20</span>
<span id="L255"><span class="lineNum"> 255</span> : </span>
<span id="L256"><span class="lineNum"> 256</span> : #if __cplusplus &gt;= 201703L</span>
<span id="L257"><span class="lineNum"> 257</span> : </span>
<span id="L258"><span class="lineNum"> 258</span> : #if __cplusplus &gt; 201703L</span>
<span id="L259"><span class="lineNum"> 259</span> : #define __cpp_lib_constexpr_numeric 201911L</span>
<span id="L260"><span class="lineNum"> 260</span> : #endif</span>
<span id="L261"><span class="lineNum"> 261</span> : </span>
<span id="L262"><span class="lineNum"> 262</span> : /// @addtogroup numeric_ops</span>
<span id="L263"><span class="lineNum"> 263</span> : /// @{</span>
<span id="L264"><span class="lineNum"> 264</span> : </span>
<span id="L265"><span class="lineNum"> 265</span> : /**</span>
<span id="L266"><span class="lineNum"> 266</span> : * @brief Calculate reduction of values in a range.</span>
<span id="L267"><span class="lineNum"> 267</span> : *</span>
<span id="L268"><span class="lineNum"> 268</span> : * @param __first Start of range.</span>
<span id="L269"><span class="lineNum"> 269</span> : * @param __last End of range.</span>
<span id="L270"><span class="lineNum"> 270</span> : * @param __init Starting value to add other values to.</span>
<span id="L271"><span class="lineNum"> 271</span> : * @param __binary_op A binary function object.</span>
<span id="L272"><span class="lineNum"> 272</span> : * @return The final sum.</span>
<span id="L273"><span class="lineNum"> 273</span> : *</span>
<span id="L274"><span class="lineNum"> 274</span> : * Reduce the values in the range `[first,last)` using a binary operation.</span>
<span id="L275"><span class="lineNum"> 275</span> : * The initial value is `init`. The values are not necessarily processed</span>
<span id="L276"><span class="lineNum"> 276</span> : * in order.</span>
<span id="L277"><span class="lineNum"> 277</span> : *</span>
<span id="L278"><span class="lineNum"> 278</span> : * This algorithm is similar to `std::accumulate` but is not required to</span>
<span id="L279"><span class="lineNum"> 279</span> : * perform the operations in order from first to last. For operations</span>
<span id="L280"><span class="lineNum"> 280</span> : * that are commutative and associative the result will be the same as</span>
<span id="L281"><span class="lineNum"> 281</span> : * for `std::accumulate`, but for other operations (such as floating point</span>
<span id="L282"><span class="lineNum"> 282</span> : * arithmetic) the result can be different.</span>
<span id="L283"><span class="lineNum"> 283</span> : */</span>
<span id="L284"><span class="lineNum"> 284</span> : template&lt;typename _InputIterator, typename _Tp, typename _BinaryOperation&gt;</span>
<span id="L285"><span class="lineNum"> 285</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L286"><span class="lineNum"> 286</span> : _Tp</span>
<span id="L287"><span class="lineNum"> 287</span> <span class="tlaGNC tlaBgGNC"> 246 : reduce(_InputIterator __first, _InputIterator __last, _Tp __init,</span></span>
<span id="L288"><span class="lineNum"> 288</span> : _BinaryOperation __binary_op)</span>
<span id="L289"><span class="lineNum"> 289</span> : {</span>
<span id="L290"><span class="lineNum"> 290</span> : using __ref = typename iterator_traits&lt;_InputIterator&gt;::reference;</span>
<span id="L291"><span class="lineNum"> 291</span> : static_assert(is_invocable_r_v&lt;_Tp, _BinaryOperation&amp;, _Tp&amp;, __ref&gt;);</span>
<span id="L292"><span class="lineNum"> 292</span> : static_assert(is_invocable_r_v&lt;_Tp, _BinaryOperation&amp;, __ref, _Tp&amp;&gt;);</span>
<span id="L293"><span class="lineNum"> 293</span> : static_assert(is_invocable_r_v&lt;_Tp, _BinaryOperation&amp;, _Tp&amp;, _Tp&amp;&gt;);</span>
<span id="L294"><span class="lineNum"> 294</span> : static_assert(is_invocable_r_v&lt;_Tp, _BinaryOperation&amp;, __ref, __ref&gt;);</span>
<span id="L295"><span class="lineNum"> 295</span> : if constexpr (__is_random_access_iter&lt;_InputIterator&gt;::value)</span>
<span id="L296"><span class="lineNum"> 296</span> : {</span>
<span id="L297"><span class="lineNum"> 297</span> <span class="tlaGNC"> 522 : while ((__last - __first) &gt;= 4)</span></span>
<span id="L298"><span class="lineNum"> 298</span> : {</span>
<span id="L299"><span class="lineNum"> 299</span> <span class="tlaGNC"> 276 : _Tp __v1 = __binary_op(__first[0], __first[1]);</span></span>
<span id="L300"><span class="lineNum"> 300</span> <span class="tlaGNC"> 276 : _Tp __v2 = __binary_op(__first[2], __first[3]);</span></span>
<span id="L301"><span class="lineNum"> 301</span> <span class="tlaGNC"> 276 : _Tp __v3 = __binary_op(__v1, __v2);</span></span>
<span id="L302"><span class="lineNum"> 302</span> <span class="tlaGNC"> 276 : __init = __binary_op(__init, __v3);</span></span>
<span id="L303"><span class="lineNum"> 303</span> <span class="tlaGNC"> 276 : __first += 4;</span></span>
<span id="L304"><span class="lineNum"> 304</span> : }</span>
<span id="L305"><span class="lineNum"> 305</span> : }</span>
<span id="L306"><span class="lineNum"> 306</span> <span class="tlaGNC"> 534 : for (; __first != __last; ++__first)</span></span>
<span id="L307"><span class="lineNum"> 307</span> <span class="tlaGNC"> 288 : __init = __binary_op(__init, *__first);</span></span>
<span id="L308"><span class="lineNum"> 308</span> <span class="tlaGNC"> 246 : return __init;</span></span>
<span id="L309"><span class="lineNum"> 309</span> : }</span>
<span id="L310"><span class="lineNum"> 310</span> : </span>
<span id="L311"><span class="lineNum"> 311</span> : /**</span>
<span id="L312"><span class="lineNum"> 312</span> : * @brief Calculate reduction of values in a range.</span>
<span id="L313"><span class="lineNum"> 313</span> : *</span>
<span id="L314"><span class="lineNum"> 314</span> : * @param __first Start of range.</span>
<span id="L315"><span class="lineNum"> 315</span> : * @param __last End of range.</span>
<span id="L316"><span class="lineNum"> 316</span> : * @param __init Starting value to add other values to.</span>
<span id="L317"><span class="lineNum"> 317</span> : * @return The final sum.</span>
<span id="L318"><span class="lineNum"> 318</span> : *</span>
<span id="L319"><span class="lineNum"> 319</span> : * Reduce the values in the range `[first,last)` using addition.</span>
<span id="L320"><span class="lineNum"> 320</span> : * Equivalent to calling `std::reduce(first, last, init, std::plus&lt;&gt;())`.</span>
<span id="L321"><span class="lineNum"> 321</span> : */</span>
<span id="L322"><span class="lineNum"> 322</span> : template&lt;typename _InputIterator, typename _Tp&gt;</span>
<span id="L323"><span class="lineNum"> 323</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L324"><span class="lineNum"> 324</span> : inline _Tp</span>
<span id="L325"><span class="lineNum"> 325</span> : reduce(_InputIterator __first, _InputIterator __last, _Tp __init)</span>
<span id="L326"><span class="lineNum"> 326</span> : { return std::reduce(__first, __last, std::move(__init), plus&lt;&gt;()); }</span>
<span id="L327"><span class="lineNum"> 327</span> : </span>
<span id="L328"><span class="lineNum"> 328</span> : /**</span>
<span id="L329"><span class="lineNum"> 329</span> : * @brief Calculate reduction of values in a range.</span>
<span id="L330"><span class="lineNum"> 330</span> : *</span>
<span id="L331"><span class="lineNum"> 331</span> : * @param __first Start of range.</span>
<span id="L332"><span class="lineNum"> 332</span> : * @param __last End of range.</span>
<span id="L333"><span class="lineNum"> 333</span> : * @return The final sum.</span>
<span id="L334"><span class="lineNum"> 334</span> : *</span>
<span id="L335"><span class="lineNum"> 335</span> : * Reduce the values in the range `[first,last)` using addition, with</span>
<span id="L336"><span class="lineNum"> 336</span> : * an initial value of `T{}`, where `T` is the iterator's value type.</span>
<span id="L337"><span class="lineNum"> 337</span> : * Equivalent to calling `std::reduce(first, last, T{}, std::plus&lt;&gt;())`.</span>
<span id="L338"><span class="lineNum"> 338</span> : */</span>
<span id="L339"><span class="lineNum"> 339</span> : template&lt;typename _InputIterator&gt;</span>
<span id="L340"><span class="lineNum"> 340</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L341"><span class="lineNum"> 341</span> : inline typename iterator_traits&lt;_InputIterator&gt;::value_type</span>
<span id="L342"><span class="lineNum"> 342</span> <span class="tlaGNC"> 246 : reduce(_InputIterator __first, _InputIterator __last)</span></span>
<span id="L343"><span class="lineNum"> 343</span> : {</span>
<span id="L344"><span class="lineNum"> 344</span> : using value_type = typename iterator_traits&lt;_InputIterator&gt;::value_type;</span>
<span id="L345"><span class="lineNum"> 345</span> <span class="tlaGNC"> 246 : return std::reduce(__first, __last, value_type{}, plus&lt;&gt;());</span></span>
<span id="L346"><span class="lineNum"> 346</span> : }</span>
<span id="L347"><span class="lineNum"> 347</span> : </span>
<span id="L348"><span class="lineNum"> 348</span> : /**</span>
<span id="L349"><span class="lineNum"> 349</span> : * @brief Combine elements from two ranges and reduce</span>
<span id="L350"><span class="lineNum"> 350</span> : *</span>
<span id="L351"><span class="lineNum"> 351</span> : * @param __first1 Start of first range.</span>
<span id="L352"><span class="lineNum"> 352</span> : * @param __last1 End of first range.</span>
<span id="L353"><span class="lineNum"> 353</span> : * @param __first2 Start of second range.</span>
<span id="L354"><span class="lineNum"> 354</span> : * @param __init Starting value to add other values to.</span>
<span id="L355"><span class="lineNum"> 355</span> : * @param __binary_op1 The function used to perform reduction.</span>
<span id="L356"><span class="lineNum"> 356</span> : * @param __binary_op2 The function used to combine values from the ranges.</span>
<span id="L357"><span class="lineNum"> 357</span> : * @return The final sum.</span>
<span id="L358"><span class="lineNum"> 358</span> : *</span>
<span id="L359"><span class="lineNum"> 359</span> : * Call `binary_op2(first1[n],first2[n])` for each `n` in `[0,last1-first1)`</span>
<span id="L360"><span class="lineNum"> 360</span> : * and then use `binary_op1` to reduce the values returned by `binary_op2`</span>
<span id="L361"><span class="lineNum"> 361</span> : * to a single value of type `T`.</span>
<span id="L362"><span class="lineNum"> 362</span> : *</span>
<span id="L363"><span class="lineNum"> 363</span> : * The range beginning at `first2` must contain at least `last1-first1`</span>
<span id="L364"><span class="lineNum"> 364</span> : * elements.</span>
<span id="L365"><span class="lineNum"> 365</span> : */</span>
<span id="L366"><span class="lineNum"> 366</span> : template&lt;typename _InputIterator1, typename _InputIterator2, typename _Tp,</span>
<span id="L367"><span class="lineNum"> 367</span> : typename _BinaryOperation1, typename _BinaryOperation2&gt;</span>
<span id="L368"><span class="lineNum"> 368</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L369"><span class="lineNum"> 369</span> : _Tp</span>
<span id="L370"><span class="lineNum"> 370</span> : transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1,</span>
<span id="L371"><span class="lineNum"> 371</span> : _InputIterator2 __first2, _Tp __init,</span>
<span id="L372"><span class="lineNum"> 372</span> : _BinaryOperation1 __binary_op1,</span>
<span id="L373"><span class="lineNum"> 373</span> : _BinaryOperation2 __binary_op2)</span>
<span id="L374"><span class="lineNum"> 374</span> : {</span>
<span id="L375"><span class="lineNum"> 375</span> : if constexpr (__and_v&lt;__is_random_access_iter&lt;_InputIterator1&gt;,</span>
<span id="L376"><span class="lineNum"> 376</span> : __is_random_access_iter&lt;_InputIterator2&gt;&gt;)</span>
<span id="L377"><span class="lineNum"> 377</span> : {</span>
<span id="L378"><span class="lineNum"> 378</span> : while ((__last1 - __first1) &gt;= 4)</span>
<span id="L379"><span class="lineNum"> 379</span> : {</span>
<span id="L380"><span class="lineNum"> 380</span> : _Tp __v1 = __binary_op1(__binary_op2(__first1[0], __first2[0]),</span>
<span id="L381"><span class="lineNum"> 381</span> : __binary_op2(__first1[1], __first2[1]));</span>
<span id="L382"><span class="lineNum"> 382</span> : _Tp __v2 = __binary_op1(__binary_op2(__first1[2], __first2[2]),</span>
<span id="L383"><span class="lineNum"> 383</span> : __binary_op2(__first1[3], __first2[3]));</span>
<span id="L384"><span class="lineNum"> 384</span> : _Tp __v3 = __binary_op1(__v1, __v2);</span>
<span id="L385"><span class="lineNum"> 385</span> : __init = __binary_op1(__init, __v3);</span>
<span id="L386"><span class="lineNum"> 386</span> : __first1 += 4;</span>
<span id="L387"><span class="lineNum"> 387</span> : __first2 += 4;</span>
<span id="L388"><span class="lineNum"> 388</span> : }</span>
<span id="L389"><span class="lineNum"> 389</span> : }</span>
<span id="L390"><span class="lineNum"> 390</span> : for (; __first1 != __last1; ++__first1, (void) ++__first2)</span>
<span id="L391"><span class="lineNum"> 391</span> : __init = __binary_op1(__init, __binary_op2(*__first1, *__first2));</span>
<span id="L392"><span class="lineNum"> 392</span> : return __init;</span>
<span id="L393"><span class="lineNum"> 393</span> : }</span>
<span id="L394"><span class="lineNum"> 394</span> : </span>
<span id="L395"><span class="lineNum"> 395</span> : /**</span>
<span id="L396"><span class="lineNum"> 396</span> : * @brief Combine elements from two ranges and reduce</span>
<span id="L397"><span class="lineNum"> 397</span> : *</span>
<span id="L398"><span class="lineNum"> 398</span> : * @param __first1 Start of first range.</span>
<span id="L399"><span class="lineNum"> 399</span> : * @param __last1 End of first range.</span>
<span id="L400"><span class="lineNum"> 400</span> : * @param __first2 Start of second range.</span>
<span id="L401"><span class="lineNum"> 401</span> : * @param __init Starting value to add other values to.</span>
<span id="L402"><span class="lineNum"> 402</span> : * @return The final sum.</span>
<span id="L403"><span class="lineNum"> 403</span> : *</span>
<span id="L404"><span class="lineNum"> 404</span> : * Call `first1[n]*first2[n]` for each `n` in `[0,last1-first1)` and then</span>
<span id="L405"><span class="lineNum"> 405</span> : * use addition to sum those products to a single value of type `T`.</span>
<span id="L406"><span class="lineNum"> 406</span> : *</span>
<span id="L407"><span class="lineNum"> 407</span> : * The range beginning at `first2` must contain at least `last1-first1`</span>
<span id="L408"><span class="lineNum"> 408</span> : * elements.</span>
<span id="L409"><span class="lineNum"> 409</span> : */</span>
<span id="L410"><span class="lineNum"> 410</span> : template&lt;typename _InputIterator1, typename _InputIterator2, typename _Tp&gt;</span>
<span id="L411"><span class="lineNum"> 411</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L412"><span class="lineNum"> 412</span> : inline _Tp</span>
<span id="L413"><span class="lineNum"> 413</span> : transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1,</span>
<span id="L414"><span class="lineNum"> 414</span> : _InputIterator2 __first2, _Tp __init)</span>
<span id="L415"><span class="lineNum"> 415</span> : {</span>
<span id="L416"><span class="lineNum"> 416</span> : return std::transform_reduce(__first1, __last1, __first2,</span>
<span id="L417"><span class="lineNum"> 417</span> : std::move(__init),</span>
<span id="L418"><span class="lineNum"> 418</span> : plus&lt;&gt;(), multiplies&lt;&gt;());</span>
<span id="L419"><span class="lineNum"> 419</span> : }</span>
<span id="L420"><span class="lineNum"> 420</span> : </span>
<span id="L421"><span class="lineNum"> 421</span> : /**</span>
<span id="L422"><span class="lineNum"> 422</span> : * @brief Transform the elements of a range and reduce</span>
<span id="L423"><span class="lineNum"> 423</span> : *</span>
<span id="L424"><span class="lineNum"> 424</span> : * @param __first Start of range.</span>
<span id="L425"><span class="lineNum"> 425</span> : * @param __last End of range.</span>
<span id="L426"><span class="lineNum"> 426</span> : * @param __init Starting value to add other values to.</span>
<span id="L427"><span class="lineNum"> 427</span> : * @param __binary_op The function used to perform reduction.</span>
<span id="L428"><span class="lineNum"> 428</span> : * @param __unary_op The function used to transform values from the range.</span>
<span id="L429"><span class="lineNum"> 429</span> : * @return The final sum.</span>
<span id="L430"><span class="lineNum"> 430</span> : *</span>
<span id="L431"><span class="lineNum"> 431</span> : * Call `unary_op(first[n])` for each `n` in `[0,last-first)` and then</span>
<span id="L432"><span class="lineNum"> 432</span> : * use `binary_op` to reduce the values returned by `unary_op`</span>
<span id="L433"><span class="lineNum"> 433</span> : * to a single value of type `T`.</span>
<span id="L434"><span class="lineNum"> 434</span> : */</span>
<span id="L435"><span class="lineNum"> 435</span> : template&lt;typename _InputIterator, typename _Tp,</span>
<span id="L436"><span class="lineNum"> 436</span> : typename _BinaryOperation, typename _UnaryOperation&gt;</span>
<span id="L437"><span class="lineNum"> 437</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L438"><span class="lineNum"> 438</span> : _Tp</span>
<span id="L439"><span class="lineNum"> 439</span> : transform_reduce(_InputIterator __first, _InputIterator __last, _Tp __init,</span>
<span id="L440"><span class="lineNum"> 440</span> : _BinaryOperation __binary_op, _UnaryOperation __unary_op)</span>
<span id="L441"><span class="lineNum"> 441</span> : {</span>
<span id="L442"><span class="lineNum"> 442</span> : if constexpr (__is_random_access_iter&lt;_InputIterator&gt;::value)</span>
<span id="L443"><span class="lineNum"> 443</span> : {</span>
<span id="L444"><span class="lineNum"> 444</span> : while ((__last - __first) &gt;= 4)</span>
<span id="L445"><span class="lineNum"> 445</span> : {</span>
<span id="L446"><span class="lineNum"> 446</span> : _Tp __v1 = __binary_op(__unary_op(__first[0]),</span>
<span id="L447"><span class="lineNum"> 447</span> : __unary_op(__first[1]));</span>
<span id="L448"><span class="lineNum"> 448</span> : _Tp __v2 = __binary_op(__unary_op(__first[2]),</span>
<span id="L449"><span class="lineNum"> 449</span> : __unary_op(__first[3]));</span>
<span id="L450"><span class="lineNum"> 450</span> : _Tp __v3 = __binary_op(__v1, __v2);</span>
<span id="L451"><span class="lineNum"> 451</span> : __init = __binary_op(__init, __v3);</span>
<span id="L452"><span class="lineNum"> 452</span> : __first += 4;</span>
<span id="L453"><span class="lineNum"> 453</span> : }</span>
<span id="L454"><span class="lineNum"> 454</span> : }</span>
<span id="L455"><span class="lineNum"> 455</span> : for (; __first != __last; ++__first)</span>
<span id="L456"><span class="lineNum"> 456</span> : __init = __binary_op(__init, __unary_op(*__first));</span>
<span id="L457"><span class="lineNum"> 457</span> : return __init;</span>
<span id="L458"><span class="lineNum"> 458</span> : }</span>
<span id="L459"><span class="lineNum"> 459</span> : </span>
<span id="L460"><span class="lineNum"> 460</span> : /** @brief Output the cumulative sum of one range to a second range</span>
<span id="L461"><span class="lineNum"> 461</span> : *</span>
<span id="L462"><span class="lineNum"> 462</span> : * @param __first Start of input range.</span>
<span id="L463"><span class="lineNum"> 463</span> : * @param __last End of input range.</span>
<span id="L464"><span class="lineNum"> 464</span> : * @param __result Start of output range.</span>
<span id="L465"><span class="lineNum"> 465</span> : * @param __init Initial value.</span>
<span id="L466"><span class="lineNum"> 466</span> : * @param __binary_op Function to perform summation.</span>
<span id="L467"><span class="lineNum"> 467</span> : * @return The end of the output range.</span>
<span id="L468"><span class="lineNum"> 468</span> : *</span>
<span id="L469"><span class="lineNum"> 469</span> : * Write the cumulative sum (aka prefix sum, aka scan) of the input range</span>
<span id="L470"><span class="lineNum"> 470</span> : * to the output range. Each element of the output range contains the</span>
<span id="L471"><span class="lineNum"> 471</span> : * running total of all earlier elements (and the initial value),</span>
<span id="L472"><span class="lineNum"> 472</span> : * using `binary_op` for summation.</span>
<span id="L473"><span class="lineNum"> 473</span> : *</span>
<span id="L474"><span class="lineNum"> 474</span> : * This function generates an &quot;exclusive&quot; scan, meaning the Nth element</span>
<span id="L475"><span class="lineNum"> 475</span> : * of the output range is the sum of the first N-1 input elements,</span>
<span id="L476"><span class="lineNum"> 476</span> : * so the Nth input element is not included.</span>
<span id="L477"><span class="lineNum"> 477</span> : */</span>
<span id="L478"><span class="lineNum"> 478</span> : template&lt;typename _InputIterator, typename _OutputIterator, typename _Tp,</span>
<span id="L479"><span class="lineNum"> 479</span> : typename _BinaryOperation&gt;</span>
<span id="L480"><span class="lineNum"> 480</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L481"><span class="lineNum"> 481</span> : _OutputIterator</span>
<span id="L482"><span class="lineNum"> 482</span> : exclusive_scan(_InputIterator __first, _InputIterator __last,</span>
<span id="L483"><span class="lineNum"> 483</span> : _OutputIterator __result, _Tp __init,</span>
<span id="L484"><span class="lineNum"> 484</span> : _BinaryOperation __binary_op)</span>
<span id="L485"><span class="lineNum"> 485</span> : {</span>
<span id="L486"><span class="lineNum"> 486</span> : while (__first != __last)</span>
<span id="L487"><span class="lineNum"> 487</span> : {</span>
<span id="L488"><span class="lineNum"> 488</span> : auto __v = __init;</span>
<span id="L489"><span class="lineNum"> 489</span> : __init = __binary_op(__init, *__first);</span>
<span id="L490"><span class="lineNum"> 490</span> : ++__first;</span>
<span id="L491"><span class="lineNum"> 491</span> : *__result++ = std::move(__v);</span>
<span id="L492"><span class="lineNum"> 492</span> : }</span>
<span id="L493"><span class="lineNum"> 493</span> : return __result;</span>
<span id="L494"><span class="lineNum"> 494</span> : }</span>
<span id="L495"><span class="lineNum"> 495</span> : </span>
<span id="L496"><span class="lineNum"> 496</span> : /** @brief Output the cumulative sum of one range to a second range</span>
<span id="L497"><span class="lineNum"> 497</span> : *</span>
<span id="L498"><span class="lineNum"> 498</span> : * @param __first Start of input range.</span>
<span id="L499"><span class="lineNum"> 499</span> : * @param __last End of input range.</span>
<span id="L500"><span class="lineNum"> 500</span> : * @param __result Start of output range.</span>
<span id="L501"><span class="lineNum"> 501</span> : * @param __init Initial value.</span>
<span id="L502"><span class="lineNum"> 502</span> : * @return The end of the output range.</span>
<span id="L503"><span class="lineNum"> 503</span> : *</span>
<span id="L504"><span class="lineNum"> 504</span> : * Write the cumulative sum (aka prefix sum, aka scan) of the input range</span>
<span id="L505"><span class="lineNum"> 505</span> : * to the output range. Each element of the output range contains the</span>
<span id="L506"><span class="lineNum"> 506</span> : * running total of all earlier elements (and the initial value),</span>
<span id="L507"><span class="lineNum"> 507</span> : * using `std::plus&lt;&gt;` for summation.</span>
<span id="L508"><span class="lineNum"> 508</span> : *</span>
<span id="L509"><span class="lineNum"> 509</span> : * This function generates an &quot;exclusive&quot; scan, meaning the Nth element</span>
<span id="L510"><span class="lineNum"> 510</span> : * of the output range is the sum of the first N-1 input elements,</span>
<span id="L511"><span class="lineNum"> 511</span> : * so the Nth input element is not included.</span>
<span id="L512"><span class="lineNum"> 512</span> : */</span>
<span id="L513"><span class="lineNum"> 513</span> : template&lt;typename _InputIterator, typename _OutputIterator, typename _Tp&gt;</span>
<span id="L514"><span class="lineNum"> 514</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L515"><span class="lineNum"> 515</span> : inline _OutputIterator</span>
<span id="L516"><span class="lineNum"> 516</span> : exclusive_scan(_InputIterator __first, _InputIterator __last,</span>
<span id="L517"><span class="lineNum"> 517</span> : _OutputIterator __result, _Tp __init)</span>
<span id="L518"><span class="lineNum"> 518</span> : {</span>
<span id="L519"><span class="lineNum"> 519</span> : return std::exclusive_scan(__first, __last, __result, std::move(__init),</span>
<span id="L520"><span class="lineNum"> 520</span> : plus&lt;&gt;());</span>
<span id="L521"><span class="lineNum"> 521</span> : }</span>
<span id="L522"><span class="lineNum"> 522</span> : </span>
<span id="L523"><span class="lineNum"> 523</span> : /** @brief Output the cumulative sum of one range to a second range</span>
<span id="L524"><span class="lineNum"> 524</span> : *</span>
<span id="L525"><span class="lineNum"> 525</span> : * @param __first Start of input range.</span>
<span id="L526"><span class="lineNum"> 526</span> : * @param __last End of input range.</span>
<span id="L527"><span class="lineNum"> 527</span> : * @param __result Start of output range.</span>
<span id="L528"><span class="lineNum"> 528</span> : * @param __binary_op Function to perform summation.</span>
<span id="L529"><span class="lineNum"> 529</span> : * @param __init Initial value.</span>
<span id="L530"><span class="lineNum"> 530</span> : * @return The end of the output range.</span>
<span id="L531"><span class="lineNum"> 531</span> : *</span>
<span id="L532"><span class="lineNum"> 532</span> : * Write the cumulative sum (aka prefix sum, aka scan) of the input range</span>
<span id="L533"><span class="lineNum"> 533</span> : * to the output range. Each element of the output range contains the</span>
<span id="L534"><span class="lineNum"> 534</span> : * running total of all earlier elements (and the initial value),</span>
<span id="L535"><span class="lineNum"> 535</span> : * using `binary_op` for summation.</span>
<span id="L536"><span class="lineNum"> 536</span> : *</span>
<span id="L537"><span class="lineNum"> 537</span> : * This function generates an &quot;inclusive&quot; scan, meaning the Nth element</span>
<span id="L538"><span class="lineNum"> 538</span> : * of the output range is the sum of the first N input elements,</span>
<span id="L539"><span class="lineNum"> 539</span> : * so the Nth input element is included.</span>
<span id="L540"><span class="lineNum"> 540</span> : */</span>
<span id="L541"><span class="lineNum"> 541</span> : template&lt;typename _InputIterator, typename _OutputIterator,</span>
<span id="L542"><span class="lineNum"> 542</span> : typename _BinaryOperation, typename _Tp&gt;</span>
<span id="L543"><span class="lineNum"> 543</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L544"><span class="lineNum"> 544</span> : _OutputIterator</span>
<span id="L545"><span class="lineNum"> 545</span> : inclusive_scan(_InputIterator __first, _InputIterator __last,</span>
<span id="L546"><span class="lineNum"> 546</span> : _OutputIterator __result, _BinaryOperation __binary_op,</span>
<span id="L547"><span class="lineNum"> 547</span> : _Tp __init)</span>
<span id="L548"><span class="lineNum"> 548</span> : {</span>
<span id="L549"><span class="lineNum"> 549</span> : for (; __first != __last; ++__first)</span>
<span id="L550"><span class="lineNum"> 550</span> : *__result++ = __init = __binary_op(__init, *__first);</span>
<span id="L551"><span class="lineNum"> 551</span> : return __result;</span>
<span id="L552"><span class="lineNum"> 552</span> : }</span>
<span id="L553"><span class="lineNum"> 553</span> : </span>
<span id="L554"><span class="lineNum"> 554</span> : /** @brief Output the cumulative sum of one range to a second range</span>
<span id="L555"><span class="lineNum"> 555</span> : *</span>
<span id="L556"><span class="lineNum"> 556</span> : * @param __first Start of input range.</span>
<span id="L557"><span class="lineNum"> 557</span> : * @param __last End of input range.</span>
<span id="L558"><span class="lineNum"> 558</span> : * @param __result Start of output range.</span>
<span id="L559"><span class="lineNum"> 559</span> : * @param __binary_op Function to perform summation.</span>
<span id="L560"><span class="lineNum"> 560</span> : * @return The end of the output range.</span>
<span id="L561"><span class="lineNum"> 561</span> : *</span>
<span id="L562"><span class="lineNum"> 562</span> : * Write the cumulative sum (aka prefix sum, aka scan) of the input range</span>
<span id="L563"><span class="lineNum"> 563</span> : * to the output range. Each element of the output range contains the</span>
<span id="L564"><span class="lineNum"> 564</span> : * running total of all earlier elements, using `binary_op` for summation.</span>
<span id="L565"><span class="lineNum"> 565</span> : *</span>
<span id="L566"><span class="lineNum"> 566</span> : * This function generates an &quot;inclusive&quot; scan, meaning the Nth element</span>
<span id="L567"><span class="lineNum"> 567</span> : * of the output range is the sum of the first N input elements,</span>
<span id="L568"><span class="lineNum"> 568</span> : * so the Nth input element is included.</span>
<span id="L569"><span class="lineNum"> 569</span> : */</span>
<span id="L570"><span class="lineNum"> 570</span> : template&lt;typename _InputIterator, typename _OutputIterator,</span>
<span id="L571"><span class="lineNum"> 571</span> : typename _BinaryOperation&gt;</span>
<span id="L572"><span class="lineNum"> 572</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L573"><span class="lineNum"> 573</span> : _OutputIterator</span>
<span id="L574"><span class="lineNum"> 574</span> : inclusive_scan(_InputIterator __first, _InputIterator __last,</span>
<span id="L575"><span class="lineNum"> 575</span> : _OutputIterator __result, _BinaryOperation __binary_op)</span>
<span id="L576"><span class="lineNum"> 576</span> : {</span>
<span id="L577"><span class="lineNum"> 577</span> : if (__first != __last)</span>
<span id="L578"><span class="lineNum"> 578</span> : {</span>
<span id="L579"><span class="lineNum"> 579</span> : auto __init = *__first;</span>
<span id="L580"><span class="lineNum"> 580</span> : *__result++ = __init;</span>
<span id="L581"><span class="lineNum"> 581</span> : ++__first;</span>
<span id="L582"><span class="lineNum"> 582</span> : if (__first != __last)</span>
<span id="L583"><span class="lineNum"> 583</span> : __result = std::inclusive_scan(__first, __last, __result,</span>
<span id="L584"><span class="lineNum"> 584</span> : __binary_op, std::move(__init));</span>
<span id="L585"><span class="lineNum"> 585</span> : }</span>
<span id="L586"><span class="lineNum"> 586</span> : return __result;</span>
<span id="L587"><span class="lineNum"> 587</span> : }</span>
<span id="L588"><span class="lineNum"> 588</span> : </span>
<span id="L589"><span class="lineNum"> 589</span> : /** @brief Output the cumulative sum of one range to a second range</span>
<span id="L590"><span class="lineNum"> 590</span> : *</span>
<span id="L591"><span class="lineNum"> 591</span> : * @param __first Start of input range.</span>
<span id="L592"><span class="lineNum"> 592</span> : * @param __last End of input range.</span>
<span id="L593"><span class="lineNum"> 593</span> : * @param __result Start of output range.</span>
<span id="L594"><span class="lineNum"> 594</span> : * @return The end of the output range.</span>
<span id="L595"><span class="lineNum"> 595</span> : *</span>
<span id="L596"><span class="lineNum"> 596</span> : * Write the cumulative sum (aka prefix sum, aka scan) of the input range</span>
<span id="L597"><span class="lineNum"> 597</span> : * to the output range. Each element of the output range contains the</span>
<span id="L598"><span class="lineNum"> 598</span> : * running total of all earlier elements, using `std::plus&lt;&gt;` for summation.</span>
<span id="L599"><span class="lineNum"> 599</span> : *</span>
<span id="L600"><span class="lineNum"> 600</span> : * This function generates an &quot;inclusive&quot; scan, meaning the Nth element</span>
<span id="L601"><span class="lineNum"> 601</span> : * of the output range is the sum of the first N input elements,</span>
<span id="L602"><span class="lineNum"> 602</span> : * so the Nth input element is included.</span>
<span id="L603"><span class="lineNum"> 603</span> : */</span>
<span id="L604"><span class="lineNum"> 604</span> : template&lt;typename _InputIterator, typename _OutputIterator&gt;</span>
<span id="L605"><span class="lineNum"> 605</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L606"><span class="lineNum"> 606</span> : inline _OutputIterator</span>
<span id="L607"><span class="lineNum"> 607</span> : inclusive_scan(_InputIterator __first, _InputIterator __last,</span>
<span id="L608"><span class="lineNum"> 608</span> : _OutputIterator __result)</span>
<span id="L609"><span class="lineNum"> 609</span> : { return std::inclusive_scan(__first, __last, __result, plus&lt;&gt;()); }</span>
<span id="L610"><span class="lineNum"> 610</span> : </span>
<span id="L611"><span class="lineNum"> 611</span> : /** @brief Output the cumulative sum of one range to a second range</span>
<span id="L612"><span class="lineNum"> 612</span> : *</span>
<span id="L613"><span class="lineNum"> 613</span> : * @param __first Start of input range.</span>
<span id="L614"><span class="lineNum"> 614</span> : * @param __last End of input range.</span>
<span id="L615"><span class="lineNum"> 615</span> : * @param __result Start of output range.</span>
<span id="L616"><span class="lineNum"> 616</span> : * @param __init Initial value.</span>
<span id="L617"><span class="lineNum"> 617</span> : * @param __binary_op Function to perform summation.</span>
<span id="L618"><span class="lineNum"> 618</span> : * @param __unary_op Function to transform elements of the input range.</span>
<span id="L619"><span class="lineNum"> 619</span> : * @return The end of the output range.</span>
<span id="L620"><span class="lineNum"> 620</span> : *</span>
<span id="L621"><span class="lineNum"> 621</span> : * Write the cumulative sum (aka prefix sum, aka scan) of the input range</span>
<span id="L622"><span class="lineNum"> 622</span> : * to the output range. Each element of the output range contains the</span>
<span id="L623"><span class="lineNum"> 623</span> : * running total of all earlier elements (and the initial value),</span>
<span id="L624"><span class="lineNum"> 624</span> : * using `__unary_op` to transform the input elements</span>
<span id="L625"><span class="lineNum"> 625</span> : * and using `__binary_op` for summation.</span>
<span id="L626"><span class="lineNum"> 626</span> : *</span>
<span id="L627"><span class="lineNum"> 627</span> : * This function generates an &quot;exclusive&quot; scan, meaning the Nth element</span>
<span id="L628"><span class="lineNum"> 628</span> : * of the output range is the sum of the first N-1 input elements,</span>
<span id="L629"><span class="lineNum"> 629</span> : * so the Nth input element is not included.</span>
<span id="L630"><span class="lineNum"> 630</span> : */</span>
<span id="L631"><span class="lineNum"> 631</span> : template&lt;typename _InputIterator, typename _OutputIterator, typename _Tp,</span>
<span id="L632"><span class="lineNum"> 632</span> : typename _BinaryOperation, typename _UnaryOperation&gt;</span>
<span id="L633"><span class="lineNum"> 633</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L634"><span class="lineNum"> 634</span> : _OutputIterator</span>
<span id="L635"><span class="lineNum"> 635</span> : transform_exclusive_scan(_InputIterator __first, _InputIterator __last,</span>
<span id="L636"><span class="lineNum"> 636</span> : _OutputIterator __result, _Tp __init,</span>
<span id="L637"><span class="lineNum"> 637</span> : _BinaryOperation __binary_op,</span>
<span id="L638"><span class="lineNum"> 638</span> : _UnaryOperation __unary_op)</span>
<span id="L639"><span class="lineNum"> 639</span> : {</span>
<span id="L640"><span class="lineNum"> 640</span> : while (__first != __last)</span>
<span id="L641"><span class="lineNum"> 641</span> : {</span>
<span id="L642"><span class="lineNum"> 642</span> : auto __v = __init;</span>
<span id="L643"><span class="lineNum"> 643</span> : __init = __binary_op(__init, __unary_op(*__first));</span>
<span id="L644"><span class="lineNum"> 644</span> : ++__first;</span>
<span id="L645"><span class="lineNum"> 645</span> : *__result++ = std::move(__v);</span>
<span id="L646"><span class="lineNum"> 646</span> : }</span>
<span id="L647"><span class="lineNum"> 647</span> : return __result;</span>
<span id="L648"><span class="lineNum"> 648</span> : }</span>
<span id="L649"><span class="lineNum"> 649</span> : </span>
<span id="L650"><span class="lineNum"> 650</span> : /** @brief Output the cumulative sum of one range to a second range</span>
<span id="L651"><span class="lineNum"> 651</span> : *</span>
<span id="L652"><span class="lineNum"> 652</span> : * @param __first Start of input range.</span>
<span id="L653"><span class="lineNum"> 653</span> : * @param __last End of input range.</span>
<span id="L654"><span class="lineNum"> 654</span> : * @param __result Start of output range.</span>
<span id="L655"><span class="lineNum"> 655</span> : * @param __binary_op Function to perform summation.</span>
<span id="L656"><span class="lineNum"> 656</span> : * @param __unary_op Function to transform elements of the input range.</span>
<span id="L657"><span class="lineNum"> 657</span> : * @param __init Initial value.</span>
<span id="L658"><span class="lineNum"> 658</span> : * @return The end of the output range.</span>
<span id="L659"><span class="lineNum"> 659</span> : *</span>
<span id="L660"><span class="lineNum"> 660</span> : * Write the cumulative sum (aka prefix sum, aka scan) of the input range</span>
<span id="L661"><span class="lineNum"> 661</span> : * to the output range. Each element of the output range contains the</span>
<span id="L662"><span class="lineNum"> 662</span> : * running total of all earlier elements (and the initial value),</span>
<span id="L663"><span class="lineNum"> 663</span> : * using `__unary_op` to transform the input elements</span>
<span id="L664"><span class="lineNum"> 664</span> : * and using `__binary_op` for summation.</span>
<span id="L665"><span class="lineNum"> 665</span> : *</span>
<span id="L666"><span class="lineNum"> 666</span> : * This function generates an &quot;inclusive&quot; scan, meaning the Nth element</span>
<span id="L667"><span class="lineNum"> 667</span> : * of the output range is the sum of the first N input elements,</span>
<span id="L668"><span class="lineNum"> 668</span> : * so the Nth input element is included.</span>
<span id="L669"><span class="lineNum"> 669</span> : */</span>
<span id="L670"><span class="lineNum"> 670</span> : template&lt;typename _InputIterator, typename _OutputIterator,</span>
<span id="L671"><span class="lineNum"> 671</span> : typename _BinaryOperation, typename _UnaryOperation, typename _Tp&gt;</span>
<span id="L672"><span class="lineNum"> 672</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L673"><span class="lineNum"> 673</span> : _OutputIterator</span>
<span id="L674"><span class="lineNum"> 674</span> : transform_inclusive_scan(_InputIterator __first, _InputIterator __last,</span>
<span id="L675"><span class="lineNum"> 675</span> : _OutputIterator __result,</span>
<span id="L676"><span class="lineNum"> 676</span> : _BinaryOperation __binary_op,</span>
<span id="L677"><span class="lineNum"> 677</span> : _UnaryOperation __unary_op,</span>
<span id="L678"><span class="lineNum"> 678</span> : _Tp __init)</span>
<span id="L679"><span class="lineNum"> 679</span> : {</span>
<span id="L680"><span class="lineNum"> 680</span> : for (; __first != __last; ++__first)</span>
<span id="L681"><span class="lineNum"> 681</span> : *__result++ = __init = __binary_op(__init, __unary_op(*__first));</span>
<span id="L682"><span class="lineNum"> 682</span> : return __result;</span>
<span id="L683"><span class="lineNum"> 683</span> : }</span>
<span id="L684"><span class="lineNum"> 684</span> : </span>
<span id="L685"><span class="lineNum"> 685</span> : /** @brief Output the cumulative sum of one range to a second range</span>
<span id="L686"><span class="lineNum"> 686</span> : *</span>
<span id="L687"><span class="lineNum"> 687</span> : * @param __first Start of input range.</span>
<span id="L688"><span class="lineNum"> 688</span> : * @param __last End of input range.</span>
<span id="L689"><span class="lineNum"> 689</span> : * @param __result Start of output range.</span>
<span id="L690"><span class="lineNum"> 690</span> : * @param __binary_op Function to perform summation.</span>
<span id="L691"><span class="lineNum"> 691</span> : * @param __unary_op Function to transform elements of the input range.</span>
<span id="L692"><span class="lineNum"> 692</span> : * @return The end of the output range.</span>
<span id="L693"><span class="lineNum"> 693</span> : *</span>
<span id="L694"><span class="lineNum"> 694</span> : * Write the cumulative sum (aka prefix sum, aka scan) of the input range</span>
<span id="L695"><span class="lineNum"> 695</span> : * to the output range. Each element of the output range contains the</span>
<span id="L696"><span class="lineNum"> 696</span> : * running total of all earlier elements,</span>
<span id="L697"><span class="lineNum"> 697</span> : * using `__unary_op` to transform the input elements</span>
<span id="L698"><span class="lineNum"> 698</span> : * and using `__binary_op` for summation.</span>
<span id="L699"><span class="lineNum"> 699</span> : *</span>
<span id="L700"><span class="lineNum"> 700</span> : * This function generates an &quot;inclusive&quot; scan, meaning the Nth element</span>
<span id="L701"><span class="lineNum"> 701</span> : * of the output range is the sum of the first N input elements,</span>
<span id="L702"><span class="lineNum"> 702</span> : * so the Nth input element is included.</span>
<span id="L703"><span class="lineNum"> 703</span> : */</span>
<span id="L704"><span class="lineNum"> 704</span> : template&lt;typename _InputIterator, typename _OutputIterator,</span>
<span id="L705"><span class="lineNum"> 705</span> : typename _BinaryOperation, typename _UnaryOperation&gt;</span>
<span id="L706"><span class="lineNum"> 706</span> : _GLIBCXX20_CONSTEXPR</span>
<span id="L707"><span class="lineNum"> 707</span> : _OutputIterator</span>
<span id="L708"><span class="lineNum"> 708</span> : transform_inclusive_scan(_InputIterator __first, _InputIterator __last,</span>
<span id="L709"><span class="lineNum"> 709</span> : _OutputIterator __result,</span>
<span id="L710"><span class="lineNum"> 710</span> : _BinaryOperation __binary_op,</span>
<span id="L711"><span class="lineNum"> 711</span> : _UnaryOperation __unary_op)</span>
<span id="L712"><span class="lineNum"> 712</span> : {</span>
<span id="L713"><span class="lineNum"> 713</span> : if (__first != __last)</span>
<span id="L714"><span class="lineNum"> 714</span> : {</span>
<span id="L715"><span class="lineNum"> 715</span> : auto __init = __unary_op(*__first);</span>
<span id="L716"><span class="lineNum"> 716</span> : *__result++ = __init;</span>
<span id="L717"><span class="lineNum"> 717</span> : ++__first;</span>
<span id="L718"><span class="lineNum"> 718</span> : if (__first != __last)</span>
<span id="L719"><span class="lineNum"> 719</span> : __result = std::transform_inclusive_scan(__first, __last, __result,</span>
<span id="L720"><span class="lineNum"> 720</span> : __binary_op, __unary_op,</span>
<span id="L721"><span class="lineNum"> 721</span> : std::move(__init));</span>
<span id="L722"><span class="lineNum"> 722</span> : }</span>
<span id="L723"><span class="lineNum"> 723</span> : return __result;</span>
<span id="L724"><span class="lineNum"> 724</span> : }</span>
<span id="L725"><span class="lineNum"> 725</span> : </span>
<span id="L726"><span class="lineNum"> 726</span> : /// @} group numeric_ops</span>
<span id="L727"><span class="lineNum"> 727</span> : #endif // C++17</span>
<span id="L728"><span class="lineNum"> 728</span> : </span>
<span id="L729"><span class="lineNum"> 729</span> : _GLIBCXX_END_NAMESPACE_VERSION</span>
<span id="L730"><span class="lineNum"> 730</span> : } // namespace std</span>
<span id="L731"><span class="lineNum"> 731</span> : </span>
<span id="L732"><span class="lineNum"> 732</span> : #if __cplusplus &gt;= 201703L &amp;&amp; _GLIBCXX_HOSTED</span>
<span id="L733"><span class="lineNum"> 733</span> : // Parallel STL algorithms</span>
<span id="L734"><span class="lineNum"> 734</span> : # if _PSTL_EXECUTION_POLICIES_DEFINED</span>
<span id="L735"><span class="lineNum"> 735</span> : // If &lt;execution&gt; has already been included, pull in implementations</span>
<span id="L736"><span class="lineNum"> 736</span> : # include &lt;pstl/glue_numeric_impl.h&gt;</span>
<span id="L737"><span class="lineNum"> 737</span> : # else</span>
<span id="L738"><span class="lineNum"> 738</span> : // Otherwise just pull in forward declarations</span>
<span id="L739"><span class="lineNum"> 739</span> : # include &lt;pstl/glue_numeric_defs.h&gt;</span>
<span id="L740"><span class="lineNum"> 740</span> : # define _PSTL_NUMERIC_FORWARD_DECLARED 1</span>
<span id="L741"><span class="lineNum"> 741</span> : # endif</span>
<span id="L742"><span class="lineNum"> 742</span> : </span>
<span id="L743"><span class="lineNum"> 743</span> : // Feature test macro for parallel algorithms</span>
<span id="L744"><span class="lineNum"> 744</span> : # define __cpp_lib_parallel_algorithm 201603L</span>
<span id="L745"><span class="lineNum"> 745</span> : #endif // C++17</span>
<span id="L746"><span class="lineNum"> 746</span> : </span>
<span id="L747"><span class="lineNum"> 747</span> : #endif /* _GLIBCXX_NUMERIC */</span>
</pre>
</td>
</tr>
</table>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
</table>
<br>
</body>
</html>