Skip to content

Commit c633868

Browse files
committed
test;print
1 parent 67e735d commit c633868

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

include/svs/index/vamana/extensions.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,8 @@ double svs_invoke(
624624

625625
// Compute the distance using the appropriate distance function
626626
auto dist = svs::distance::compute(dist_f, query_span, indexed_span);
627-
627+
fmt::print("Debug: Computing distance for ID {}: computed value = {}\n",
628+
internal_id, static_cast<double>(dist));
628629
return static_cast<double>(dist);
629630
}
630631

tests/utils/utils.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@ struct GetDistanceTester {
302302
svs::distance::maybe_fix_argument(dist_copy, query_span);
303303
double expected_distance =
304304
svs::distance::compute(dist_copy, query_span, indexed_span);
305+
306+
fmt::print(" index_distance: {}\n", index_distance);
307+
fmt::print(" expected_distance: {}\n", expected_distance);
305308

306309
// Test the distance calculation
307310
CATCH_REQUIRE(std::abs(index_distance - expected_distance) < TOLERANCE);

0 commit comments

Comments
 (0)