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 | 4345ba633b08929d87afa60155ed14a84f9a47bb (patch) | |
tree | 6c185cd36a1a435f0ea294d588117be167a7fe0b /klm/lm | |
parent | 557f85fd642541aa8da5ffeff26dbd3fdcc7474e (diff) |
Add ZeroRemaining
Diffstat (limited to 'klm/lm')
-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; |