Skip to content

Commit

Permalink
Fix clang formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
David Kaczynski committed Apr 28, 2023
1 parent 8d6b9e9 commit 87f263f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion tests/range_search_disk_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ int search_disk_index(diskann::Metric &metric, const std::string &index_path_pre
double ratio_of_sums = 0;
if (calc_recall_flag)
{
recall = diskann::calculate_range_search_recall((uint32_t)query_num, groundtruth_ids, query_result_ids[test_id]);
recall =
diskann::calculate_range_search_recall((uint32_t)query_num, groundtruth_ids, query_result_ids[test_id]);

uint32_t total_true_positive = 0;
uint32_t total_positive = 0;
Expand Down
4 changes: 2 additions & 2 deletions tests/utils/calculate_recall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ int main(int argc, char **argv)
return -1;
}
std::cout << "Calculating recall@" << recall_at << std::endl;
double recall_val = diskann::calculate_recall((uint32_t)points_num, gold_std, gs_dist, (uint32_t)dim_gs, our_results,
(uint32_t)dim_or, (uint32_t)recall_at);
double recall_val = diskann::calculate_recall((uint32_t)points_num, gold_std, gs_dist, (uint32_t)dim_gs,
our_results, (uint32_t)dim_or, (uint32_t)recall_at);

// double avg_recall = (recall*1.0)/(points_num*1.0);
std::cout << "Avg. recall@" << recall_at << " is " << recall_val << "\n";
Expand Down
3 changes: 2 additions & 1 deletion tests/utils/compute_groundtruth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ void exact_knn(const size_t dim, const size_t k,
for (size_t p = k; p < npoints; p++)
{
if (point_dist.top().second > dist_matrix[(ptrdiff_t)p + (ptrdiff_t)(q - q_b) * (ptrdiff_t)npoints])
point_dist.emplace((int32_t)p, dist_matrix[(ptrdiff_t)p + (ptrdiff_t)(q - q_b) * (ptrdiff_t)npoints]);
point_dist.emplace((int32_t)p,
dist_matrix[(ptrdiff_t)p + (ptrdiff_t)(q - q_b) * (ptrdiff_t)npoints]);
if (point_dist.size() > k)
point_dist.pop();
}
Expand Down
3 changes: 2 additions & 1 deletion tests/utils/compute_groundtruth_for_filters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ void exact_knn(const size_t dim, const size_t k,
for (size_t p = k; p < npoints; p++)
{
if (point_dist.top().second > dist_matrix[(ptrdiff_t)p + (ptrdiff_t)(q - q_b) * (ptrdiff_t)npoints])
point_dist.emplace((int32_t)p, dist_matrix[(ptrdiff_t)p + (ptrdiff_t)(q - q_b) * (ptrdiff_t)npoints]);
point_dist.emplace((int32_t)p,
dist_matrix[(ptrdiff_t)p + (ptrdiff_t)(q - q_b) * (ptrdiff_t)npoints]);
if (point_dist.size() > k)
point_dist.pop();
}
Expand Down

0 comments on commit 87f263f

Please sign in to comment.