diff --git a/doc/arithmetic.html b/doc/arithmetic.html index b8d739e..1066d14 100644 --- a/doc/arithmetic.html +++ b/doc/arithmetic.html @@ -68,7 +68,7 @@

Introduction

Header boost/endian/arithmetic.hpp -provides integer and floating point binary types with control over +provides integer binary types with control over byte order, value type, size, and alignment. Typedefs provide easy-to-use names for common configurations.

These types provide portable byte-holders for integer data, independent of @@ -201,7 +201,6 @@ will no longer be relying on unspecified behavior.

  • Big endian| little endian | native endian byte ordering.
  • Signed | unsigned
  • Unaligned | aligned
  • -
  • Integer | floating point
  • 1-8 byte (unaligned) | 1, 2, 4, 8 byte (aligned)
  • Choice of value type
  • @@ -244,13 +243,6 @@ conventions for common use cases:

    unsigned 8,16,24,32,40,48,56,64 - - big_floatn_t - no - big - signed - 32,64 - little_intn_t no @@ -265,13 +257,6 @@ conventions for common use cases:

    unsigned 8,16,24,32,40,48,56,64 - - little_floatn_t - no - little - signed - 32,64 - native_intn_t no @@ -286,13 +271,6 @@ conventions for common use cases:

    unsigned 8,16,24,32,40,48,56,64 - - native_floatn_t - no - native - signed - 32,64 - big_intn_at yes @@ -307,13 +285,6 @@ conventions for common use cases:

    unsigned 8,16,32,64 - - big_floatn_at - yes - big - signed - 32,64 - little_intn_at yes @@ -328,21 +299,7 @@ conventions for common use cases:

    unsigned 8,16,32,64 - - little_floatn_at - yes - little - signed - 32,64 - - - native_floatn_at - yes - native - signed - 32,64 - - +

    The unaligned types do not cause compilers to insert padding bytes in classes and structs. This is an important characteristic that can be exploited to minimize wasted space in @@ -452,10 +409,6 @@ usual operations on integers are supplied.

    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 big endian floating point types - typedef endian<order::big, float, 32> big_float32_t; - typedef endian<order::big, double, 64> big_float64_t; // unaligned little endian signed integer types typedef endian<order::little, int_least8_t, 8> little_int8_t; @@ -476,10 +429,6 @@ usual operations on integers are supplied.

    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 little endian floating point types - typedef endian<order::little, float, 32, align::no> little_float32_t; - typedef endian<order::little, double, 64, align::no> little_float64_t; // unaligned native endian signed integer types typedef implementation-defined_int8_t native_int8_t; @@ -513,10 +462,6 @@ usual operations on integers are supplied.

    typedef endian<order::big, uint32_t, 32, align::yes> big_uint32_at; typedef endian<order::big, uint64_t, 64, align::yes> big_uint64_at; - // aligned big endian floating point types - typedef endian<order::big, float, 32, align::yes> big_float32_at; - typedef endian<order::big, double, 64, align::yes> big_float64_at; - // aligned little endian signed integer types typedef endian<order::little, int8_t, 8, align::yes> little_int8_at; typedef endian<order::little, int16_t, 16, align::yes> little_int16_at; @@ -529,10 +474,6 @@ usual operations on integers are supplied.

    typedef endian<order::little, uint32_t, 32, align::yes> little_uint32_at; typedef endian<order::little, uint64_t, 64, align::yes> little_uint64_at; - // aligned little endian floating point types - typedef endian<order::little, float, 32, align::yes> little_float32_at; - typedef endian<order::little, double, 64, align::yes> little_float64_at; - // aligned native endian typedefs are not provided because // <cstdint> types are superior for that use case @@ -689,11 +630,10 @@ Borgerding. Four original class templates combined into a single endian_ar class template by Beman Dawes, who put the library together, provided documentation, added the typedefs, and also added the unrolled_byte_loops sign partial specialization to correctly extend the sign when cover integer size -differs from endian representation size. Vicente Botet and other reviewers -suggested supporting floating point types.

    +differs from endian representation size.


    Last revised: -23 February, 2015

    +25 March, 2015

    © Copyright Beman Dawes, 2006-2009, 2013

    Distributed under the Boost Software License, Version 1.0. See www.boost.org/ LICENSE_1_0.txt

    diff --git a/doc/buffers.html b/doc/buffers.html index 173ab14..85aae22 100644 --- a/doc/buffers.html +++ b/doc/buffers.html @@ -69,7 +69,7 @@ a full exploration of endianness, including definitions of big endian and little endian.

    Header boost/endian/buffers.hpp -provides endian_buffer, a portable endian integer and floating-point binary buffer +provides endian_buffer, a portable endian integer binary buffer class template with control over byte order, value type, size, and alignment independent of the platform's native endianness. Typedefs provide easy-to-use names @@ -183,7 +183,6 @@ will no longer be relying on unspecified behavior.

  • Big endian| little endian | native endian byte ordering.
  • Signed | unsigned
  • Unaligned | aligned
  • -
  • Integer | floating point
  • 1-8 byte (unaligned) | 1, 2, 4, 8 byte (aligned)
  • Choice of value type
  • @@ -226,13 +225,6 @@ conventions for common use cases:

    unsigned 8,16,24,32,40,48,56,64 - - big_floatn_buf_t - no - big - signed - 32,64 - little_intn_buf_t no @@ -247,13 +239,6 @@ conventions for common use cases:

    unsigned 8,16,24,32,40,48,56,64 - - little_floatn_buf_t - no - little - signed - 32,64 - native_intn_buf_t no @@ -268,13 +253,6 @@ conventions for common use cases:

    unsigned 8,16,24,32,40,48,56,64 - - native_floatn_buf_t - no - native - signed - 32,64 - big_intn_buf_at yes @@ -289,13 +267,6 @@ conventions for common use cases:

    unsigned 8,16,32,64 - - big_floatn_buf_at - yes - big - signed - 32,64 - little_intn_buf_at yes @@ -310,21 +281,7 @@ conventions for common use cases:

    unsigned 8,16,32,64 - - little_floatn_buf_at - yes - little - signed - 32,64 - - - native_floatn_buf_at - yes - native - signed - 32,64 - - +

    The unaligned types do not cause compilers to insert padding bytes in classes and structs. This is an important characteristic that can be exploited to minimize wasted space in @@ -418,10 +375,6 @@ usual operations on integers are supplied.

    typedef endian_buffer<order::big, uint_least64_t, 56> big_uint56_buf_t; typedef endian_buffer<order::big, uint_least64_t, 64> big_uint64_buf_t; - // unaligned big endian floating point buffers - typedef endian_buffer<order::big, float, 32> big_float32_buf_t; - typedef endian_buffer<order::big, double, 64> big_float64_buf_t; - // unaligned little endian signed integer buffers typedef endian_buffer<order::little, int_least8_t, 8> little_int8_buf_t; typedef endian_buffer<order::little, int_least16_t, 16> little_int16_buf_t; @@ -442,10 +395,6 @@ usual operations on integers are supplied.

    typedef endian_buffer<order::little, uint_least64_t, 56> little_uint56_buf_t; typedef endian_buffer<order::little, uint_least64_t, 64> little_uint64_buf_t; - // unaligned little endian floating point buffers - typedef endian_buffer<order::little, float, 32> little_float32_buf_t; - typedef endian_buffer<order::little, double, 64> little_float64_buf_t; - // unaligned native endian signed integer types typedef implementation-defined_int8_buf_t native_int8_buf_t; typedef implementation-defined_int16_buf_t native_int16_buf_t; @@ -478,10 +427,6 @@ usual operations on integers are supplied.

    typedef endian_buffer<order::big, uint32_t, 32, align::yes> big_uint32_buf_at; typedef endian_buffer<order::big, uint64_t, 64, align::yes> big_uint64_buf_at; - // aligned big endian floating point buffers - typedef endian_buffer<order::big, float, 32, align::yes> big_float32_buf_at; - typedef endian_buffer<order::big, double, 64, align::yes> big_float64_buf_at; - // aligned little endian signed integer buffers typedef endian_buffer<order::little, int8_t, 8, align::yes> little_int8_buf_at; typedef endian_buffer<order::little, int16_t, 16, align::yes> little_int16_buf_at; @@ -493,10 +438,6 @@ usual operations on integers are supplied.

    typedef endian_buffer<order::little, uint16_t, 16, align::yes> little_uint16_buf_at; typedef endian_buffer<order::little, uint32_t, 32, align::yes> little_uint32_buf_at; typedef endian_buffer<order::little, uint64_t, 64, align::yes> little_uint64_buf_at; - - // aligned little endian floating point buffers - typedef endian_buffer<order::little, float, 32, align::yes> little_float32_buf_at; - typedef endian_buffer<order::little, double, 64, align::yes> little_float64_buf_at; // aligned native endian typedefs are not provided because // <cstdint> types are superior for this use case @@ -663,7 +604,7 @@ any Boost object libraries.


    Last revised: -23 February, 2015

    +25 March, 2015

    © Copyright Beman Dawes, 2006-2009, 2013

    Distributed under the Boost Software License, Version 1.0. See www.boost.org/ LICENSE_1_0.txt

    diff --git a/doc/conversion.html b/doc/conversion.html index 8ec3f0c..422300c 100644 --- a/doc/conversion.html +++ b/doc/conversion.html @@ -1,4 +1,4 @@ - + @@ -59,8 +59,8 @@

    Header boost/endian/conversion.hpp provides byte order reversal and conversion functions that convert objects of -the built-in -integer types, and also types float and double, +the built-in +integer types between native, big, or little endian byte ordering. User defined types are also supported.

    @@ -99,8 +99,6 @@ namespace endian uint16_t endian_reverse(uint16_t x) noexcept; uint32_t endian_reverse(uint32_t x) noexcept; uint64_t endian_reverse(uint64_t x) noexcept; - float endian_reverse(float x) noexcept; - double endian_reverse(double x) noexcept; template <class EndianReversible> EndianReversible big_to_native(EndianReversible x) noexcept; @@ -141,8 +139,7 @@ constant native as endian platforms.

    Definitions

    The standard integral types (C++std 3.9.1) except bool, -and the floating point types float and double are -collectively called the endian types.

    +are collectively called the endian types.

    Requirements

    Template argument requirements

    The template definitions in the boost/endian/conversion.hpp @@ -235,9 +232,7 @@ int64_t endian_reverse(int64_t x) noexcept; uint8_t endian_reverse(uint8_t x) noexcept; uint16_t endian_reverse(uint16_t x) noexcept; uint32_t endian_reverse(uint32_t x) noexcept; -uint64_t endian_reverse(uint64_t x) noexcept; -float endian_reverse(float x) noexcept; -double endian_reverse(double x) noexcept; +uint64_t endian_reverse(uint64_t x) noexcept;

    Returns: x, with the order of its constituent bytes reversed.

    @@ -250,8 +245,7 @@ double endian_reverse(double x) noexcept; EndianReversible big_to_native(EndianReversible x) noexcept;

    - Returns: conditional_reverse<order::big, - order::native>(x).

    + Returns: conditional_reverse<order::big, order::native>(x).

    template <class EndianReversible>
     EndianReversible native_to_big(EndianReversible x) noexcept; 
    @@ -271,10 +265,8 @@ EndianReversible native_to_little(EndianReversible x) noexcept;
    template <order O1, order O2, class EndianReversible>
     EndianReversible conditional_reverse(EndianReversible x) noexcept; 
    -

    Returns: x if O1 == O2, otherwise - endian_reverse(x).

    -

    Remarks: Whether x or endian_reverse(x) - is to be returned shall be determined at compile time.

    +

    Returns: x if O1 == O2, otherwise endian_reverse(x).

    +

    Remarks: Whether x or endian_reverse(x) is to be returned shall be determined at compile time.

    template <class EndianReversible>
     EndianReversible conditional_reverse(EndianReversible x,
    @@ -294,15 +286,13 @@ void endian_reverse_inplace(EndianReversible& x) noexcept; 
    void big_to_native_inplace(EndianReversibleInplace& x) noexcept;

    - Effects: conditional_reverse_inplace<order::big, - order::native>(x).

    + Effects: conditional_reverse_inplace<order::big, order::native>(x).

    template <class EndianReversibleInplace>
     void native_to_big_inplace(EndianReversibleInplace& x) noexcept; 

    - Effects: conditional_reverse_inplace<order::native, - order::big>(x).

    + Effects: conditional_reverse_inplace<order::native, order::big>(x).

    template <class EndianReversibleInplace>
     void little_to_native_inplace(EndianReversibleInplace& x) noexcept; 
    @@ -314,14 +304,12 @@ void little_to_native_inplace(EndianReversibleInplace& x) noexcept; void native_to_little_inplace(EndianReversibleInplace& x) noexcept;

    - Effects: conditional_reverse_inplace<order::native, - order::little>(x).

    + Effects: conditional_reverse_inplace<order::native, order::little>(x).

    template <order O1, order O2, class EndianReversibleInplace>
     void conditional_reverse_inplace(EndianReversibleInplace& x) noexcept; 
    -

    Effects: None if O1 == O2, otherwise - endian_reverse_inplace(x).

    +

    Effects: None if O1 == O2, otherwise endian_reverse_inplace(x).

    Remarks: Which effect applies shall be determined at compile time.

    template <class EndianReversibleInplace>
    @@ -362,14 +350,21 @@ portability for both programs and data.

    -

    Acknowledgements

    Tomas Puverle was instrumental in identifying and articulating the need to -support endian conversion as separate from endian integer types. Phil Endecott suggested the form of the value returning signatures. Vicente Botet and other reviewers suggested supporting floating point types and user defined types. General reverse template implementation approach using std::reverse suggested by Mathias Gaunard. Portable implementation approach for 16, 32, and 64-bit integers suggested by tymofey, with avoidance of undefined behavior as suggested by Giovanni Piero Deretta, and a further refinement suggested by Pyry Jahkola. Intrinsic builtins implementation approach for 16, 32, and 64-bit integers suggested by several reviewers, and by David Stone, who provided his Boost licensed macro implementation that became the starting point for -boost/endian/detail/intrinsic.hpp. +

    Acknowledgements

    Tomas Puverle was instrumental +in identifying and articulating the need to support endian conversion as separate from +endian integer types. Phil Endecott suggested the form of the value returning signatures. +Vicente Botet and other reviewers suggested supporting user defined types. +General reverse template implementation approach using std::reverse suggested by Mathias Gaunard. +Portable implementation approach for 16, 32, and 64-bit integers suggested by tymofey, +with avoidance of undefined behavior as suggested by Giovanni Piero Deretta, +and a further refinement suggested by Pyry Jahkola. +Intrinsic builtins implementation approach for 16, 32, and 64-bit integers suggested by +several reviewers, and by David Stone, who provided his Boost licensed macro implementation +that became the starting point for boost/endian/detail/intrinsic.hpp. Pierre Talbot provided the int8_t endian_reverse() and templated endian_reverse_inplace() implementations.


    -

    Last revised: -09 February, 2015

    +

    Last revised: 25 March, 2015

    © Copyright Beman Dawes, 2011, 2013

    Distributed under the Boost Software License, Version 1.0. See www.boost.org/ LICENSE_1_0.txt

    diff --git a/doc/index.html b/doc/index.html index 45a74fa..167112b 100644 --- a/doc/index.html +++ b/doc/index.html @@ -67,10 +67,9 @@ formal review

    Abstract

    Boost.Endian provides facilities to manipulate the -endianness of integers, -floating point numbers, and user-defined types.

    +endianness of integers and user-defined types.