mirror of
https://github.com/deepseek-ai/3FS
synced 2025-06-26 18:16:45 +00:00
Initial commit
This commit is contained in:
16
tests/common/utils/TestHashCombine.cc
Normal file
16
tests/common/utils/TestHashCombine.cc
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <cstdint>
|
||||
#include <folly/hash/Hash.h>
|
||||
|
||||
#include "common/utils/RobinHoodUtils.h"
|
||||
#include "tests/GtestHelpers.h"
|
||||
|
||||
namespace hf3fs::test {
|
||||
namespace {
|
||||
TEST(HashCombine, testUint64) {
|
||||
for (uint64_t x = 0; x < 64; ++x) {
|
||||
auto h = folly::hash::hash_combine_generic(RobinHoodHasher{}, x);
|
||||
fmt::print("x = {} h = {} h % 256 = {}\n", x, h, h % 256);
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
} // namespace hf3fs::test
|
||||
Reference in New Issue
Block a user