diff --git a/core/src/index/knowhere/knowhere/index/vector_index/IndexKDT.cpp b/core/src/index/knowhere/knowhere/index/vector_index/IndexKDT.cpp index 9142bbab8eb34d59c671bcaf1a5c6412543cb404..1bd45075e3f0f87bc3423391a5813eb61ac572b0 100644 --- a/core/src/index/knowhere/knowhere/index/vector_index/IndexKDT.cpp +++ b/core/src/index/knowhere/knowhere/index/vector_index/IndexKDT.cpp @@ -38,23 +38,23 @@ CPUKDTRNG::Serialize() { std::vector index_len; // TODO(zirui): dev -// index_ptr_->SaveIndexToMemory(index_blobs, index_len); + // index_ptr_->SaveIndexToMemory(index_blobs, index_len); BinarySet binary_set; -// -// auto sample = std::make_shared(); -// sample.reset(static_cast(index_blobs[0])); -// auto tree = std::make_shared(); -// tree.reset(static_cast(index_blobs[1])); -// auto graph = std::make_shared(); -// graph.reset(static_cast(index_blobs[2])); -// auto metadata = std::make_shared(); -// metadata.reset(static_cast(index_blobs[3])); -// -// binary_set.Append("samples", sample, index_len[0]); -// binary_set.Append("tree", tree, index_len[1]); -// binary_set.Append("graph", graph, index_len[2]); -// binary_set.Append("metadata", metadata, index_len[3]); + // + // auto sample = std::make_shared(); + // sample.reset(static_cast(index_blobs[0])); + // auto tree = std::make_shared(); + // tree.reset(static_cast(index_blobs[1])); + // auto graph = std::make_shared(); + // graph.reset(static_cast(index_blobs[2])); + // auto metadata = std::make_shared(); + // metadata.reset(static_cast(index_blobs[3])); + // + // binary_set.Append("samples", sample, index_len[0]); + // binary_set.Append("tree", tree, index_len[1]); + // binary_set.Append("graph", graph, index_len[2]); + // binary_set.Append("metadata", metadata, index_len[3]); return binary_set; } @@ -62,21 +62,21 @@ void CPUKDTRNG::Load(const BinarySet& binary_set) { // TODO(zirui): dev -// std::vector index_blobs; -// -// auto samples = binary_set.GetByName("samples"); -// index_blobs.push_back(samples->data.get()); -// -// auto tree = binary_set.GetByName("tree"); -// index_blobs.push_back(tree->data.get()); -// -// auto graph = binary_set.GetByName("graph"); -// index_blobs.push_back(graph->data.get()); -// -// auto metadata = binary_set.GetByName("metadata"); -// index_blobs.push_back(metadata->data.get()); -// -// index_ptr_->LoadIndexFromMemory(index_blobs); + // std::vector index_blobs; + // + // auto samples = binary_set.GetByName("samples"); + // index_blobs.push_back(samples->data.get()); + // + // auto tree = binary_set.GetByName("tree"); + // index_blobs.push_back(tree->data.get()); + // + // auto graph = binary_set.GetByName("graph"); + // index_blobs.push_back(graph->data.get()); + // + // auto metadata = binary_set.GetByName("metadata"); + // index_blobs.push_back(metadata->data.get()); + // + // index_ptr_->LoadIndexFromMemory(index_blobs); } // PreprocessorPtr diff --git a/core/src/index/unittest/test_kdt.cpp b/core/src/index/unittest/test_kdt.cpp index f0428f52e027da06e4c81fd6634344afbbc5a276..f9058cc4d272fccab8e97a73fc0bc4ef5221ad0d 100644 --- a/core/src/index/unittest/test_kdt.cpp +++ b/core/src/index/unittest/test_kdt.cpp @@ -112,7 +112,7 @@ TEST_F(KDTTest, kdt_basic) { } // TODO(zirui): enable test -//TEST_F(KDTTest, kdt_serialize) { +// TEST_F(KDTTest, kdt_serialize) { // assert(!xb.empty()); // // auto preprocessor = index_->BuildPreprocessor(base_dataset, conf);