diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-20 17:02:06 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-20 17:02:06 +0300 |
commit | b4bffedfcd557ac2d093bf54b59cbf1b513918a0 (patch) | |
tree | aa6c00533794fb646ac646a6ee3c6d9a473a42c2 /moses/BitmapContainer.h | |
parent | 814b917c9bd1dc70691e46f367ea458f59ebd8cf (diff) |
don't use bitmap& for bitmap container. Seems to slow down for single thread
Diffstat (limited to 'moses/BitmapContainer.h')
-rw-r--r-- | moses/BitmapContainer.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/moses/BitmapContainer.h b/moses/BitmapContainer.h index b49a57b4d..17d8a3cbe 100644 --- a/moses/BitmapContainer.h +++ b/moses/BitmapContainer.h @@ -202,7 +202,7 @@ public: class BitmapContainer { private: - const WordsBitmap *m_bitmap; + const WordsBitmap m_bitmap; HypothesisStackCubePruning &m_stack; HypothesisSet m_hypotheses; BackwardsEdgeSet m_edges; @@ -214,7 +214,8 @@ private: BitmapContainer(); BitmapContainer(const BitmapContainer &); public: - BitmapContainer(HypothesisStackCubePruning &stack + BitmapContainer(const WordsBitmap &bitmap + , HypothesisStackCubePruning &stack , bool deterministic_sort = false); // The destructor will also delete all the edges that are @@ -229,11 +230,7 @@ public: const WordsBitmap &GetWordsBitmap() const { - return *m_bitmap; - } - void SetWordsBitmap(const WordsBitmap &bitmap) - { - m_bitmap = &bitmap; + return m_bitmap; } const HypothesisSet &GetHypotheses() const; |