Skip to content

Commit df63201

Browse files
committed
swap return vars in flat_l2.cc
1 parent a137fe8 commit df63201

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/include/detail/flat/vq.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ auto vq_query_heap(
145145
consolidate_scores(scores);
146146
auto top_k = get_top_k_with_scores(scores, k_nn);
147147

148+
debug_slice(std::get<0>(top_k));
149+
debug_slice(std::get<1>(top_k));
150+
148151
return top_k;
149152
}
150153

src/src/flat_l2.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ int main(int argc, char* argv[]) {
171171
tiledb::Context ctx;
172172

173173
auto db = tdbColMajorMatrix<db_type>(ctx, db_uri, blocksize); // blocked
174+
db.load();
174175

175176
auto query =
176177
tdbColMajorMatrix<uint8_t>(ctx, query_uri, nqueries); // just a slice
@@ -180,7 +181,7 @@ int main(int argc, char* argv[]) {
180181
std::cout << load_time << std::endl;
181182

182183
// @todo decide on what the type of top_k::value should be
183-
auto [top_k, top_k_scores] = [&]() {
184+
auto [top_k_scores, top_k] = [&]() {
184185
if (alg_name == "vq_heap" || alg_name == "vq") {
185186
if (verbose) {
186187
std::cout << "# Using vq_heap" << std::endl;

0 commit comments

Comments
 (0)