mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-05 02:22:21 +03:00
Merge branch 'perf_moses2' of github.com:hieuhoang/mosesdecoder into perf_moses2
This commit is contained in:
commit
8af0300334
@ -60,7 +60,11 @@ public:
|
||||
typedef std::priority_queue<QueueItem*,
|
||||
std::vector<QueueItem*>,
|
||||
QueueItemOrderer> Queue;
|
||||
typedef boost::unordered_set< std::pair<const CubeEdge*, int> > SeenPositions;
|
||||
typedef boost::unordered_set< std::pair<const CubeEdge*, int>,
|
||||
boost::hash< std::pair<const CubeEdge*, int> >,
|
||||
std::equal_to< std::pair<const CubeEdge*, int> >,
|
||||
MemPoolAllocator< std::pair<const CubeEdge*, int> >
|
||||
> SeenPositions;
|
||||
|
||||
const Hypotheses &hypos;
|
||||
const InputPath &path;
|
||||
|
@ -28,7 +28,7 @@ Search::Search(Manager &mgr)
|
||||
:Moses2::Search(mgr)
|
||||
,m_stacks(mgr)
|
||||
,m_queue(mgr.system.GetQueue())
|
||||
,m_seenPositions(mgr.system.GetSeenPositions())
|
||||
,m_seenPositions(MemPoolAllocator<std::pair<const CubeEdge*, int>>(mgr.GetPool()))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
protected:
|
||||
NSCubePruning::Stacks m_stacks;
|
||||
NSCubePruning::CubeEdge::Queue &m_queue;
|
||||
NSCubePruning::CubeEdge::SeenPositions &m_seenPositions;
|
||||
NSCubePruning::CubeEdge::SeenPositions m_seenPositions;
|
||||
|
||||
// CUBE PRUNING VARIABLES
|
||||
// setup
|
||||
|
@ -170,10 +170,5 @@ NSCubePruning::CubeEdge::Queue &System::GetQueue() const
|
||||
return GetThreadSpecificObj(m_queue);
|
||||
}
|
||||
|
||||
NSCubePruning::CubeEdge::SeenPositions &System::GetSeenPositions() const
|
||||
{
|
||||
return GetThreadSpecificObj(m_seenPositions);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,6 @@ public:
|
||||
ObjectPoolContiguous<Hypothesis*> &GetBatchForEval() const;
|
||||
Bitmaps &GetBitmaps() const;
|
||||
NSCubePruning::CubeEdge::Queue &GetQueue() const;
|
||||
NSCubePruning::CubeEdge::SeenPositions &GetSeenPositions() const;
|
||||
|
||||
protected:
|
||||
mutable FactorCollection m_vocab;
|
||||
@ -75,7 +74,6 @@ protected:
|
||||
mutable boost::thread_specific_ptr< ObjectPoolContiguous<Hypothesis*> > m_batchForEval;
|
||||
|
||||
mutable boost::thread_specific_ptr< NSCubePruning::CubeEdge::Queue> m_queue;
|
||||
mutable boost::thread_specific_ptr< NSCubePruning::CubeEdge::SeenPositions> m_seenPositions;
|
||||
|
||||
mutable boost::thread_specific_ptr<Bitmaps> m_bitmaps;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user