Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benfred committed Sep 19, 2023
1 parent e42a272 commit 92d11ed
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions cpp/bench/ann/src/common/benchmark.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,18 @@ void bench_search(::benchmark::State& state,
algo = ualgo.get();
algo->load(index_file);
current_algo = std::move(ualgo);
}

if (search_param->needs_dataset()) {
try {
const auto algo_property = parse_algo_property(algo->get_preference(), sp_json);
algo->set_search_dataset(dataset->base_set(algo_property.dataset_memory_type),
dataset->base_set_size());
} catch (const std::exception& ex) {
state.SkipWithError("The algorithm '" + index.name +
"' requires the base set, but it's not available. " +
"Exception: " + std::string(ex.what()));
return;
if (search_param->needs_dataset()) {
try {
const auto algo_property = parse_algo_property(algo->get_preference(), sp_json);
algo->set_search_dataset(dataset->base_set(algo_property.dataset_memory_type),
dataset->base_set_size());
} catch (const std::exception& ex) {
state.SkipWithError("The algorithm '" + index.name +
"' requires the base set, but it's not available. " +
"Exception: " + std::string(ex.what()));
return;
}
}
}
} catch (const std::exception& e) {
Expand Down

0 comments on commit 92d11ed

Please sign in to comment.