diff options
author | Barry Haddow <barry.haddow@gmail.com> | 2012-10-08 20:54:59 +0400 |
---|---|---|
committer | Barry Haddow <barry.haddow@gmail.com> | 2012-10-08 20:54:59 +0400 |
commit | 848aafb64478f843e25a800c57243b38609465ef (patch) | |
tree | be3dce6647a1a300b48ccbd32b36dc65b56c998f /util/ersatz_progress.hh | |
parent | e7e4dbd405e8d29a9a429c6b5eb366a2fe0ecf9a (diff) | |
parent | 2aa10c3012328d8fd66ceee26c25e3d8771f9f31 (diff) |
Merge remote branch 'github/master' into miramerge
Conflicts:
moses/src/AlignmentInfo.cpp
moses/src/AlignmentInfo.h
moses/src/ChartHypothesis.cpp
moses/src/ChartTrellisNode.cpp
moses/src/LM/Implementation.cpp
moses/src/LM/Ken.cpp
moses/src/TargetPhrase.cpp
moses/src/TargetPhrase.h
Diffstat (limited to 'util/ersatz_progress.hh')
-rw-r--r-- | util/ersatz_progress.hh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/util/ersatz_progress.hh b/util/ersatz_progress.hh index f709dc516..ff4d590ff 100644 --- a/util/ersatz_progress.hh +++ b/util/ersatz_progress.hh @@ -4,6 +4,8 @@ #include <iostream> #include <string> +#include <inttypes.h> + // Ersatz version of boost::progress so core language model doesn't depend on // boost. Also adds option to print nothing. @@ -14,7 +16,7 @@ class ErsatzProgress { ErsatzProgress(); // Null means no output. The null value is useful for passing along the ostream pointer from another caller. - explicit ErsatzProgress(std::size_t complete, std::ostream *to = &std::cerr, const std::string &message = ""); + explicit ErsatzProgress(uint64_t complete, std::ostream *to = &std::cerr, const std::string &message = ""); ~ErsatzProgress(); @@ -23,12 +25,12 @@ class ErsatzProgress { return *this; } - ErsatzProgress &operator+=(std::size_t amount) { + ErsatzProgress &operator+=(uint64_t amount) { if ((current_ += amount) >= next_) Milestone(); return *this; } - void Set(std::size_t to) { + void Set(uint64_t to) { if ((current_ = to) >= next_) Milestone(); Milestone(); } @@ -40,7 +42,7 @@ class ErsatzProgress { private: void Milestone(); - std::size_t current_, next_, complete_; + uint64_t current_, next_, complete_; unsigned char stones_written_; std::ostream *out_; |