mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-06 19:49:41 +03:00
mempool for batch vector
This commit is contained in:
parent
f8744cf071
commit
8f4cb5e9f7
@ -18,7 +18,7 @@ StatefulFeatureFunction::~StatefulFeatureFunction() {
|
||||
// TODO Auto-generated destructor stub
|
||||
}
|
||||
|
||||
void StatefulFeatureFunction::EvaluateWhenApplied(const std::vector<Hypothesis*> &hypos) const
|
||||
void StatefulFeatureFunction::EvaluateWhenApplied(const std::vector<Hypothesis*, MemPoolAllocator<Hypothesis*> > &hypos) const
|
||||
{
|
||||
BOOST_FOREACH(Hypothesis *hypo, hypos) {
|
||||
hypo->EvaluateWhenApplied(*this);
|
||||
|
@ -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<Hypothesis*> &hypos) const;
|
||||
virtual void EvaluateWhenApplied(const std::vector<Hypothesis*, MemPoolAllocator<Hypothesis*> > &hypos) const;
|
||||
|
||||
virtual void EvaluateWhenApplied(const Manager &mgr,
|
||||
const Hypothesis &hypo,
|
||||
|
@ -148,7 +148,7 @@ KENLMBatch::EvaluateInIsolation(const System &system,
|
||||
}
|
||||
}
|
||||
|
||||
void KENLMBatch::EvaluateWhenApplied(const std::vector<Hypothesis*> &hypos) const
|
||||
void KENLMBatch::EvaluateWhenApplied(const std::vector<Hypothesis*, MemPoolAllocator<Hypothesis*> > &hypos) const
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
Scores &scores,
|
||||
Scores *estimatedScores) const;
|
||||
|
||||
virtual void EvaluateWhenApplied(const std::vector<Hypothesis*> &hypos) const;
|
||||
virtual void EvaluateWhenApplied(const std::vector<Hypothesis*, MemPoolAllocator<Hypothesis*> > &hypos) const;
|
||||
|
||||
virtual void EvaluateWhenApplied(const Manager &mgr,
|
||||
const Hypothesis &hypo,
|
||||
|
@ -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<Hypothesis*> m_hypos;
|
||||
std::vector<Hypothesis*, MemPoolAllocator<Hypothesis*> > m_hypos;
|
||||
|
||||
void Extend(const Hypothesis &hypo);
|
||||
void Extend(const Hypothesis &hypo, const InputPath &path);
|
||||
|
Loading…
Reference in New Issue
Block a user