aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorArne Juul <arnej@yahooinc.com>2023-05-31 14:20:10 +0000
committerArne Juul <arnej@yahooinc.com>2023-05-31 14:20:10 +0000
commit7e0fb892b66ab45a919ce2b5dca024af8b4c9491 (patch)
tree2854d3a1100e9691c0f7cf55d24d45db9fd89ebc /searchlib
parenta256299456d062f307cb323bec816a937d2e2ab8 (diff)
minor cleanup after review
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp b/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp
index 88458cf5f3c..d4b8c753431 100644
--- a/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp
@@ -1041,20 +1041,17 @@ HnswIndex<type>::count_reachable_nodes() const
}
--search_level;
}
- uint32_t iterations = 0;
uint32_t found_cnt = found_links.size();
search::AllocatedBitVector visitNext(visited.size());
- bool runAnotherVisit = false;
for (uint32_t nodeid : found_links) {
visitNext.setBit(nodeid);
- runAnotherVisit = true;
}
+ bool runAnotherVisit = true;
while (runAnotherVisit) {
- ++iterations;
if (vespalib::steady_clock::now() > doom) {
return {found_cnt, false};
}
- runAnotherVisit = 0;
+ runAnotherVisit = false;
visitNext.foreach_truebit(
[&] (uint32_t nodeid) {
// note: search_level == 0