File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 2424
2525#pragma once
2626
27+ #include < gtsam/base/FastDefaultAllocator.h>
2728#include < gtsam/base/GenericValue.h>
2829#include < gtsam/base/VectorSpace.h>
2930#include < gtsam/inference/Key.h>
@@ -62,17 +63,18 @@ namespace gtsam {
6263 class GTSAM_EXPORT Values {
6364
6465 private:
65-
6666 // Internally we store a boost ptr_map, with a ValueCloneAllocator (defined
67- // below) to clone and deallocate the Value objects, and a boost
68- // fast_pool_allocator to allocate map nodes. In this way, all memory is
69- // allocated in a boost memory pool.
67+ // below) to clone and deallocate the Value objects, and our compile-flag-
68+ // dependent FastDefaultAllocator to allocate map nodes. In this way, the
69+ // user defines the allocation details (i.e. optimize for memory pool/arenas
70+ // concurrency).
71+ typedef internal::FastDefaultAllocator<typename std::pair<const Key, void *>>::type KeyValuePtrPairAllocator;
7072 typedef boost::ptr_map<
7173 Key,
7274 Value,
7375 std::less<Key>,
7476 ValueCloneAllocator,
75- boost::fast_pool_allocator<std::pair< const Key, void *> > > KeyValueMap;
77+ KeyValuePtrPairAllocator > KeyValueMap;
7678
7779 // The member to store the values, see just above
7880 KeyValueMap values_;
You can’t perform that action at this time.
0 commit comments