summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-11-24 11:37:21 +0100
committerTor Egge <Tor.Egge@online.no>2022-11-24 11:37:21 +0100
commitdb062979e2aa2f36426c47ffa09a9cc4c5e8417b (patch)
tree5927fdbf7a1782bada9960e4e610f4787f51f835 /searchlib
parente2c7b0f200a65dd9c74a9a70d6cc37f1bccb11fb (diff)
Style fixes.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/tests/tensor/hnsw_best_neighbors/hnsw_best_neighbors_test.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/tensor/hnsw_multi_best_neighbors.h6
2 files changed, 4 insertions, 8 deletions
diff --git a/searchlib/src/tests/tensor/hnsw_best_neighbors/hnsw_best_neighbors_test.cpp b/searchlib/src/tests/tensor/hnsw_best_neighbors/hnsw_best_neighbors_test.cpp
index c05b85d3e59..0d87a6eb25d 100644
--- a/searchlib/src/tests/tensor/hnsw_best_neighbors/hnsw_best_neighbors_test.cpp
+++ b/searchlib/src/tests/tensor/hnsw_best_neighbors/hnsw_best_neighbors_test.cpp
@@ -44,8 +44,7 @@ protected:
}
~HnswBestNeighborsTest() override;
- void add(uint32_t nodeid, uint32_t docid, double distance)
- {
+ void add(uint32_t nodeid, uint32_t docid, double distance) {
_neighbors.emplace(nodeid, docid, EntryRef(), distance);
}
@@ -58,8 +57,7 @@ protected:
EXPECT_EQ(exp, act);
}
- void populate()
- {
+ void populate() {
add(3, 3, 7.0);
add(2, 2, 10.0);
add(1, 1, 1.0);
diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_multi_best_neighbors.h b/searchlib/src/vespa/searchlib/tensor/hnsw_multi_best_neighbors.h
index f3f5cf5690a..de707999f11 100644
--- a/searchlib/src/vespa/searchlib/tensor/hnsw_multi_best_neighbors.h
+++ b/searchlib/src/vespa/searchlib/tensor/hnsw_multi_best_neighbors.h
@@ -18,16 +18,14 @@ class HnswMultiBestNeighbors {
FurthestPriQ _candidates;
vespalib::hash_map<uint32_t, uint32_t> _docids;
- void add_docid(uint32_t docid)
- {
+ void add_docid(uint32_t docid) {
auto insres = _docids.insert(std::make_pair(docid, 1));
if (!insres.second) {
++insres.first->second;
}
}
- bool remove_docid(uint32_t docid)
- {
+ bool remove_docid(uint32_t docid) {
auto itr = _docids.find(docid);
assert(itr != _docids.end());
if (itr->second > 1) {