diff --git a/parallel_hashmap/phmap.h b/parallel_hashmap/phmap.h index ce43800..d3ab145 100644 --- a/parallel_hashmap/phmap.h +++ b/parallel_hashmap/phmap.h @@ -3206,16 +3206,18 @@ public: // NOTE: This is a very low level operation and should not be used without // specific benchmarks indicating its importance. // -------------------------------------------------------------------- - template - void prefetch(const key_arg& key) const { - (void)key; - size_t hashval = this->hash(key); + void prefetch_hash(size_t hashval) const { const Inner& inner = sets_[subidx(hashval)]; const auto& set = inner.set_; typename Lockable::SharedLock m(const_cast(inner)); set.prefetch_hash(hashval); } + template + void prefetch(const key_arg& key) const { + prefetch_hash(this->hash(key)); + } + // The API of find() has two extensions. // // 1. The hash can be passed by the user. It must be equal to the hash of the