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

Method build

src/core/algorithm/flat/flat_builder.cc:110–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108
109template <size_t BATCH_SIZE>
110int FlatBuilder<BATCH_SIZE>::build(IndexThreads::Pointer,
111 IndexHolder::Pointer holder) {
112 ailego::ElapsedTime stamp;
113 if (!holder->is_matched(meta_)) {
114 LOG_ERROR("The holder is unmatched with initialized meta.");
115 return IndexError_Mismatch;
116 }
117
118 holder_ = std::move(holder);
119 stats_.set_built_count(holder_->count());
120 stats_.set_built_costtime(stamp.milli_seconds());
121 return 0;
122}
123
124template <size_t BATCH_SIZE>
125int FlatBuilder<BATCH_SIZE>::dump(const IndexDumper::Pointer &dumper) {

Callers

nothing calls this directly

Calls 4

set_built_countMethod · 0.80
set_built_costtimeMethod · 0.80
is_matchedMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected