mirror of
https://github.com/boostorg/endian.git
synced 2025-08-01 13:34:39 +02:00
Merge from Master
This commit is contained in:
69
index.html
69
index.html
@@ -259,10 +259,10 @@ big_endian(x);
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>There will be no performance difference between the two approaches,
|
||||
regardless of the native endianness of the machine. Optimizing compilers will likely
|
||||
<p><b>There will be no performance difference between the two approaches,
|
||||
regardless of the native endianness of the machine.</b> Optimizing compilers will likely
|
||||
generate exactly the same code for both. That conclusion was confirmed by
|
||||
studying the generated assembly code.</p>
|
||||
studying the generated assembly code for GCC and Visual C++.</p>
|
||||
|
||||
<p>Now consider a slightly different problem: </p>
|
||||
|
||||
@@ -377,55 +377,42 @@ setup.
|
||||
<td align="center"><b>Endian<br>type</b></td>
|
||||
<td align="center"><b>Endian<br>conversion<br>function</b></td>
|
||||
</tr>
|
||||
<tr><td>16-bit aligned big endian</td><td align="right">2.18 s</td><td align="right">0.83 s</td></tr>
|
||||
<tr><td>16-bit aligned little endian</td><td align="right">0.81 s</td><td align="right">0.83 s</td></tr>
|
||||
<tr><td>16-bit unaligned big endian</td><td align="right">1.64 s</td><td align="right">0.83 s</td></tr>
|
||||
<tr><td>16-bit unaligned little endian</td><td align="right">1.64 s</td><td align="right">0.83 s</td></tr>
|
||||
<tr><td>32-bit aligned big endian</td><td align="right">0.83 s</td><td align="right">0.81 s</td></tr>
|
||||
<tr><td>32-bit aligned little endian</td><td align="right">0.83 s</td><td align="right">0.81 s</td></tr>
|
||||
<tr><td>32-bit unaligned big endian</td><td align="right">3.01 s</td><td align="right">0.83 s</td></tr>
|
||||
<tr><td>32-bit unaligned little endian</td><td align="right">3.01 s</td><td align="right">0.81 s</td></tr>
|
||||
<tr><td>64-bit aligned big endian</td><td align="right">1.09 s</td><td align="right">1.05 s</td></tr>
|
||||
<tr><td>64-bit aligned little endian</td><td align="right">0.83 s</td><td align="right">1.03 s</td></tr>
|
||||
<tr><td>64-bit unaligned big endian</td><td align="right">12.64 s</td><td align="right">1.01 s</td></tr>
|
||||
<tr><td>64-bit unaligned little endian</td><td align="right">8.41 s</td><td align="right">0.83 s</td></tr>
|
||||
<tr><td>16-bit aligned big endian</td><td align="right">0.83 s</td><td align="right">0.51 s</td></tr>
|
||||
<tr><td>16-bit aligned little endian</td><td align="right">0.51 s</td><td align="right">0.50 s</td></tr>
|
||||
<tr><td>16-bit unaligned big endian</td><td align="right">1.37 s</td><td align="right">0.51 s</td></tr>
|
||||
<tr><td>16-bit unaligned little endian</td><td align="right">1.37 s</td><td align="right">0.50 s</td></tr>
|
||||
<tr><td>32-bit aligned big endian</td><td align="right" bgcolor="#CCFFCC">0.81 s</td><td align="right">0.50 s</td></tr>
|
||||
<tr><td>32-bit aligned little endian</td><td align="right">0.51 s</td><td align="right">0.51 s</td></tr>
|
||||
<tr><td>32-bit unaligned big endian</td><td align="right">2.98 s</td><td align="right">0.53 s</td></tr>
|
||||
<tr><td>32-bit unaligned little endian</td><td align="right">3.00 s</td><td align="right">0.51 s</td></tr>
|
||||
<tr><td>64-bit aligned big endian</td><td align="right" bgcolor="#CCFFCC">1.33 s</td><td align="right">0.33 s</td></tr>
|
||||
<tr><td>64-bit aligned little endian</td><td align="right">0.34 s</td><td align="right">0.27 s</td></tr>
|
||||
<tr><td>64-bit unaligned big endian</td><td align="right">7.05 s</td><td align="right">0.33 s</td></tr>
|
||||
<tr><td>64-bit unaligned little endian</td><td align="right">7.11 s</td><td align="right">0.31 s</td></tr>
|
||||
|
||||
<tr><td colspan="6" align="center"><b> Iterations: 1000000000, Intrinsics: no byte swap intrinsics</b></td></tr>
|
||||
<tr><td><b>Test Case</b></td>
|
||||
<td align="center"><b>Endian<br>type</b></td>
|
||||
<td align="center"><b>Endian<br>conversion<br>function</b></td>
|
||||
</tr>
|
||||
<tr><td>16-bit aligned big endian</td><td align="right">0.84 s</td><td align="right">0.81 s</td></tr>
|
||||
<tr><td>16-bit aligned little endian</td><td align="right">0.83 s</td><td align="right">0.81 s</td></tr>
|
||||
<tr><td>16-bit unaligned big endian</td><td align="right">1.65 s</td><td align="right">0.81 s</td></tr>
|
||||
<tr><td>16-bit unaligned little endian</td><td align="right">1.65 s</td><td align="right">0.83 s</td></tr>
|
||||
<tr><td>32-bit aligned big endian</td><td align="right">3.46 s</td><td align="right">0.83 s</td></tr>
|
||||
<tr><td>32-bit aligned little endian</td><td align="right">0.81 s</td><td align="right">0.83 s</td></tr>
|
||||
<tr><td>32-bit unaligned big endian</td><td align="right">3.01 s</td><td align="right">0.81 s</td></tr>
|
||||
<tr><td>32-bit unaligned little endian</td><td align="right">3.01 s</td><td align="right">0.81 s</td></tr>
|
||||
<tr><td>64-bit aligned big endian</td><td align="right">10.50 s</td><td align="right">0.83 s</td></tr>
|
||||
<tr><td>64-bit aligned little endian</td><td align="right">0.83 s</td><td align="right">0.97 s</td></tr>
|
||||
<tr><td>64-bit unaligned big endian</td><td align="right">12.62 s</td><td align="right">0.81 s</td></tr>
|
||||
<tr><td>64-bit unaligned little endian</td><td align="right">8.42 s</td><td align="right">0.81 s</td></tr>
|
||||
<tr><td>16-bit aligned big endian</td><td align="right">0.83 s</td><td align="right">0.51 s</td></tr>
|
||||
<tr><td>16-bit aligned little endian</td><td align="right">0.51 s</td><td align="right">0.51 s</td></tr>
|
||||
<tr><td>16-bit unaligned big endian</td><td align="right">1.36 s</td><td align="right">0.51 s</td></tr>
|
||||
<tr><td>16-bit unaligned little endian</td><td align="right">1.37 s</td><td align="right">0.51 s</td></tr>
|
||||
<tr><td>32-bit aligned big endian</td><td align="right" bgcolor="#FFCACA">3.42 s</td><td align="right">0.50 s</td></tr>
|
||||
<tr><td>32-bit aligned little endian</td><td align="right">0.51 s</td><td align="right">0.51 s</td></tr>
|
||||
<tr><td>32-bit unaligned big endian</td><td align="right">2.93 s</td><td align="right">0.50 s</td></tr>
|
||||
<tr><td>32-bit unaligned little endian</td><td align="right">2.95 s</td><td align="right">0.50 s</td></tr>
|
||||
<tr><td>64-bit aligned big endian</td><td align="right" bgcolor="#FFCACA">5.99 s</td><td align="right">0.33 s</td></tr>
|
||||
<tr><td>64-bit aligned little endian</td><td align="right">0.33 s</td><td align="right">0.33 s</td></tr>
|
||||
<tr><td>64-bit unaligned big endian</td><td align="right">7.02 s</td><td align="right">0.27 s</td></tr>
|
||||
<tr><td>64-bit unaligned little endian</td><td align="right">7.02 s</td><td align="right">0.27 s</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<h3><a name="Conclusions">Conclusions</a></h3>
|
||||
|
||||
<p>When program logic dictates the same number of conversions for both Endian
|
||||
integer approach and Endian conversion function approach (<a href="#Example-1">example
|
||||
1</a>):</p>
|
||||
|
||||
<blockquote>
|
||||
|
||||
<p><b>There will be no performance difference between the two approaches,
|
||||
regardless of the native endianness of the machine.</b> Optimizing compilers will likely
|
||||
generate exactly the same code for both. This conclusion was confirmed by
|
||||
studying the generated assembly code.</p>
|
||||
|
||||
</blockquote>
|
||||
|
||||
<p>When program logic dictates many more conversions for the Endian integer
|
||||
approach than the Endian conversion function approach (<a href="#Example-2">example
|
||||
2</a>):</p>
|
||||
@@ -587,7 +574,7 @@ Tim Blechmann, Tim Moore, tymofey, Tomas Puverle, Vincente Botet, Yuval Ronen
|
||||
and Vitaly Budovski,.</p>
|
||||
<hr>
|
||||
<p>Last revised:
|
||||
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->28 May, 2013<!--webbot bot="Timestamp" endspan i-checksum="13992" --></p>
|
||||
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->30 May, 2013<!--webbot bot="Timestamp" endspan i-checksum="13977" --></p>
|
||||
<p>© Copyright Beman Dawes, 2011, 2013</p>
|
||||
<p>Distributed under the Boost Software License, Version 1.0. See
|
||||
<a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/ LICENSE_1_0.txt</a></p>
|
||||
|
275
types.html
275
types.html
@@ -227,98 +227,98 @@ conventions for common use cases:</p>
|
||||
<td width="49%" align="center"><b><i>Alignment</i></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>big_int</code><i><b>n</b></i><code>_t</code></td>
|
||||
<td width="18%"><code>big_align_int</code><i><b>n</b></i><code>_t</code></td>
|
||||
<td width="10%" align="center"><code>big</code></td>
|
||||
<td width="10%" align="center">signed</td>
|
||||
<td width="15%">16,32,64</td>
|
||||
<td width="49%" align="center"><code>yes</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>big_uint</code><i><b>n</b></i><code>_t</code></td>
|
||||
<td width="18%"><code>big_align_uint</code><i><b>n</b></i><code>_t</code></td>
|
||||
<td width="10%" align="center"><code>big</code></td>
|
||||
<td width="10%" align="center">unsigned</td>
|
||||
<td width="15%">16,32,64</td>
|
||||
<td width="49%" align="center"><code>yes</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>big_align_float</code><i><b>n</b></i><code>_t</code></td>
|
||||
<td width="10%" align="center"><code>big</code></td>
|
||||
<td width="10%" align="center">signed</td>
|
||||
<td width="15%">32,64</td>
|
||||
<td width="49%" align="center"><code>yes</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>little_align_int</code><i><b>n</b></i><code>_t</code></td>
|
||||
<td width="10%" align="center"><code>little</code></td>
|
||||
<td width="10%" align="center">signed</td>
|
||||
<td width="15%">16,32,64</td>
|
||||
<td width="49%" align="center"><code>yes</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>little_align_uint</code><i><b>n</b></i><code>_t</code></td>
|
||||
<td width="10%" align="center"><code>little</code></td>
|
||||
<td width="10%" align="center">unsigned</td>
|
||||
<td width="15%">16,32,64</td>
|
||||
<td width="49%" align="center"><code>yes</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>little_align_float</code><i><b>n</b></i><code>_t</code></td>
|
||||
<td width="10%" align="center"><code>little</code></td>
|
||||
<td width="10%" align="center">signed</td>
|
||||
<td width="15%">32,64</td>
|
||||
<td width="49%" align="center"><code>yes</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>big_int</code><b><i>n</i></b><code>_t</code></td>
|
||||
<td width="10%" align="center"><code>big</code></td>
|
||||
<td width="10%" align="center">signed</td>
|
||||
<td width="15%">8,16,24,32,40,48,56,64</td>
|
||||
<td width="49%" align="center"><code>no</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>big_uint</code><i><b>n</b></i><code>_</code><code>t</code></td>
|
||||
<td width="10%" align="center"><code>big</code></td>
|
||||
<td width="10%" align="center">unsigned</td>
|
||||
<td width="15%">8,16,24,32,40,48,56,64</td>
|
||||
<td width="49%" align="center"><code>no</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>big_float</code><i><b>n</b></i><code>_t</code></td>
|
||||
<td width="10%" align="center"><code>big</code></td>
|
||||
<td width="10%" align="center">signed</td>
|
||||
<td width="15%">32,64</td>
|
||||
<td width="49%" align="center"><code>yes</code></td>
|
||||
<td width="49%" align="center"><code>no</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>little_int</code><i><b>n</b></i><code>_t</code></td>
|
||||
<td width="18%"><code>little_int</code><i><b>n</b></i><code>_</code><code>t</code></td>
|
||||
<td width="10%" align="center"><code>little</code></td>
|
||||
<td width="10%" align="center">signed</td>
|
||||
<td width="15%">16,32,64</td>
|
||||
<td width="49%" align="center"><code>yes</code></td>
|
||||
<td width="15%">8,16,24,32,40,48,56,64</td>
|
||||
<td width="49%" align="center"><code>no</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>little_uint</code><i><b>n</b></i><code>_t</code></td>
|
||||
<td width="18%"><code>little_uint</code><i><b>n</b></i><code>_</code><code>t</code></td>
|
||||
<td width="10%" align="center"><code>little</code></td>
|
||||
<td width="10%" align="center">unsigned</td>
|
||||
<td width="15%">16,32,64</td>
|
||||
<td width="49%" align="center"><code>yes</code></td>
|
||||
<td width="15%">8,16,24,32,40,48,56,64</td>
|
||||
<td width="49%" align="center"><code>no</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>little_float</code><i><b>n</b></i><code>_t</code></td>
|
||||
<td width="10%" align="center"><code>little</code></td>
|
||||
<td width="10%" align="center">signed</td>
|
||||
<td width="15%">32,64</td>
|
||||
<td width="49%" align="center"><code>yes</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>big_int</code><b><i>n</i></b><code>un_t</code></td>
|
||||
<td width="10%" align="center"><code>big</code></td>
|
||||
<td width="10%" align="center">signed</td>
|
||||
<td width="15%">8,16,24,32,40,48,56,64</td>
|
||||
<td width="49%" align="center"><code>no</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>big_uint</code><i><b>n</b></i><code>un_</code><code>t</code></td>
|
||||
<td width="10%" align="center"><code>big</code></td>
|
||||
<td width="10%" align="center">unsigned</td>
|
||||
<td width="15%">8,16,24,32,40,48,56,64</td>
|
||||
<td width="49%" align="center"><code>no</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>big_float</code><i><b>n</b></i><code>un_t</code></td>
|
||||
<td width="10%" align="center"><code>big</code></td>
|
||||
<td width="10%" align="center">signed</td>
|
||||
<td width="15%">32,64</td>
|
||||
<td width="49%" align="center"><code>no</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>little_int</code><i><b>n</b></i><code>un_</code><code>t</code></td>
|
||||
<td width="10%" align="center"><code>little</code></td>
|
||||
<td width="10%" align="center">signed</td>
|
||||
<td width="15%">8,16,24,32,40,48,56,64</td>
|
||||
<td width="49%" align="center"><code>no</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>little_uint</code><i><b>n</b></i><code>un_</code><code>t</code></td>
|
||||
<td width="10%" align="center"><code>little</code></td>
|
||||
<td width="10%" align="center">unsigned</td>
|
||||
<td width="15%">8,16,24,32,40,48,56,64</td>
|
||||
<td width="49%" align="center"><code>no</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>little_float</code><i><b>n</b></i><code>un_t</code></td>
|
||||
<td width="10%" align="center"><code>little</code></td>
|
||||
<td width="10%" align="center">signed</td>
|
||||
<td width="15%">32,64</td>
|
||||
<td width="49%" align="center"><code>no</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>native_int</code><i><b>n</b></i><code>un_</code><code>t</code></td>
|
||||
<td width="18%"><code>native_int</code><i><b>n</b></i><code>_</code><code>t</code></td>
|
||||
<td width="10%" align="center"><code>native</code></td>
|
||||
<td width="10%" align="center">signed</td>
|
||||
<td width="15%">8,16,24,32,40,48,56,64</td>
|
||||
<td width="49%" align="center"><code>no</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="18%"><code>native_uint</code><i><b>n</b></i><code>un_</code><code>t</code></td>
|
||||
<td width="18%"><code>native_uint</code><i><b>n</b></i><code>_</code><code>t</code></td>
|
||||
<td width="10%" align="center"><code>native</code></td>
|
||||
<td width="10%" align="center">unsigned</td>
|
||||
<td width="15%">8,16,24,32,40,48,56,64</td>
|
||||
@@ -332,8 +332,9 @@ memory, files, and network transmissions. </p>
|
||||
<p><font color="#FF0000"><b><i><span style="background-color: #FFFFFF">Warning:</span></i></b></font><span style="background-color: #FFFFFF">
|
||||
Code that uses a</span>ligned types is possibly non-portable because alignment
|
||||
requirements vary between hardware architectures and because alignment may be
|
||||
affected by compiler switches or pragmas. Furthermore, aligned types
|
||||
are only available on architectures with 16, 32, and 64-bit integer types.</p>
|
||||
affected by compiler switches or pragmas. For example, alignment of an 64-bit
|
||||
integer may be to a 32-bit boundary on a 32-bit machine. Furthermore, aligned types
|
||||
are only available on architectures with 16, 32, and 64-bit integer types. </p>
|
||||
<p><b><i>Note:</i></b> One-byte types
|
||||
have identical
|
||||
functionality. They are provided to improve code readability and searchability.</p>
|
||||
@@ -386,103 +387,103 @@ usual operations on integers are supplied.</p>
|
||||
endian operator--(endian& x, int) noexcept;
|
||||
};
|
||||
|
||||
typedef endian<order::big, float, 32, align::yes> big_float32_t;
|
||||
typedef endian<order::big, double, 64, align::yes> big_float64_t;
|
||||
|
||||
// aligned little endian floating point types
|
||||
typedef endian<order::little, float, 32, align::yes> little_float32_t;
|
||||
typedef endian<order::little, double, 64, align::yes> little_float64_t;
|
||||
|
||||
// unaligned big endian floating point types
|
||||
typedef endian<order::big, float, 32, align::no> big_float32un_t;
|
||||
typedef endian<order::big, double, 64, align::no> big_float64un_t;
|
||||
typedef endian<order::big, float, 32, align::yes> big_align_float32_t;
|
||||
typedef endian<order::big, double, 64, align::yes> big_align_float64_t;
|
||||
|
||||
// aligned little endian floating point types
|
||||
typedef endian<order::little, float, 32, align::yes> little_align_float32_t;
|
||||
typedef endian<order::little, double, 64, align::yes> little_align_float64_t;
|
||||
|
||||
// unaligned big endian floating point types
|
||||
typedef endian<order::big, float, 32, align::no> big_float32un_t;
|
||||
typedef endian<order::big, double, 64, align::no> big_float64un_t;
|
||||
|
||||
// unaligned little endian floating point types
|
||||
typedef endian<order::little, float, 32, align::no> little_float32un_t;
|
||||
typedef endian<order::little, double, 64, align::no> little_float64un_t;
|
||||
typedef endian<order::little, float, 32, align::no> little_float32un_t;
|
||||
typedef endian<order::little, double, 64, align::no> little_float64un_t;
|
||||
|
||||
// aligned big endian signed integer types
|
||||
typedef endian<order::big, int16_t, 16, align::yes> big_int16_t;
|
||||
typedef endian<order::big, int32_t, 32, align::yes> big_int32_t;
|
||||
typedef endian<order::big, int64_t, 64, align::yes> big_int64_t;
|
||||
|
||||
// aligned big endian unsigned integer types
|
||||
typedef endian<order::big, uint16_t, 16, align::yes> big_uint16_t;
|
||||
typedef endian<order::big, uint32_t, 32, align::yes> big_uint32_t;
|
||||
typedef endian<order::big, uint64_t, 64, align::yes> big_uint64_t;
|
||||
|
||||
// aligned little endian signed integer types
|
||||
typedef endian<order::little, int16_t, 16, align::yes> little_int16_t;
|
||||
typedef endian<order::little, int32_t, 32, align::yes> little_int32_t;
|
||||
typedef endian<order::little, int64_t, 64, align::yes> little_int64_t;
|
||||
|
||||
// aligned little endian unsigned integer types
|
||||
typedef endian<order::little, uint16_t, 16, align::yes> little_uint16_t;
|
||||
typedef endian<order::little, uint32_t, 32, align::yes> little_uint32_t;
|
||||
typedef endian<order::little, uint64_t, 64, align::yes> little_uint64_t;
|
||||
|
||||
// aligned native endian typedefs are not provided because
|
||||
// <cstdint> types are superior for this use case
|
||||
typedef endian<order::big, int16_t, 16, align::yes> big_align_int16_t;
|
||||
typedef endian<order::big, int32_t, 32, align::yes> big_align_int32_t;
|
||||
typedef endian<order::big, int64_t, 64, align::yes> big_align_int64_t;
|
||||
|
||||
// aligned big endian unsigned integer types
|
||||
typedef endian<order::big, uint16_t, 16, align::yes> big_align_uint16_t;
|
||||
typedef endian<order::big, uint32_t, 32, align::yes> big_align_uint32_t;
|
||||
typedef endian<order::big, uint64_t, 64, align::yes> big_align_uint64_t;
|
||||
|
||||
// aligned little endian signed integer types
|
||||
typedef endian<order::little, int16_t, 16, align::yes> little_align_int16_t;
|
||||
typedef endian<order::little, int32_t, 32, align::yes> little_align_int32_t;
|
||||
typedef endian<order::little, int64_t, 64, align::yes> little_align_int64_t;
|
||||
|
||||
// aligned little endian unsigned integer types
|
||||
typedef endian<order::little, uint16_t, 16, align::yes> little_align_uint16_t;
|
||||
typedef endian<order::little, uint32_t, 32, align::yes> little_align_uint32_t;
|
||||
typedef endian<order::little, uint64_t, 64, align::yes> little_align_uint64_t;
|
||||
|
||||
// aligned native endian typedefs are not provided because
|
||||
// <cstdint> types are superior for this use case
|
||||
|
||||
// unaligned big endian signed integer types
|
||||
typedef endian<order::big, int_least8_t, 8> big_int8un_t;
|
||||
typedef endian<order::big, int_least16_t, 16> big_int16un_t;
|
||||
typedef endian<order::big, int_least32_t, 24> big_int24un_t;
|
||||
typedef endian<order::big, int_least32_t, 32> big_int32un_t;
|
||||
typedef endian<order::big, int_least64_t, 40> big_int40un_t;
|
||||
typedef endian<order::big, int_least64_t, 48> big_int48un_t;
|
||||
typedef endian<order::big, int_least64_t, 56> big_int56un_t;
|
||||
typedef endian<order::big, int_least64_t, 64> big_int64un_t;
|
||||
typedef endian<order::big, int_least8_t, 8> big_int8_t;
|
||||
typedef endian<order::big, int_least16_t, 16> big_int16_t;
|
||||
typedef endian<order::big, int_least32_t, 24> big_int24_t;
|
||||
typedef endian<order::big, int_least32_t, 32> big_int32_t;
|
||||
typedef endian<order::big, int_least64_t, 40> big_int40_t;
|
||||
typedef endian<order::big, int_least64_t, 48> big_int48_t;
|
||||
typedef endian<order::big, int_least64_t, 56> big_int56_t;
|
||||
typedef endian<order::big, int_least64_t, 64> big_int64_t;
|
||||
|
||||
// unaligned big endian unsigned integer types
|
||||
typedef endian<order::big, uint_least8_t, 8> big_uint8un_t;
|
||||
typedef endian<order::big, uint_least16_t, 16> big_uint16un_t;
|
||||
typedef endian<order::big, uint_least32_t, 24> big_uint24un_t;
|
||||
typedef endian<order::big, uint_least32_t, 32> big_uint32un_t;
|
||||
typedef endian<order::big, uint_least64_t, 40> big_uint40un_t;
|
||||
typedef endian<order::big, uint_least64_t, 48> big_uint48un_t;
|
||||
typedef endian<order::big, uint_least64_t, 56> big_uint56un_t;
|
||||
typedef endian<order::big, uint_least64_t, 64> big_uint64un_t;
|
||||
typedef endian<order::big, uint_least8_t, 8> big_uint8_t;
|
||||
typedef endian<order::big, uint_least16_t, 16> big_uint16_t;
|
||||
typedef endian<order::big, uint_least32_t, 24> big_uint24_t;
|
||||
typedef endian<order::big, uint_least32_t, 32> big_uint32_t;
|
||||
typedef endian<order::big, uint_least64_t, 40> big_uint40_t;
|
||||
typedef endian<order::big, uint_least64_t, 48> big_uint48_t;
|
||||
typedef endian<order::big, uint_least64_t, 56> big_uint56_t;
|
||||
typedef endian<order::big, uint_least64_t, 64> big_uint64_t;
|
||||
|
||||
// unaligned little endian signed integer types
|
||||
typedef endian<order::little, int_least8_t, 8> little_int8un_t;
|
||||
typedef endian<order::little, int_least16_t, 16> little_int16un_t;
|
||||
typedef endian<order::little, int_least32_t, 24> little_int24un_t;
|
||||
typedef endian<order::little, int_least32_t, 32> little_int32un_t;
|
||||
typedef endian<order::little, int_least64_t, 40> little_int40un_t;
|
||||
typedef endian<order::little, int_least64_t, 48> little_int48un_t;
|
||||
typedef endian<order::little, int_least64_t, 56> little_int56un_t;
|
||||
typedef endian<order::little, int_least64_t, 64> little_int64un_t;
|
||||
typedef endian<order::little, int_least8_t, 8> little_int8_t;
|
||||
typedef endian<order::little, int_least16_t, 16> little_int16_t;
|
||||
typedef endian<order::little, int_least32_t, 24> little_int24_t;
|
||||
typedef endian<order::little, int_least32_t, 32> little_int32_t;
|
||||
typedef endian<order::little, int_least64_t, 40> little_int40_t;
|
||||
typedef endian<order::little, int_least64_t, 48> little_int48_t;
|
||||
typedef endian<order::little, int_least64_t, 56> little_int56_t;
|
||||
typedef endian<order::little, int_least64_t, 64> little_int64_t;
|
||||
|
||||
// unaligned little endian unsigned integer types
|
||||
typedef endian<order::little, uint_least8_t, 8> little_uint8un_t;
|
||||
typedef endian<order::little, uint_least16_t, 16> little_uint16un_t;
|
||||
typedef endian<order::little, uint_least32_t, 24> little_uint24un_t;
|
||||
typedef endian<order::little, uint_least32_t, 32> little_uint32un_t;
|
||||
typedef endian<order::little, uint_least64_t, 40> little_uint40un_t;
|
||||
typedef endian<order::little, uint_least64_t, 48> little_uint48un_t;
|
||||
typedef endian<order::little, uint_least64_t, 56> little_uint56un_t;
|
||||
typedef endian<order::little, uint_least64_t, 64> little_uint64un_t;
|
||||
typedef endian<order::little, uint_least8_t, 8> little_uint8_t;
|
||||
typedef endian<order::little, uint_least16_t, 16> little_uint16_t;
|
||||
typedef endian<order::little, uint_least32_t, 24> little_uint24_t;
|
||||
typedef endian<order::little, uint_least32_t, 32> little_uint32_t;
|
||||
typedef endian<order::little, uint_least64_t, 40> little_uint40_t;
|
||||
typedef endian<order::little, uint_least64_t, 48> little_uint48_t;
|
||||
typedef endian<order::little, uint_least64_t, 56> little_uint56_t;
|
||||
typedef endian<order::little, uint_least64_t, 64> little_uint64_t;
|
||||
|
||||
// unaligned native endian signed integer types
|
||||
typedef endian<order::native, int_least8_t, 8> native_int8un_t;
|
||||
typedef endian<order::native, int_least16_t, 16> native_int16un_t;
|
||||
typedef endian<order::native, int_least32_t, 24> native_int24un_t;
|
||||
typedef endian<order::native, int_least32_t, 32> native_int32un_t;
|
||||
typedef endian<order::native, int_least64_t, 40> native_int40un_t;
|
||||
typedef endian<order::native, int_least64_t, 48> native_int48un_t;
|
||||
typedef endian<order::native, int_least64_t, 56> native_int56un_t;
|
||||
typedef endian<order::native, int_least64_t, 64> native_int64un_t;
|
||||
typedef endian<order::native, int_least8_t, 8> native_int8_t;
|
||||
typedef endian<order::native, int_least16_t, 16> native_int16_t;
|
||||
typedef endian<order::native, int_least32_t, 24> native_int24_t;
|
||||
typedef endian<order::native, int_least32_t, 32> native_int32_t;
|
||||
typedef endian<order::native, int_least64_t, 40> native_int40_t;
|
||||
typedef endian<order::native, int_least64_t, 48> native_int48_t;
|
||||
typedef endian<order::native, int_least64_t, 56> native_int56_t;
|
||||
typedef endian<order::native, int_least64_t, 64> native_int64_t;
|
||||
|
||||
// unaligned native endian unsigned integer types
|
||||
typedef endian<order::native, uint_least8_t, 8> native_uint8un_t;
|
||||
typedef endian<order::native, uint_least16_t, 16> native_uint16un_t;
|
||||
typedef endian<order::native, uint_least32_t, 24> native_uint24un_t;
|
||||
typedef endian<order::native, uint_least32_t, 32> native_uint32un_t;
|
||||
typedef endian<order::native, uint_least64_t, 40> native_uint40un_t;
|
||||
typedef endian<order::native, uint_least64_t, 48> native_uint48un_t;
|
||||
typedef endian<order::native, uint_least64_t, 56> native_uint56un_t;
|
||||
typedef endian<order::native, uint_least64_t, 64> native_uint64un_t;
|
||||
typedef endian<order::native, uint_least8_t, 8> native_uint8_t;
|
||||
typedef endian<order::native, uint_least16_t, 16> native_uint16_t;
|
||||
typedef endian<order::native, uint_least32_t, 24> native_uint24_t;
|
||||
typedef endian<order::native, uint_least32_t, 32> native_uint32_t;
|
||||
typedef endian<order::native, uint_least64_t, 40> native_uint40_t;
|
||||
typedef endian<order::native, uint_least64_t, 48> native_uint48_t;
|
||||
typedef endian<order::native, uint_least64_t, 56> native_uint56_t;
|
||||
typedef endian<order::native, uint_least64_t, 64> native_uint64_t;
|
||||
|
||||
} // namespace endian
|
||||
} // namespace boost</pre>
|
||||
@@ -616,7 +617,7 @@ differs from endian representation size. Vicente Botet and other reviewers
|
||||
suggested supporting floating point types.</p>
|
||||
<hr>
|
||||
<p>Last revised:
|
||||
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->29 May, 2013<!--webbot bot="Timestamp" endspan i-checksum="13994" --></p>
|
||||
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->31 August, 2013<!--webbot bot="Timestamp" endspan i-checksum="34505" --></p>
|
||||
<p>© Copyright Beman Dawes, 2006-2009, 2013</p>
|
||||
<p>Distributed under the Boost Software License, Version 1.0. See
|
||||
<a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/ LICENSE_1_0.txt</a></p>
|
||||
|
Reference in New Issue
Block a user