mirror of
https://github.com/simon987/fastimagehash.git
synced 2025-12-16 07:39:02 +00:00
Add multi_hash (wip/untested)
This commit is contained in:
@@ -67,10 +67,28 @@ static void BM_ahash(benchmark::State &state) {
|
||||
free(buf);
|
||||
}
|
||||
|
||||
static void BM_multi(benchmark::State &state) {
|
||||
|
||||
size_t size;
|
||||
void *buf = load_test_file(&size);
|
||||
|
||||
multi_hash_t *m = multi_hash_create(state.range());
|
||||
|
||||
for (auto _ : state) {
|
||||
multi_hash_file(filepath, m, state.range(), 4, 0);
|
||||
}
|
||||
|
||||
multi_hash_destroy(m);
|
||||
|
||||
free(buf);
|
||||
}
|
||||
|
||||
|
||||
BENCHMARK(BM_phash)->ArgName("size")->Arg(8);
|
||||
BENCHMARK(BM_whash)->ArgName("size")->Arg(8);
|
||||
BENCHMARK(BM_dhash)->ArgName("size")->Arg(8);
|
||||
BENCHMARK(BM_ahash)->ArgName("size")->Arg(8);
|
||||
BENCHMARK(BM_multi)->ArgName("size")->Arg(8);
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
Reference in New Issue
Block a user