diff options
author | Kenneth Heafield <kenlm@kheafield.com> | 2011-06-26 18:40:15 -0400 |
---|---|---|
committer | Kenneth Heafield <kenlm@kheafield.com> | 2011-06-26 18:40:15 -0400 |
commit | 44b023d165402406fc20bb5fa240cb9a9ebf32ea (patch) | |
tree | 1328ea3c06da5fe3e8733bb1a13fead1855ac947 /klm/util/bit_packing.cc | |
parent | 5fb86e4236cbca8285f2df6e10f44098afbf8dc0 (diff) |
Quantization
Diffstat (limited to 'klm/util/bit_packing.cc')
-rw-r--r-- | klm/util/bit_packing.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/klm/util/bit_packing.cc b/klm/util/bit_packing.cc index 681da5f2..41999b72 100644 --- a/klm/util/bit_packing.cc +++ b/klm/util/bit_packing.cc @@ -28,10 +28,10 @@ void BitPackingSanity() { memset(mem, 0, sizeof(mem)); const uint64_t test57 = 0x123456789abcdefULL; for (uint64_t b = 0; b < 57 * 8; b += 57) { - WriteInt57(mem + b / 8, b % 8, 57, test57); + WriteInt57(mem, b, 57, test57); } for (uint64_t b = 0; b < 57 * 8; b += 57) { - if (test57 != ReadInt57(mem + b / 8, b % 8, 57, (1ULL << 57) - 1)) + if (test57 != ReadInt57(mem, b, 57, (1ULL << 57) - 1)) UTIL_THROW(Exception, "The bit packing routines are failing for your architecture. Please send a bug report with your architecture, operating system, and compiler."); } // TODO: more checks. |