mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-05 02:22:21 +03:00
use boost fast pool allocator
This commit is contained in:
parent
08f61d69e9
commit
181914b822
@ -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;
|
||||
|
@ -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>())
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user