mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-08 04:27:53 +03:00
stack pruning
This commit is contained in:
parent
d0560722cd
commit
b8a8876a99
@ -15,6 +15,17 @@
|
|||||||
|
|
||||||
using namespace std;
|
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,
|
Hypothesis::Hypothesis(Manager &mgr,
|
||||||
const TargetPhrase &tp,
|
const TargetPhrase &tp,
|
||||||
const Moses::Range &range,
|
const Moses::Range &range,
|
||||||
|
@ -23,6 +23,7 @@ class Scores;
|
|||||||
class Hypothesis {
|
class Hypothesis {
|
||||||
friend std::ostream& operator<<(std::ostream &, const Hypothesis &);
|
friend std::ostream& operator<<(std::ostream &, const Hypothesis &);
|
||||||
public:
|
public:
|
||||||
|
Hypothesis(Manager &mgr);
|
||||||
Hypothesis(Manager &mgr,
|
Hypothesis(Manager &mgr,
|
||||||
const TargetPhrase &tp,
|
const TargetPhrase &tp,
|
||||||
const Moses::Range &range,
|
const Moses::Range &range,
|
||||||
|
Loading…
Reference in New Issue
Block a user