diff options
author | Kenneth Heafield <kenlm@kheafield.com> | 2011-09-23 16:09:56 -0400 |
---|---|---|
committer | Kenneth Heafield <kenlm@kheafield.com> | 2011-09-23 16:09:56 -0400 |
commit | fcbb924a575df56de53eacce886ebf9ccf3283ed (patch) | |
tree | 6a0d04054bcb5028e25e3eea5ce20dcc06111349 /klm | |
parent | 8ecf63852d730f99e7c1bbacfbffdf518d5a0c3f (diff) |
Add ZeroRemaining
Diffstat (limited to 'klm')
-rw-r--r-- | klm/lm/left.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/klm/lm/left.hh b/klm/lm/left.hh index df69e97a..837be765 100644 --- a/klm/lm/left.hh +++ b/klm/lm/left.hh @@ -26,6 +26,11 @@ struct Left { return 0; } + void ZeroRemaining() { + for (uint64_t * i = pointers + length; i < pointers + kMaxOrder - 1; ++i) + *i = 0; + } + uint64_t pointers[kMaxOrder - 1]; unsigned char length; }; @@ -43,6 +48,11 @@ struct ChartState { return (int)full - (int)other.full; } + void ZeroRemaining() { + left.ZeroRemaining(); + right.ZeroRemaining(); + } + Left left; State right; bool full; |