mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-05 02:22:21 +03:00
don't use allocator
This commit is contained in:
parent
ff0c559425
commit
22f0329abc
@ -29,12 +29,15 @@ Search::Search(Manager &mgr)
|
||||
,m_stacks(mgr)
|
||||
,m_queue(mgr.system.GetQueue())
|
||||
,m_seenPositions(mgr.system.GetSeenPositions())
|
||||
,m_cubeEdgesAlloc(mgr.GetPool())
|
||||
,m_cubeEdges(m_cubeEdgesAlloc)
|
||||
{
|
||||
}
|
||||
|
||||
Search::~Search() {
|
||||
Search::~Search()
|
||||
{
|
||||
BOOST_FOREACH(CubeEdges &edges, m_cubeEdges) {
|
||||
RemoveAllInColl(edges);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Search::Decode()
|
||||
@ -171,7 +174,7 @@ void Search::PostDecode(size_t stackInd)
|
||||
|
||||
BOOST_FOREACH(const TargetPhrases *tps, path.targetPhrases) {
|
||||
if (tps && tps->GetSize()) {
|
||||
CubeEdge *edge = new (pool.Allocate<CubeEdge>()) CubeEdge(m_mgr, sortedHypos, path, *tps, newBitmap);
|
||||
CubeEdge *edge = new CubeEdge(m_mgr, sortedHypos, path, *tps, newBitmap);
|
||||
edges.push_back(edge);
|
||||
}
|
||||
}
|
||||
|
@ -41,8 +41,7 @@ protected:
|
||||
// setup
|
||||
typedef std::list<CubeEdge*> CubeEdges;
|
||||
|
||||
MemPoolAllocator<CubeEdges> m_cubeEdgesAlloc;
|
||||
std::vector<CubeEdges, MemPoolAllocator<CubeEdges> > m_cubeEdges;
|
||||
std::vector<CubeEdges> m_cubeEdges;
|
||||
|
||||
// CUBE PRUNING
|
||||
// decoding
|
||||
|
Loading…
Reference in New Issue
Block a user