From 01278f951d21255b7dca3e67aa86680888f833d0 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Sun, 24 Mar 2019 14:22:36 -0400 Subject: [PATCH] Convert Endian mini review to asciidoc --- doc/endian.adoc | 2 + doc/endian/mini_review_topics.adoc | 96 ++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 doc/endian/mini_review_topics.adoc diff --git a/doc/endian.adoc b/doc/endian.adoc index 021d31a..24dd548 100644 --- a/doc/endian.adoc +++ b/doc/endian.adoc @@ -18,6 +18,8 @@ Beman Dawes include::endian/overview.adoc[] +include::endian/mini_review_topics.adoc[] + :leveloffset: -1 [appendix] diff --git a/doc/endian/mini_review_topics.adoc b/doc/endian/mini_review_topics.adoc new file mode 100644 index 0000000..c42604f --- /dev/null +++ b/doc/endian/mini_review_topics.adoc @@ -0,0 +1,96 @@ +//// +Copyright 2011-2016 Beman Dawes + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +//// + +[#appendix_mini_review_topics] +[appendix] +# Endian Mini-Review + +The results of the Boost.Endian formal review included a list of issues to be +resolved before a mini-review. + +The issues are shown in *bold* below, with the resolution indicated. + +1. *Common use case scenarios should be developed.* +* Done. The documentation have been refactored. A page is now devoted to +<> to endianness. See +<> for use case scenarios. + +2. *Example programs should be developed for the common use case scenarios.* +* Done. See <>. Example code has been added +throughout. + +3. *Documentation should illuminate the differences between endian +integer/float type and endian conversion approaches to the common use case +scenarios, and provide guidelines for choosing the most appropriate approach in +user's applications.* +* Done. See <>. + +4. *Conversion functions supplying results via return should be provided.* +* Done. See <>. + +5. *Platform specific performance enhancements such as use of compiler +intrinsics or relaxed alignment requirements should be supported.* +* Done. Compiler (Clang, GCC, Visual{cpp}, etc.) intrinsics and built-in +functions are used in the implementation where appropriate, as requested. See +<>. See +<> to gauge the impact of intrinsics. + +6. *Endian integer (and floating) types should be implemented via the +conversion functions. If that can't be done efficiently, consideration should +be given to expanding the conversion function signatures to resolve the +inefficiencies.* +* Done. For the endian types, the implementation uses the endian conversion +functions, and thus the intrinsics, as requested. + +7. *Benchmarks that measure performance should be provided. It should be +possible to compare platform specific performance enhancements against portable +base implementations, and to compare endian integer approaches against endian +conversion approaches for the common use case scenarios.* +* Done. See <>. The `endian/test` +directory also contains several additional benchmark and speed test programs. + +8. *Float (32-bits) and double (64-bits) should be supported. IEEE 754 is +the primary use case.* +* Done. The <>, +<> and +<> now support 32-bit `(float)` +and 64-bit `(double)` floating point, as requested. + +9. *Support for user defined types (UDTs) is desirable, and should be +provided where there would be no conflict with the other concerns.* +* Done. See <>. + +10. *There is some concern that endian integer/float arithmetic operations +might used inadvertently or inappropriately. The impact of adding an +endian_buffer class without arithmetic operations should be investigated.* +* Done. The endian types have been decomposed into class template +`<>` and class template +`<>`. Class `endian_buffer` is a public base +class for `endian_arithmetic`, and can also be used by users as a stand-alone +class. + +11. *Stream insertion and extraction of the endian integer/float types should +be documented and included in the test coverage.* +* Done. See <> and +<>. + +12. *Binary I/O support that was investigated during development of the +Endian library should be put up for mini-review for inclusion in the Boost I/O +library.* +* Not done yet. Will be handled as a separate min-review soon after the Endian +mini-review. + +13. *Other requested changes.* +* In addition to the named-endianness conversion functions, functions that +perform compile-time (via template) and run-time (via function argument) +dispatch are now provided. +* `order*native` is now a synonym for `order*big` or `order*little` according +to the endianness of the platform. This reduces the number of template +specializations required. +* Headers have been reorganized to make them easier to read, with a synopsis +at the front and implementation following.s