format code

This commit is contained in:
xiaojun.lin 2019-11-30 18:07:26 +08:00
parent 6b84ec5f79
commit 31da89d9a2
6 changed files with 11 additions and 9 deletions

View File

@ -23,6 +23,7 @@
#include <memory>
#include <utility>
#include <vector>
namespace knowhere {

View File

@ -25,8 +25,8 @@
#include "knowhere/index/vector_index/helpers/Cloner.h"
#endif
#include "knowhere/index/vector_index/IndexIVF.h"
#include "knowhere/index/vector_index/IndexIDMAP.h"
#include "knowhere/index/vector_index/IndexIVF.h"
#include "knowhere/index/vector_index/nsg/NSG.h"
#include "knowhere/index/vector_index/nsg/NSGIO.h"

View File

@ -53,8 +53,8 @@ class NsgIndex {
float* ori_data_;
int64_t* ids_;
Graph nsg; // final graph
Graph knng; // reset after build
Graph nsg; // final graph
Graph knng; // reset after build
node_t navigation_point; // offset of node in origin data

View File

@ -22,9 +22,9 @@
#include "knowhere/index/vector_index/FaissBaseIndex.h"
#include "knowhere/index/vector_index/IndexNSG.h"
#ifdef MILVUS_GPU_VERSION
#include "knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h"
#include "knowhere/index/vector_index/IndexGPUIDMAP.h"
#include "knowhere/index/vector_index/helpers/Cloner.h"
#include "knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h"
#endif
#include "knowhere/common/Timer.h"
@ -120,7 +120,7 @@ TEST_F(NSGInterfaceTest, comparetest) {
}
//#include <src/index/knowhere/knowhere/index/vector_index/nsg/OriNSG.h>
//TEST(test, ori_nsg) {
// TEST(test, ori_nsg) {
// // float* p_data = nullptr;
// size_t rows, dim;
// char* filename = "/mnt/112d53a6-5592-4360-a33b-7fd789456fce/workspace/Data/sift/sift_base.fvecs";
@ -226,7 +226,7 @@ TEST_F(NSGInterfaceTest, comparetest) {
// printf("R@100 = %.4f\n", n_100 / float(nq));
//}
//
//TEST(testxx, test_idmap){
// TEST(testxx, test_idmap){
// int k = 50;
// std::string knng_filename =
// "/mnt/112d53a6-5592-4360-a33b-7fd789456fce/workspace/Cellar/anns/efanna_graph/tests/sift.50NN.graph";
@ -234,7 +234,8 @@ TEST_F(NSGInterfaceTest, comparetest) {
// Load_nns_graph(gt_knng, knng_filename.c_str());
//
// size_t rows, dim;
// char* filename = "/mnt/112d53a6-5592-4360-a33b-7fd789456fce/workspace/Cellar/anns/efanna_graph/tests/siftsmall/siftsmall_base.fvecs";
// char* filename =
// "/mnt/112d53a6-5592-4360-a33b-7fd789456fce/workspace/Cellar/anns/efanna_graph/tests/siftsmall/siftsmall_base.fvecs";
// float* p_data = fvecs_read(filename, &dim, &rows);
//
// std::vector<int64_t> store_ids(rows);

View File

@ -101,4 +101,4 @@ float*
fvecs_read(const char* fname, size_t* d_out, size_t* n_out);
int*
ivecs_read(const char* fname, size_t* d_out, size_t* n_out);
ivecs_read(const char* fname, size_t* d_out, size_t* n_out);

View File

@ -204,7 +204,7 @@ NSGConfAdapter::Match(const TempMetaConf& metaconf) {
auto scale_factor = round(metaconf.dim / 128.0);
scale_factor = scale_factor >= 4 ? 4 : scale_factor;
conf->nprobe = int64_t(conf->nlist * 0.01);
// conf->knng = 40 + 10 * scale_factor; // the size of knng
// conf->knng = 40 + 10 * scale_factor; // the size of knng
conf->knng = 50;
conf->search_length = 50 + 5 * scale_factor;
conf->out_degree = 50 + 5 * scale_factor;