use boost fast pool allocator

This commit is contained in:
Hieu Hoang 2015-12-30 22:58:12 +00:00
parent 08f61d69e9
commit 181914b822
3 changed files with 5 additions and 5 deletions

View File

@ -59,7 +59,7 @@ class CubeEdge
public:
typedef Vector<const Hypothesis*> Hypotheses;
typedef std::priority_queue<QueueItem*,
std::vector<QueueItem*, boost::pool_allocator<QueueItem*> >,
std::vector<QueueItem*, boost::fast_pool_allocator<QueueItem*> >,
QueueItemOrderer> Queue;
typedef std::pair<const CubeEdge*, int> SeenPositionItem;

View File

@ -29,8 +29,8 @@ Search::Search(Manager &mgr)
,m_stacks(mgr)
,m_queueOrder(new QueueItemOrderer())
,m_queueContainerAlloc(new boost::pool_allocator<QueueItem*>())
,m_queueContainer(new std::vector<QueueItem*, boost::pool_allocator<QueueItem*> >(*m_queueContainerAlloc))
,m_queueContainerAlloc(new boost::fast_pool_allocator<QueueItem*>())
,m_queueContainer(new std::vector<QueueItem*, boost::fast_pool_allocator<QueueItem*> >(*m_queueContainerAlloc))
,m_queue(new CubeEdge::Queue(*m_queueOrder, *m_queueContainer))
,m_seenPositionsAlloc(new boost::pool_allocator<CubeEdge::SeenPositionItem>())

View File

@ -36,8 +36,8 @@ protected:
Stacks m_stacks;
QueueItemOrderer *m_queueOrder;
boost::pool_allocator<QueueItem*> *m_queueContainerAlloc;
std::vector<QueueItem*, boost::pool_allocator<QueueItem*> > *m_queueContainer;
boost::fast_pool_allocator<QueueItem*> *m_queueContainerAlloc;
std::vector<QueueItem*, boost::fast_pool_allocator<QueueItem*> > *m_queueContainer;
CubeEdge::Queue *m_queue;
boost::pool_allocator<CubeEdge::SeenPositionItem> *m_seenPositionsAlloc;