Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2015-10-19 12:58:29 +0300
committerHieu Hoang <hieuhoang@gmail.com>2015-10-19 13:48:27 +0300
commitb9f216cc96fda35fad9983037f02100e611c55fc (patch)
tree473c6cb6cca70f385bbb0edc9eeb380c988508bb /moses/Hypothesis.cpp
parentf7839c42d5cf2de17e86ec16df5e2f541ba53c75 (diff)
delete use of mempool in Hypos. Never used. Getting in the way of next refactoring
Diffstat (limited to 'moses/Hypothesis.cpp')
-rw-r--r--moses/Hypothesis.cpp51
1 files changed, 2 insertions, 49 deletions
diff --git a/moses/Hypothesis.cpp b/moses/Hypothesis.cpp
index 399a4b821..eafdd8bd7 100644
--- a/moses/Hypothesis.cpp
+++ b/moses/Hypothesis.cpp
@@ -43,11 +43,6 @@ using namespace std;
namespace Moses
{
-
-#ifdef USE_HYPO_POOL
-ObjectPool<Hypothesis> Hypothesis::s_objectPool("Hypothesis", 300000);
-#endif
-
Hypothesis::
Hypothesis(Manager& manager, InputType const& source, const TranslationOption &initialTransOpt)
: m_prevHypo(NULL)
@@ -118,7 +113,7 @@ Hypothesis::
if (m_arcList) {
ArcList::iterator iter;
for (iter = m_arcList->begin() ; iter != m_arcList->end() ; ++iter) {
- FREEHYPO(*iter);
+ delete *iter;
}
m_arcList->clear();
@@ -153,48 +148,6 @@ AddArc(Hypothesis *loserHypo)
m_arcList->push_back(loserHypo);
}
-/***
- * return the subclass of Hypothesis most appropriate to the given translation option
- */
-Hypothesis*
-Hypothesis::
-CreateNext(const TranslationOption &transOpt) const
-{
- return Create(*this, transOpt);
-}
-
-/***
- * return the subclass of Hypothesis most appropriate to the given translation option
- */
-Hypothesis*
-Hypothesis::
-Create(const Hypothesis &prevHypo, const TranslationOption &transOpt)
-{
-
-#ifdef USE_HYPO_POOL
- Hypothesis *ptr = s_objectPool.getPtr();
- return new(ptr) Hypothesis(prevHypo, transOpt);
-#else
- return new Hypothesis(prevHypo, transOpt);
-#endif
-}
-/***
- * return the subclass of Hypothesis most appropriate to the given target phrase
- */
-
-Hypothesis*
-Hypothesis::
-Create(Manager& manager, InputType const& m_source,
- const TranslationOption &initialTransOpt)
-{
-#ifdef USE_HYPO_POOL
- Hypothesis *ptr = s_objectPool.getPtr();
- return new(ptr) Hypothesis(manager, m_source, initialTransOpt);
-#else
- return new Hypothesis(manager, m_source, initialTransOpt);
-#endif
-}
-
void
Hypothesis::
EvaluateWhenApplied(StatefulFeatureFunction const& sfff,
@@ -350,7 +303,7 @@ CleanupArcList()
// delete bad ones
ArcList::iterator iter;
for (iter = m_arcList->begin() + nBestSize; iter != m_arcList->end() ; ++iter)
- FREEHYPO(*iter);
+ delete *iter;
m_arcList->erase(m_arcList->begin() + nBestSize, m_arcList->end());
}