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-20 17:02:06 +0300
committerHieu Hoang <hieuhoang@gmail.com>2015-10-20 17:02:06 +0300
commitb4bffedfcd557ac2d093bf54b59cbf1b513918a0 (patch)
treeaa6c00533794fb646ac646a6ee3c6d9a473a42c2 /moses/HypothesisStackCubePruning.cpp
parent814b917c9bd1dc70691e46f367ea458f59ebd8cf (diff)
don't use bitmap& for bitmap container. Seems to slow down for single thread
Diffstat (limited to 'moses/HypothesisStackCubePruning.cpp')
-rw-r--r--moses/HypothesisStackCubePruning.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/moses/HypothesisStackCubePruning.cpp b/moses/HypothesisStackCubePruning.cpp
index ff28b7c0a..188b4f591 100644
--- a/moses/HypothesisStackCubePruning.cpp
+++ b/moses/HypothesisStackCubePruning.cpp
@@ -299,14 +299,8 @@ BitmapContainer *HypothesisStackCubePruning::AddBitmapContainer(const WordsBitma
BitmapContainer *bmContainer;
if (iter == m_bitmapAccessor.end()) {
- bmContainer = new BitmapContainer(stack, m_deterministic);
- _BMType::value_type element(bitmap, bmContainer);
- pair<_BMType::iterator,bool> retPair = m_bitmapAccessor.insert(element);
-
- _BMType::iterator &iterRetPair = retPair.first;
- const WordsBitmap &storedBitmap = iterRetPair->first;
-
- bmContainer->SetWordsBitmap(storedBitmap);
+ bmContainer = new BitmapContainer(bitmap, stack, m_deterministic);
+ m_bitmapAccessor[bitmap] = bmContainer;
} else {
bmContainer = iter->second;
}