MCPcopy Create free account
hub / github.com/davisking/dlib / test_murmur_hash_64_2

Function test_murmur_hash_64_2

dlib/test/hash.cpp:160–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 }
159
160 void test_murmur_hash_64_2()
161 {
162 byte_orderer bo;
163 dlib::rand rnd;
164 for (int i = 0; i < 100; ++i)
165 {
166 uint32 val = rnd.get_random_32bit_number();
167 const uint32 seed = rnd.get_random_32bit_number();
168
169
170 bo.host_to_little(val);
171 uint32 temp1, temp2;
172
173 // Make sure the 2 integer version of murmur hash does the same thing
174 // as the memory block version.
175 temp1 = murmur_hash3(&val, sizeof(val), seed);
176 temp2 = murmur_hash3_2(val, seed);
177 DLIB_TEST(temp1 == temp2);
178 }
179 }
180
181 void test_murmur_hash_64_3()
182 {

Callers 1

perform_testMethod · 0.85

Calls 4

murmur_hash3Function · 0.85
murmur_hash3_2Function · 0.85
host_to_littleMethod · 0.80

Tested by

no test coverage detected