Skip to content

Commit

Permalink
small
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Tarnawski committed Oct 25, 2023
1 parent bd227c0 commit 37d9abf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/utils/partition_hmetis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ int aux_main(const std::string &input_file,
0.33 * centroids[kth_closest_center * dim + i];
}
}
// (subcluster_counts does not get filled in this case)
}
}
// subcentroids do not get saved to a file
Expand Down Expand Up @@ -493,7 +494,7 @@ int aux_main(const std::string &input_file,
} else if (mode == "multicentroids" || mode == "multicentroids-random" ||
mode == "multicentroids-neighbors") {

constexpr int submode = 3;
constexpr int submode = 1;

std::unique_ptr<float[]> queries_float =
std::make_unique<float[]>(num_queries * dim);
Expand Down Expand Up @@ -523,6 +524,13 @@ int aux_main(const std::string &input_file,
}
}
} else if (submode == 2) {
if (mode == "multicentroids-neighbors" ||
mode == "multicentroids-random") {
diskann::cout << "Error: submode 2 only works with multicentroids "
"as it needs subcluster_counts[] to be filled out"
<< std::endl;
return -1;
}
// 2: order shards by sum_subcentroid 1/distance
// (actually, better: sum (# pts in subcluster) / distance)
for (size_t query_id = 0; query_id < num_queries; ++query_id) {
Expand Down

0 comments on commit 37d9abf

Please sign in to comment.