|
20 | 20 |
|
21 | 21 | #include "entry.h" |
22 | 22 | #include "phtree/common/b_plus_tree_hash_map.h" |
23 | | -#include "phtree/common/b_plus_tree_hash_multimap.h" |
24 | 23 | #include "phtree/common/b_plus_tree_multimap.h" |
25 | 24 | #include "phtree/common/common.h" |
26 | 25 | #include "phtree_v16.h" |
@@ -69,12 +68,13 @@ template <dimension_t DIM, typename Entry> |
69 | 68 | using EntryMap = typename std::conditional_t< |
70 | 69 | DIM < 32, b_plus_tree_multimap<std::uint32_t, Entry>, b_plus_tree_multimap<std::uint64_t, Entry>>; |
71 | 70 | #else |
72 | | - using EntryMap = typename std::conditional< |
73 | | - DIM <= 3, |
74 | | - array_map<Entry, (hc_pos_t(1) << DIM)>, |
75 | | - typename std:: |
76 | | - conditional<DIM <= 8, sparse_map<Entry>, b_plus_tree_map<Entry, (hc_pos_t(1) << DIM)>>:: |
77 | | - type>::type; |
| 71 | +using EntryMap = typename std::conditional_t< |
| 72 | + DIM <= 3, |
| 73 | + array_map<Entry, (uint64_t(1) << DIM)>, |
| 74 | + typename std::conditional_t< |
| 75 | + DIM <= 8, |
| 76 | + sparse_map<hc_pos_dim_t<DIM>, Entry>, |
| 77 | + b_plus_tree_map<std::uint64_t, Entry, (uint64_t(1) << DIM)>>>; |
78 | 78 | #endif |
79 | 79 |
|
80 | 80 | template <dimension_t DIM, typename Entry> |
@@ -103,19 +103,19 @@ using EntryIteratorC = decltype(EntryMap<DIM, Entry>().cbegin()); |
103 | 103 | */ |
104 | 104 | template <dimension_t DIM, typename T, typename SCALAR> |
105 | 105 | class Node { |
106 | | -#ifdef FLEX |
107 | | - static constexpr hc_pos_t MAX_SIZE = std::max(hc_pos_t(8), hc_pos_t(1) << DIM); |
108 | | -#endif |
109 | 106 | using KeyT = PhPoint<DIM, SCALAR>; |
110 | 107 | using EntryT = Entry<DIM, T, SCALAR>; |
111 | 108 | using hc_pos_t = hc_pos_64_t; |
| 109 | +#ifdef FLEX |
| 110 | + static constexpr hc_pos_t MAX_SIZE = std::max(hc_pos_t(8), hc_pos_t(1) << DIM); |
| 111 | +#endif |
112 | 112 |
|
113 | 113 | public: |
114 | 114 | Node() : entries_{} {} |
115 | 115 |
|
116 | | - // Nodes should never be copied! |
| 116 | + // Nodes should (almost) never be copied! |
117 | 117 | Node(const Node&) = delete; |
118 | | - Node(Node&&) = delete; |
| 118 | + Node(Node&&) = default; |
119 | 119 | Node& operator=(const Node&) = delete; |
120 | 120 | Node& operator=(Node&&) = delete; |
121 | 121 |
|
|
0 commit comments