| 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 | { |
no test coverage detected