summaryrefslogtreecommitdiff
path: root/klm/lm/search_trie.hh
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-10-10 19:02:40 +0100
committerKenneth Heafield <github@kheafield.com>2012-10-10 19:02:40 +0100
commita36fcc5d55c1de84ae68c1091ebff2b1c32dc3b7 (patch)
tree1c22c35065e52c5ae69fa915bd502939be801374 /klm/lm/search_trie.hh
parent8a10fd2856e13489cc10d2c683ecbce687f1e5ff (diff)
KenLM 8307220
Diffstat (limited to 'klm/lm/search_trie.hh')
-rw-r--r--klm/lm/search_trie.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/klm/lm/search_trie.hh b/klm/lm/search_trie.hh
index 10b22ab1..1264baf5 100644
--- a/klm/lm/search_trie.hh
+++ b/klm/lm/search_trie.hh
@@ -44,8 +44,8 @@ template <class Quant, class Bhiksha> class TrieSearch {
Bhiksha::UpdateConfigFromBinary(fd, config);
}
- static std::size_t Size(const std::vector<uint64_t> &counts, const Config &config) {
- std::size_t ret = Quant::Size(counts.size(), config) + Unigram::Size(counts[0]);
+ static uint64_t Size(const std::vector<uint64_t> &counts, const Config &config) {
+ uint64_t ret = Quant::Size(counts.size(), config) + Unigram::Size(counts[0]);
for (unsigned char i = 1; i < counts.size() - 1; ++i) {
ret += Middle::Size(Quant::MiddleBits(config), counts[i], counts[0], counts[i+1], config);
}