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

Function restoreStdVectorFromFile

bolt/vector/VectorSaver.cpp:758–766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

756
757template <typename T>
758std::vector<T> restoreStdVectorFromFile(const char* filePath) {
759 std::ifstream in(filePath, std::ifstream::binary);
760 auto size = read<int32_t>(in);
761 std::vector<T> vec(size);
762
763 in.read(reinterpret_cast<char*>(vec.data()), size * sizeof(T));
764 in.close();
765 return vec;
766}
767
768template std::vector<column_index_t> restoreStdVectorFromFile<column_index_t>(
769 const char* filePath);

Callers

nothing calls this directly

Calls 3

readMethod · 0.45
dataMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected