#pragma once
#include <array>
+#include <atomic>
+#include <memory>
#include <string>
+
#include "port/port.h"
#include "rocksdb/slice.h"
#include "table/multiget_context.h"
#include "util/hash.h"
-#include <atomic>
-#include <memory>
-
namespace ROCKSDB_NAMESPACE {
class Slice;
// Multithreaded access to this function is OK
bool MayContain(const Slice& key) const;
- void MayContain(int num_keys, Slice** keys, bool* may_match) const;
+ void MayContain(int num_keys, Slice* keys, bool* may_match) const;
// Multithreaded access to this function is OK
bool MayContainHash(uint32_t hash) const;
return (MayContainHash(BloomHash(key)));
}
-inline void DynamicBloom::MayContain(int num_keys, Slice** keys,
+inline void DynamicBloom::MayContain(int num_keys, Slice* keys,
bool* may_match) const {
std::array<uint32_t, MultiGetContext::MAX_BATCH_SIZE> hashes;
std::array<size_t, MultiGetContext::MAX_BATCH_SIZE> byte_offsets;
for (int i = 0; i < num_keys; ++i) {
- hashes[i] = BloomHash(*keys[i]);
+ hashes[i] = BloomHash(keys[i]);
size_t a = FastRange32(kLen, hashes[i]);
PREFETCH(data_ + a, 0, 3);
byte_offsets[i] = a;