19 #include <glog/logging.h> 25 using namespace folly;
31 uint64_t val_a = 0xfaceb00cdeadbeefUL;
32 uint64_t val_b = 0x1234567890abcdefUL;
56 uint64_t val_a = 0xfaceb00cdeadbeefUL;
57 uint64_t val_b = 0x1234567890abcdefUL;
59 for (
int i = 0;
i < 8;
i++) {
60 bytes[
i] = (val_a >> (8 * (7 -
i))) & 0xff;
62 for (
int i = 0;
i < 8;
i++) {
63 bytes[
i + 8] = (val_b >> (8 * (7 -
i))) & 0xff;
75 for (
int i = 0;
i < 16;
i++) {
81 .update32(val_a >> 32)
97 for (
int i = 0;
i < 16;
i++) {
103 .update32(val_a >> 32)
112 uconv[1] = (
uint64_t)uconv_lsb << 32;
125 for (
int i = 0;
i < 16;
i++) {
131 .update32(val_a >> 32)
152 const char test_str[] =
"hello world 12345";
153 int len =
sizeof(test_str) - 1;
154 std::unique_ptr<char[]> str(
new char[len + 8]);
157 for (
int i = 0;
i < 8;
i++) {
161 for (
int j = 0; j <
i; j++) {
165 for (
int j = 0; j < len; j++) {
168 for (
int j = i; j < 8; j++) {
180 gflags::ParseCommandLineFlags(&argc, &argv,
true);
void fingerprint128(StringPiece str, uint64_t *msb, uint64_t *lsb)
uint64_t fingerprint64(StringPiece str)
void write(const T &in, folly::io::Appender &appender)
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
#define EXPECT_EQ(val1, val2)
Fingerprint & update8(uint8_t v)
SlowFingerprint & update64(uint64_t v)
—— Concurrent Priority Queue Implementation ——
int main(int argc, char *argv[])
void write(uint64_t *out) const
Fingerprint & update64(uint64_t v)
Fingerprint & update32(uint32_t v)
void fingerprint96(StringPiece str, uint64_t *msb, uint32_t *lsb)
bool runBenchmarksOnFlag()
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Range< const char * > StringPiece
TEST(SequencedExecutor, CPUThreadPoolExecutor)
void write(uint64_t *out) const