Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2014-01-28 04:51:35 +0400
committerKenneth Heafield <github@kheafield.com>2014-01-28 04:51:35 +0400
commit14e02978fcbbe9ec6ed3faa232fcb3f30664f40e (patch)
tree0b0d19a9c1ba1020ae6b3f1230b8b5b9e6a945f9 /util/probing_hash_table.hh
parentb68a906fdd97c344ce7d6fa90a2db5a79c5853e6 (diff)
KenLM 5cc905bc2d214efa7de2db56a9a672b749a95591
Avoid unspecified behavior of mmap when a file is resized reported by Christian Hardmeier Fixes for Mavericks and a workaround for Boost's broken semaphore Clean clang compile (of kenlm) Merged some of 744376b3fbebc41c4a270bf549826d5eb9219ae0 but also undid some of it because it was just masking a fundaemntal problem with pread rather than working around windows limitations
Diffstat (limited to 'util/probing_hash_table.hh')
-rw-r--r--util/probing_hash_table.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/util/probing_hash_table.hh b/util/probing_hash_table.hh
index 9566028f5..38524806c 100644
--- a/util/probing_hash_table.hh
+++ b/util/probing_hash_table.hh
@@ -70,6 +70,11 @@ template <class EntryT, class HashT, class EqualT = std::equal_to<typename Entry
#endif
{}
+ void Relocate(void *new_base) {
+ begin_ = reinterpret_cast<MutableIterator>(new_base);
+ end_ = begin_ + buckets_;
+ }
+
template <class T> MutableIterator Insert(const T &t) {
#ifdef DEBUG
assert(initialized_);
@@ -98,8 +103,6 @@ template <class EntryT, class HashT, class EqualT = std::equal_to<typename Entry
void FinishedInserting() {}
- void LoadedBinary() {}
-
// Don't change anything related to GetKey,
template <class Key> bool UnsafeMutableFind(const Key key, MutableIterator &out) {
#ifdef DEBUG