diff --git a/contrib/other-builds/moses2/Search/CubePruning/Misc.h b/contrib/other-builds/moses2/Search/CubePruning/Misc.h index 58a8343f0..6727f5b33 100644 --- a/contrib/other-builds/moses2/Search/CubePruning/Misc.h +++ b/contrib/other-builds/moses2/Search/CubePruning/Misc.h @@ -60,7 +60,11 @@ public: typedef std::priority_queue, QueueItemOrderer> Queue; - typedef boost::unordered_set< std::pair > SeenPositions; + typedef boost::unordered_set< std::pair, + boost::hash< std::pair >, + std::equal_to< std::pair >, + MemPoolAllocator< std::pair > + > SeenPositions; const Hypotheses &hypos; const InputPath &path; diff --git a/contrib/other-builds/moses2/Search/CubePruning/Search.cpp b/contrib/other-builds/moses2/Search/CubePruning/Search.cpp index 35f77e6e1..4c62a2c3b 100644 --- a/contrib/other-builds/moses2/Search/CubePruning/Search.cpp +++ b/contrib/other-builds/moses2/Search/CubePruning/Search.cpp @@ -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>(mgr.GetPool())) { } diff --git a/contrib/other-builds/moses2/Search/CubePruning/Search.h b/contrib/other-builds/moses2/Search/CubePruning/Search.h index 05e75732d..106f28f44 100644 --- a/contrib/other-builds/moses2/Search/CubePruning/Search.h +++ b/contrib/other-builds/moses2/Search/CubePruning/Search.h @@ -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 diff --git a/contrib/other-builds/moses2/System.cpp b/contrib/other-builds/moses2/System.cpp index e7aa53067..0b1e363a8 100644 --- a/contrib/other-builds/moses2/System.cpp +++ b/contrib/other-builds/moses2/System.cpp @@ -170,10 +170,5 @@ NSCubePruning::CubeEdge::Queue &System::GetQueue() const return GetThreadSpecificObj(m_queue); } -NSCubePruning::CubeEdge::SeenPositions &System::GetSeenPositions() const -{ - return GetThreadSpecificObj(m_seenPositions); -} - } diff --git a/contrib/other-builds/moses2/System.h b/contrib/other-builds/moses2/System.h index 1ef2b999a..3917ece18 100644 --- a/contrib/other-builds/moses2/System.h +++ b/contrib/other-builds/moses2/System.h @@ -66,7 +66,6 @@ public: ObjectPoolContiguous &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 > 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 m_bitmaps;