@@ -124,7 +124,7 @@ template <typename NodeID, typename Key> class UnorderedMapStorage
124
124
private:
125
125
template <typename K, typename V>
126
126
using UnorderedMap = std::
127
- unordered_map<K, V/* , std::hash<K>, std::equal_to<K>, PoolAllocator<std::pair<const K, V>>*/ >;
127
+ unordered_map<K, V, std::hash<K>, std::equal_to<K>, PoolAllocator<std::pair<const K, V>>>;
128
128
129
129
UnorderedMap<NodeID, Key> nodes;
130
130
};
@@ -190,53 +190,6 @@ class TwoLevelStorage
190
190
OverlayIndexStorage<NodeID, Key> overlay;
191
191
};
192
192
193
- template <typename T> class LoggingAllocator
194
- {
195
- public:
196
- using value_type = T;
197
-
198
- LoggingAllocator () noexcept = default ;
199
- template <typename U> LoggingAllocator (const LoggingAllocator<U> &) noexcept {}
200
-
201
- T *allocate (std::size_t n)
202
- {
203
- if (n == 1024 )
204
- {
205
- std::cerr << " bingo\n " ;
206
- }
207
-
208
- auto p = std::allocator<T>().allocate (n);
209
- if (n != 1 )
210
- {
211
- std::cout << " Allocated " << n << " element(s) of size " << sizeof (T) << " at "
212
- << static_cast <void *>(p) << std::endl;
213
- }
214
-
215
- return p;
216
- }
217
-
218
- void deallocate (T *p, std::size_t n) noexcept
219
- {
220
- // std::cout << "Deallocated " << n << " element(s) at " << static_cast<void*>(p) <<
221
- // std::endl;
222
- std::allocator<T>().deallocate (p, n);
223
- }
224
-
225
- template <typename U, typename ... Args> void construct (U *p, Args &&...args)
226
- {
227
- std::allocator<T> a;
228
- // std::cout << "Constructing object at " << static_cast<void*>(p) << std::endl;
229
- std::allocator_traits<std::allocator<T>>::construct (a, p, std::forward<Args>(args)...);
230
- }
231
-
232
- template <typename U> void destroy (U *p)
233
- {
234
- // std::cout << "Destroying object at " << static_cast<void*>(p) << std::endl;
235
- std::allocator<T> a;
236
- std::allocator_traits<std::allocator<T>>::destroy (a, p);
237
- }
238
- };
239
-
240
193
template <typename NodeID,
241
194
typename Key,
242
195
typename Weight,
0 commit comments