Beman
dcca2835a9
Rename "reverse_endianness" to "endian_reverse". Shorter but still plenty explicit. See bikeshed.txt for alternatives considered.
2014-12-10 08:30:30 -05:00
Beman
e4466edf4e
Drop the _unless_big and _unless_little functions. KISS. They were confusing, and less confusing names were never found.
2014-12-09 20:43:47 -05:00
Beman
55a65c3806
Revert to again supply the reverse_endianness_in_place template. This has the effect of providing a default reverse_endianness_in_place for user-defined types. Add error checking for UDT's to verify this works as desired. Provide a note in the conversion docs to that effect.
2014-12-09 11:36:42 -05:00
Beman
4b6019c82e
Use hex in literal for value where octal is confusing.
2014-12-09 07:10:25 -05:00
Beman
439207b388
Add conversion_use_case
2014-12-05 09:01:59 -05:00
Beman
e2045b7ffa
Finalize buffer and arithmetic decomposition. Finalize name changes. Finalize test cases. Remove cruft. Docs still to do.
2014-11-26 10:04:33 -05:00
Beman
bb785ed8e0
UDT tests added. Passing on Windows, all local compilers.
2014-11-25 11:31:30 -05:00
Beman
7b119ba0ee
Add full set of modify in place tests.
2014-11-25 09:58:59 -05:00
Beman
56103a7bc6
Finish conversion.hpp cleanup after name changes. conversion_test.cpp return-by-value tests reorganized and passing. UTD and in-place tests still to come. Add doc/bikeshed.txt to keep record of naming rationale.
2014-11-24 10:04:23 -05:00
Beman
4197f996ac
More conversion.hpp fixes. Some, but not all, conversion_test tests passing.
2014-11-23 10:38:21 -05:00
Beman
fc7733ade1
Major renaming. Class "endian" becomes class "endian_arithmetic" to mimic the C++ standard's description of such types as "arithmetic types". Rename header accordingly. The convenience typedefs have been changed shorten aligned names, as they are often being, but keeping the unaligned type names relatively short via a simple "_ut" suffix.
2014-11-19 10:53:11 -05:00
Beman
61d9046348
Remove "operator value_type() const noexcept" from buffers. Make the buffer ctor explicit. Buffers were requested by people who do not want automatic conversions because they want full control over conversions, and are very concerned about "efficiency".
...
Add "operator value_type() const noexcept" to the endian arithmetic types. These types are used by people who do want fully automatic conversions. The arithmetic types need to be drop-in replacements for the built-in arithmetic types for these users.
2014-11-18 14:33:31 -05:00
Beman
221ad3c585
Add use_cases.cpp
2014-11-18 10:05:45 -05:00
Beman
e9f6d2c37c
Re-implement the endian types by inheriting from endian_buffer.
2014-11-15 21:04:19 -05:00
Beman
561d8f7070
Initial commit buffers.hpp and related infrastructure. A separate buffer class without arithmetic operators was requested during the formal review.
2014-11-15 08:02:08 -05:00
Beman
f8e60ae4e9
Switch to VC++ 2014, and clear a resulting shadow warning.
2014-11-14 14:23:36 -05:00
Beman
fd1ab6daff
Add additional ambiguity detection.
2014-11-13 13:10:57 -05:00
Beman
c41521cead
For the endian types, add stream inserters and extractors as requested during the formal review.
2014-11-11 21:08:08 -05:00
Beman
72a9095a03
Fix tests that were backwards on big endian machines. Thanks to Lars Viklund for testing on three different big-endian systems.
2014-08-15 18:07:12 -04:00
Beman
e609015dd6
Some IDE generated files and directories violate boost guidelines, so ignore.
2014-08-15 12:01:05 -04:00
Beman
ea44132749
Add native float tests.
2014-08-13 14:02:09 -04:00
Beman
f2dad97c44
Upgrade to msvc 2013. Rename msvc2012 to msvc so directory doesn't have to be renamed each msvc release.
2014-08-11 10:01:24 -04:00
Beman
8c36890e77
Test and doc updates for Pierre Talbot's int8_t/uint8_t reverse_value() and templated reverse() patch.
2014-04-16 13:52:24 -04:00
Beman
d339470e6e
Remove "explicit" from Endian type constructors. Rationale: Having to write "cntr.insert(big_int32_t(value))" instead of "cntr.insert(value)" gets old fast when you are writing application code and the use case arises more or less continuously. Additionally, the use of an endian type is an implementation detail that should not leak into the application code that needs to create values of the type. Furthermore, the ambiguities that caused the constructors to be made explicit no longer occur; they were eliminated when BOOST_MINIMAL_INTEGER_COVER_OPERATORS was introduced to removed a dependency on boost/operators.hpp. If an ambiguity does arise, it is easy to clear via a static_cast or a function-style cast.
2013-09-06 10:36:54 -04:00
Beman
016d3b2e7c
Rename the endian typedefs. Rationale: Subjective - during three months working on the B-tree library, the *un_t names were a constant source of irritation. Objective - the new scheme, which reverts the *un_t names to having no alignment decoration, provides consistent *_align* decoration for both FP and integer types. Also, the library now provides conversion functions which may reduce use of aligned endian types.
2013-09-01 08:40:32 -04:00
Beman
a40d580782
Get 64-bit builds working. Update timings to reflect 64-bit build.
2013-06-06 08:00:28 -04:00
Beman
74b122c581
Alignment of 64-bit integers on a 32-bit system may be to a 32-bit boundary!
2013-05-30 10:07:16 -04:00
Beman
cd985897e6
By default use a shorter test, but add coverage of the aligned types.
2013-05-30 09:19:42 -04:00
Beman
30c44461f6
Only do relational tests if signedness is the same, to quiet GCC warnings. Start using lightweight test.
2013-05-30 08:57:09 -04:00
Beman
db3864b3d4
Fix boo boos detected by inspect program.
2013-05-29 09:40:35 -04:00
Beman
9c25d54d38
Finalize index.html discussion.
2013-05-28 09:42:04 -04:00
Beman
a55a44c67b
Loop test time work in progress.
2013-05-28 07:37:52 -04:00
Beman
50b5488997
loop_time_test current work-in-progress
2013-05-27 08:53:18 -04:00
Beman
32b04869e8
Initial commit loop_time_test.cpp and its infrastructure.
2013-05-27 07:44:29 -04:00
Beman
7f9d91e6d2
Rename unaligned integers to fit the floating point pattern. Unifies the naming pattern, deliberately makes the unaligned type names a bit uglier.
2013-05-26 12:05:33 -04:00
Beman
dff7c1254e
Add unaligned floating point types and supporting infrastructure.
2013-05-26 08:25:10 -04:00
Beman
a7ba65f830
Implement, test, float and double endian types.
2013-05-25 12:16:32 -04:00
Beman
f8f8d90b1f
Eliminate addition as not adding any useful information.
2013-05-24 13:22:48 -04:00
Beman
77520edff1
Change speed_test.cpp output to HTML
2013-05-24 11:28:26 -04:00
Beman
2f85e370b6
Add 16 and 64 bit varieties
2013-05-23 10:19:56 -04:00
Beman
8f55000f6f
Finally getting useful speed_test results from both GCC and VC++
2013-05-23 10:11:29 -04:00
Beman
c7beb10785
Add alignment test cases for aligned endian types.
2013-05-22 08:46:56 -04:00
Beman
6f84684e9e
Add separate big and little specializations for aligned case; the attempt to combine into a single specialization was selecting the unaligned specialization. Rework speed_test to try to get more meaningful results and cover more test cases.
2013-05-22 08:14:51 -04:00
Beman
4d6f7001fa
Create separate synopsis section
2013-05-21 08:38:24 -04:00
Beman
ddb5936b68
Yet another naming scheme for type synonyms. Aligned type names now exactly follow the <cstdint> pattern, while the unaligned names elide "int".
2013-05-21 07:56:27 -04:00
Beman
870b542456
Rename endian types to a scheme that mimics cstdint.hpp. Change test and example code accordingly.
2013-05-20 17:03:12 -04:00
Beman
f13a9cd6a4
Rename integers.hpp to types.hpp in case floating point is someday supported.
2013-05-20 09:07:01 -04:00
Beman
9089eb037b
Rename header converters.hpp back to conversion.hpp. Clean up infrastructure.
2013-05-18 16:14:30 -04:00
Beman
de91bcd571
Cleanup residue from prior changes.
2013-05-18 15:09:51 -04:00
Beman
c0fc4cdf8c
Somewhat more interesting results after redoing loop based on iteration count rather than time. Release builds particularly interesting.
2013-05-18 10:27:18 -04:00
Beman
2b18459db0
Speed_test working, although not yielding useful results.
2013-05-18 08:28:27 -04:00
Beman
b587bab1db
Add speed_test infrastructure.
2013-05-17 13:19:45 -04:00
Beman
9a1d520572
Use a more robust detection of __builtin_bswap funtions for Clang. Fix Clang lack of __builtin_bswap16 in some releases. To be conservative only, fallback to byteswap.h if __linux__ is defined. Fix intrinsic_test so that <cstdint> isn't required.
2013-05-16 17:22:38 -04:00
Beman
4066443d89
Rework intrinsic.hpp to handle GCC and Clang __builtin_bswap* if available. Add test program.
2013-05-16 10:40:18 -04:00
Beman
8b4bd2adfc
Add synonyms based on names popularized by BSD, e.g. OS X, Linux.
2013-05-15 08:51:05 -04:00
Beman
09b361e161
Simulated function template partial specialization working. converter_test and pair_test passing.
2013-05-14 17:59:50 -04:00
Beman
72880a1416
Initial commit udt_conversion_example.cpp
2013-05-14 14:54:11 -04:00
Beman
c16fd1384f
Teaks
2013-05-14 10:32:51 -04:00
Beman
1a496f277e
Signs of life
2013-05-14 09:59:18 -04:00
Beman
e7c14b9ff2
pair_test infrastructure initial commit.
2013-05-14 07:20:53 -04:00
Beman
db2f30b77c
Better fix that works with more compilers, old and new, VC++ and GCC.
2013-05-13 11:05:31 -04:00
Beman
62915438e3
Fix converter_test cases. converter_test now passes on big-endian mac.
2013-05-13 10:43:56 -04:00
Beman
4c0bd87c18
Tweaks to get tests running with various compilers.
2013-05-12 17:42:48 -04:00
Beman
6c00b65eb4
Add light test of modify-in-place interface
2013-05-12 11:31:32 -04:00
Beman
ec3aacd132
Remove cruft left over from refactoring.
2013-05-12 10:55:18 -04:00
Beman
0fef88ab3f
Change names to make room for modify-in-place names.
2013-05-12 08:58:44 -04:00
Beman
854c27939a
Change name of conditional conversion functions to big_endian and little_endian.
2013-05-12 07:52:42 -04:00
Beman
50c1a27386
Change name convert_bytes to convert. Given the namespace, template parameters, and function arguments, it is obvious what is being converted, and "bytes" is too low level for this function.
2013-05-12 07:25:12 -04:00
Beman
3877219925
Remove spurious semi-colon.
2013-05-12 07:21:37 -04:00
Beman
2794810b29
converter_test.cpp refactoring complete
2013-05-11 17:41:06 -04:00
Beman
97b024bcf6
Continue refactoring converter_test.cpp.
2013-05-11 17:18:17 -04:00
Beman
c349e35e91
Enable double, fix bug in generic reverse_bytes implementation. Begin refactoring converter_test code.
2013-05-11 16:08:15 -04:00
Beman
9e96faf4c1
float showing signs of life.
2013-05-11 08:13:55 -04:00
Beman
e4d65805a6
Add tests for runtime convert_bytes
2013-05-10 18:07:48 -04:00
Beman
6af16cc339
compile-time convert_bytes working, all signed and unsigned integer cases being tested.
2013-05-10 17:51:58 -04:00
Beman
553d6a2426
Work in progress. Detect wrong endianness reported by boost/detail/endian.hpp. Add intrinsic timing to benchmark.cpp. Add boost/endian/detail/intrinsic.hpp. Use intrinsics in converters when available. Begin adding convert_bytes tests to converter_test.cpp.
2013-05-10 16:51:24 -04:00
Beman
fcb5386537
All tests passing, all VC++ projects consistent
2013-05-10 11:26:17 -04:00
Beman
a9dc71f5f0
Endian not embedded in Boost tree working all VC++ 2012 tests.
2013-05-09 10:34:35 -04:00
Beman
304ad2ad90
Remove requirement that endian files be embedded in the boost directory hierarchy.
...
Begin conversion to msvc2012.
2013-05-09 08:46:02 -04:00
Beman
736d9cce09
Change name of endianness enum to order. This is often used with namespace qualifier, and endian::order is shorter and reads better than endian::endianness.
...
Continue infrastructure and test updates.
2013-03-19 09:28:22 -04:00
Beman
35a3fcb709
Set up infrastructure, change to new names, clean up comments.
2013-03-18 20:39:21 -04:00
Beman
d7120e6fac
Delete the original conversion.hpp.
...
Rename conversion2.hpp to converters.hpp.
Adjust infrastructure accordingly.
2013-03-18 20:12:41 -04:00
Beman
c177062bf5
Delete some obsolete files, cleanup the Jamefile.
2013-03-18 19:38:25 -04:00
Beman
8782df3ab5
Get VC++ solution working with new directory structure (Except benchmark link errors).
2013-03-18 15:53:49 -04:00
Beman
d131123327
Directory reorg to follow Boost Git practice.
2013-03-18 14:57:23 -04:00