From 6546bf5af8b97986ea8a542858f4c659a1f3dfb5 Mon Sep 17 00:00:00 2001 From: "xiaojun.lin" Date: Mon, 25 Nov 2019 15:30:30 +0800 Subject: [PATCH] format code --- .../knowhere/index/vector_index/nsg/NSG.cpp | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/core/src/index/knowhere/knowhere/index/vector_index/nsg/NSG.cpp b/core/src/index/knowhere/knowhere/index/vector_index/nsg/NSG.cpp index 002e160562..5872178e96 100644 --- a/core/src/index/knowhere/knowhere/index/vector_index/nsg/NSG.cpp +++ b/core/src/index/knowhere/knowhere/index/vector_index/nsg/NSG.cpp @@ -738,8 +738,7 @@ NsgIndex::Search(const float* query, const unsigned& nq, const unsigned& dim, co ids[i * k + j] = ids_[resset[i][j].id]; dist[i * k + j] = resset[i][j].distance; } - } - else { + } else { for (unsigned int j = 0; j < resset[i].size(); ++j) { ids[i * k + j] = ids_[resset[i][j].id]; dist[i * k + j] = resset[i][j].distance; @@ -752,21 +751,21 @@ NsgIndex::Search(const float* query, const unsigned& nq, const unsigned& dim, co } rc.RecordSection("merge"); -//>> Debug: test single insert -// int x_0 = resset[0].size(); -// for (int l = 0; l < resset[0].size(); ++l) { -// resset[0].pop_back(); -//} -// resset.clear(); + //>> Debug: test single insert + // int x_0 = resset[0].size(); + // for (int l = 0; l < resset[0].size(); ++l) { + // resset[0].pop_back(); + //} + // resset.clear(); -// ProfilerStart("xx.prof"); -// std::vector resset; -// GetNeighbors(query, resset, nsg, ¶ms); -// for (int i = 0; i < k; ++i) { -// ids[i] = resset[i].id; -// dist[i] = resset[i].distance; -//} -// ProfilerStop(); + // ProfilerStart("xx.prof"); + // std::vector resset; + // GetNeighbors(query, resset, nsg, ¶ms); + // for (int i = 0; i < k; ++i) { + // ids[i] = resset[i].id; + // dist[i] = resset[i].distance; + //} + // ProfilerStop(); } void