From 8f4cb5e9f72a754a93ef221a00532611a1ae1168 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Tue, 17 Nov 2015 15:29:45 +0000 Subject: [PATCH] mempool for batch vector --- contrib/other-builds/moses2/FF/StatefulFeatureFunction.cpp | 2 +- contrib/other-builds/moses2/FF/StatefulFeatureFunction.h | 3 ++- contrib/other-builds/moses2/LM/KENLMBatch.cpp | 2 +- contrib/other-builds/moses2/LM/KENLMBatch.h | 2 +- contrib/other-builds/moses2/Search/SearchNormalBatch.h | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/contrib/other-builds/moses2/FF/StatefulFeatureFunction.cpp b/contrib/other-builds/moses2/FF/StatefulFeatureFunction.cpp index f1acb2b4b..0330213c4 100644 --- a/contrib/other-builds/moses2/FF/StatefulFeatureFunction.cpp +++ b/contrib/other-builds/moses2/FF/StatefulFeatureFunction.cpp @@ -18,7 +18,7 @@ StatefulFeatureFunction::~StatefulFeatureFunction() { // TODO Auto-generated destructor stub } -void StatefulFeatureFunction::EvaluateWhenApplied(const std::vector &hypos) const +void StatefulFeatureFunction::EvaluateWhenApplied(const std::vector > &hypos) const { BOOST_FOREACH(Hypothesis *hypo, hypos) { hypo->EvaluateWhenApplied(*this); diff --git a/contrib/other-builds/moses2/FF/StatefulFeatureFunction.h b/contrib/other-builds/moses2/FF/StatefulFeatureFunction.h index b52ee20c5..6cc7ab2c5 100644 --- a/contrib/other-builds/moses2/FF/StatefulFeatureFunction.h +++ b/contrib/other-builds/moses2/FF/StatefulFeatureFunction.h @@ -10,6 +10,7 @@ #include "FeatureFunction.h" #include "../legacy/FFState.h" +#include "../MemPool.h" class Hypothesis; @@ -30,7 +31,7 @@ public: //! return the state associated with the empty hypothesis for a given sentence virtual void EmptyHypothesisState(FFState &state, const Manager &mgr, const PhraseImpl &input) const = 0; - virtual void EvaluateWhenApplied(const std::vector &hypos) const; + virtual void EvaluateWhenApplied(const std::vector > &hypos) const; virtual void EvaluateWhenApplied(const Manager &mgr, const Hypothesis &hypo, diff --git a/contrib/other-builds/moses2/LM/KENLMBatch.cpp b/contrib/other-builds/moses2/LM/KENLMBatch.cpp index 8f2202fdc..a0ffccf16 100644 --- a/contrib/other-builds/moses2/LM/KENLMBatch.cpp +++ b/contrib/other-builds/moses2/LM/KENLMBatch.cpp @@ -148,7 +148,7 @@ KENLMBatch::EvaluateInIsolation(const System &system, } } -void KENLMBatch::EvaluateWhenApplied(const std::vector &hypos) const +void KENLMBatch::EvaluateWhenApplied(const std::vector > &hypos) const { } diff --git a/contrib/other-builds/moses2/LM/KENLMBatch.h b/contrib/other-builds/moses2/LM/KENLMBatch.h index cbc360608..daee20e7f 100644 --- a/contrib/other-builds/moses2/LM/KENLMBatch.h +++ b/contrib/other-builds/moses2/LM/KENLMBatch.h @@ -34,7 +34,7 @@ public: Scores &scores, Scores *estimatedScores) const; - virtual void EvaluateWhenApplied(const std::vector &hypos) const; + virtual void EvaluateWhenApplied(const std::vector > &hypos) const; virtual void EvaluateWhenApplied(const Manager &mgr, const Hypothesis &hypo, diff --git a/contrib/other-builds/moses2/Search/SearchNormalBatch.h b/contrib/other-builds/moses2/Search/SearchNormalBatch.h index e3971ada2..dba32f5dc 100644 --- a/contrib/other-builds/moses2/Search/SearchNormalBatch.h +++ b/contrib/other-builds/moses2/Search/SearchNormalBatch.h @@ -11,6 +11,7 @@ #include "../legacy/Range.h" #include "../legacy/Bitmap.h" #include "../TypeDef.h" +#include "../MemPool.h" #include "ArcLists.h" #include "Search.h" @@ -31,7 +32,7 @@ public: const Hypothesis *GetBestHypothesis() const; protected: - std::vector m_hypos; + std::vector > m_hypos; void Extend(const Hypothesis &hypo); void Extend(const Hypothesis &hypo, const InputPath &path);