mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-06 19:49:41 +03:00
stack pruning
This commit is contained in:
parent
d0560722cd
commit
b8a8876a99
@ -15,6 +15,17 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
Hypothesis::Hypothesis(Manager &mgr)
|
||||
:m_mgr(mgr)
|
||||
{
|
||||
MemPool &pool = m_mgr.GetPool();
|
||||
|
||||
size_t numStatefulFFs = m_mgr.GetSystem().featureFunctions.GetStatefulFeatureFunctions().size();
|
||||
m_ffStates = (const Moses::FFState **) pool.Allocate(sizeof(Moses::FFState*) * numStatefulFFs);
|
||||
|
||||
m_scores = new (pool.Allocate<Scores>()) Scores(pool, m_mgr.GetSystem().featureFunctions.GetNumScores());
|
||||
}
|
||||
|
||||
Hypothesis::Hypothesis(Manager &mgr,
|
||||
const TargetPhrase &tp,
|
||||
const Moses::Range &range,
|
||||
|
@ -23,6 +23,7 @@ class Scores;
|
||||
class Hypothesis {
|
||||
friend std::ostream& operator<<(std::ostream &, const Hypothesis &);
|
||||
public:
|
||||
Hypothesis(Manager &mgr);
|
||||
Hypothesis(Manager &mgr,
|
||||
const TargetPhrase &tp,
|
||||
const Moses::Range &range,
|
||||
|
Loading…
Reference in New Issue
Block a user