MCPcopy Create free account
hub / github.com/alibaba/zvec / LoadQuantizedIndex

Function LoadQuantizedIndex

tests/core/algorithm/flat/flat_builder_test.cc:429–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427}
428
429static void LoadQuantizedIndex(
430 const std::string &path,
431 const std::shared_ptr<zvec::turbo::Quantizer> &quantizer,
432 IndexSearcher::Pointer &searcher) {
433 searcher = IndexFactory::CreateSearcher("FlatSearcher");
434 auto storage = IndexFactory::CreateStorage("MMapFileReadStorage");
435 ASSERT_NE(nullptr, searcher);
436 ASSERT_NE(nullptr, storage);
437
438 Params params;
439 ASSERT_EQ(0, searcher->init(params, quantizer));
440 ASSERT_EQ(0, storage->open(path, false));
441 ASSERT_EQ(0, searcher->load(storage, IndexMetric::Pointer()));
442}
443
444static void LoadIndex(const std::string &path,
445 IndexSearcher::Pointer &searcher) {

Callers 1

TEST_FFunction · 0.85

Calls 3

initMethod · 0.45
openMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected