Feature/concurrent node containers (#271)

* added concurrent node containers

* removed spurious typename

* added missing includes

* avoided unused param warning

* worked around Clang bug

* s/{}/() to work around GCC4.8 problems with aggregate initialization

* used /bigobj for cfoa/visit_tests.cpp

* suppressed localized maybe-uninitialized warnings

* fixed comments

* added /bigobj to cfoa/insert_tests.cpp

* instrumented double exact comparison to spot a spurious error

* fixed pedantic error

* refactored byte_span machinery

* compromised on sub-epsilon equality for doubles that should be identical

* documented boost::concurrent_node_(map|set)

* added concurrent_node_set

* added missing AlternativeType

* tested empty node insertion

* tested node_handle allocator management

* added nonassignable_allocator and node_handle_allocator_swap_tests

* fixed warning disabling

* silenced spurious GCC warning

* broadened scope of previous pragma

* broadened even more

* worked around spurious constexpr-related msvc-14.0 bug
https://godbolt.org/z/v78545Ebf

* added workaround back

* replaced previous workaround with built-in one

* added workaround back on top of built-in solution (which doesn't work 100% of the time)
This commit is contained in:
joaquintides
2024-08-25 18:34:58 +02:00
committed by GitHub
parent 35bdabf259
commit f734e399e3
58 changed files with 7007 additions and 338 deletions

View File

@@ -20,6 +20,8 @@
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/unordered/concurrent_flat_map.hpp>
#include <boost/unordered/concurrent_flat_set.hpp>
#include <boost/unordered/concurrent_node_map.hpp>
#include <boost/unordered/concurrent_node_set.hpp>
#include <boost/unordered/unordered_flat_map.hpp>
#include <boost/unordered/unordered_flat_set.hpp>
#include <boost/unordered/unordered_map.hpp>
@@ -61,8 +63,12 @@ template <class Tester> void visualization_test(Tester& tester)
auto cfoa_flat_map_ptr = tester.template construct_map<boost::concurrent_flat_map>();
auto cfoa_flat_set_ptr = tester.template construct_set<boost::concurrent_flat_set>();
auto cfoa_node_map_ptr = tester.template construct_map<boost::concurrent_node_map>();
auto cfoa_node_set_ptr = tester.template construct_set<boost::concurrent_node_set>();
auto& cfoa_flat_map = *cfoa_flat_map_ptr;
auto& cfoa_flat_set = *cfoa_flat_set_ptr;
auto& cfoa_node_map = *cfoa_node_map_ptr;
auto& cfoa_node_set = *cfoa_node_set_ptr;
// clang-format on
for (int i = 0; i < 5; ++i) {
@@ -75,6 +81,7 @@ template <class Tester> void visualization_test(Tester& tester)
foa_flat_map.emplace(str, num);
foa_node_map.emplace(str, num);
cfoa_flat_map.emplace(str, num);
cfoa_node_map.emplace(str, num);
fca_set.emplace(str);
fca_multiset.emplace(str);
@@ -82,6 +89,7 @@ template <class Tester> void visualization_test(Tester& tester)
foa_flat_set.emplace(str);
foa_node_set.emplace(str);
cfoa_flat_set.emplace(str);
cfoa_node_set.emplace(str);
}
auto fca_map_begin = fca_map.begin();
@@ -102,7 +110,7 @@ template <class Tester> void visualization_test(Tester& tester)
auto foa_node_set_begin = foa_node_set.begin();
auto foa_node_set_end = foa_node_set.end();
use(cfoa_flat_map, cfoa_flat_set);
use(cfoa_flat_map, cfoa_flat_set, cfoa_node_map, cfoa_node_set);
use(fca_map_begin, fca_map_end, fca_multimap_begin, fca_multimap_end,
fca_set_begin, fca_set_end, fca_multiset_begin, fca_multiset_end);
use(foa_flat_map_begin, foa_flat_map_end, foa_flat_set_begin,