20 #include <gtsam/config.h> 22 #if !defined GTSAM_ALLOCATOR_BOOSTPOOL && !defined GTSAM_ALLOCATOR_TBB && !defined GTSAM_ALLOCATOR_STL 25 # define GTSAM_ALLOCATOR_TBB 27 # define GTSAM_ALLOCATOR_BOOSTPOOL 31 #if defined GTSAM_ALLOCATOR_BOOSTPOOL 32 # include <boost/pool/pool_alloc.hpp> 33 #elif defined GTSAM_ALLOCATOR_TBB 34 # include <tbb/tbb_allocator.h> 35 # undef min // TBB seems to include Windows.h which defines these macros that cause problems 38 #elif defined GTSAM_ALLOCATOR_STL 51 #if defined GTSAM_ALLOCATOR_BOOSTPOOL 52 typedef boost::fast_pool_allocator<T>
type;
54 static const bool isTBB =
false;
55 static const bool isSTL =
false;
56 #elif defined GTSAM_ALLOCATOR_TBB 57 typedef tbb::tbb_allocator<T>
type;
58 static const bool isBoost =
false;
59 static const bool isTBB =
true;
60 static const bool isSTL =
false;
61 #elif defined GTSAM_ALLOCATOR_STL 62 typedef std::allocator<T>
type;
63 static const bool isBoost =
false;
64 static const bool isTBB =
false;
65 static const bool isSTL =
true;
73 #if defined GTSAM_ALLOCATOR_TBB 74 typedef tbb::tbb_allocator<T>
type;
75 static const bool isBoost =
false;
76 static const bool isTBB =
true;
77 static const bool isSTL =
false;
79 typedef std::allocator<T>
type;
80 static const bool isBoost =
false;
81 static const bool isTBB =
false;
82 static const bool isSTL =
true;
static const bool isBoost
Default allocator for list, map, and set types.
Default allocator for vector types (we never use boost pool for vectors)
boost::fast_pool_allocator< T > type