| 362 | } |
| 363 | |
| 364 | size_t compute_samples_hash(const char* fn, const size_t* samples_begin, const size_t* samples_size, size_t sample_count) { |
| 365 | std::hash<std::string> h_string; |
| 366 | std::hash<unsigned long long> h_ull; |
| 367 | size_t h = h_string(std::string(fn)); |
| 368 | h = hash_combine(h, h_ull((unsigned long long) sample_count)); |
| 369 | for (size_t i=0; i< sample_count; ++i) { |
| 370 | h = hash_combine(h, h_ull((unsigned long long) samples_begin[i])); |
| 371 | h = hash_combine(h, h_ull((unsigned long long) samples_size[i])); |
| 372 | } |
| 373 | return h; |
| 374 | } |
| 375 | |
| 376 | std::string replace_str(const char * s, const char * needle, const char * replacement) { |
| 377 | std::string str = s; |
no test coverage detected