MCPcopy Create free account
hub / github.com/antgroup/vsag / Clone

Method Clone

src/algorithm/inner_index_interface.cpp:329–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329InnerIndexPtr
330InnerIndexInterface::Clone(const IndexCommonParam& param) {
331 std::stringstream ss;
332 IOStreamWriter writer(ss);
333 this->Serialize(writer);
334 ss.seekg(0, std::ios::beg);
335 IOStreamReader reader(ss);
336 auto max_size = this->CalSerializeSize();
337 BufferStreamReader buffer_reader(&reader, max_size, this->allocator_);
338 auto index = this->Fork(param);
339 index->Deserialize(buffer_reader);
340 return index;
341}
342
343InnerIndexPtr
344InnerIndexInterface::FastCreateIndex(const std::string& index_fast_str,

Callers

nothing calls this directly

Calls 4

SerializeMethod · 0.95
CalSerializeSizeMethod · 0.95
ForkMethod · 0.95
DeserializeMethod · 0.45

Tested by

no test coverage detected