MCPcopy Create free account
hub / github.com/bytedance/bolt / readLazyVector

Function readLazyVector

bolt/vector/VectorSaver.cpp:574–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572};
573
574VectorPtr readLazyVector(
575 const TypePtr& type,
576 vector_size_t size,
577 std::istream& in,
578 memory::MemoryPool* pool) {
579 // check if the vector was loaded.
580 bool isLoaded = read<bool>(in);
581 VectorPtr loadedVector;
582 // loaded vector.
583 if (isLoaded) {
584 loadedVector = restoreVector(in, pool);
585 }
586 return std::make_shared<LazyVector>(
587 pool, type, size, std::make_unique<LoadedVectorShim>(loadedVector));
588}
589
590} // namespace
591

Callers 1

restoreVectorFunction · 0.85

Calls 1

restoreVectorFunction · 0.85

Tested by

no test coverage detected