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

Function saveStdVectorToFile

bolt/vector/VectorSaver.cpp:740–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

738
739template <typename T>
740void saveStdVectorToFile(const std::vector<T>& list, const char* filePath) {
741 std::ofstream outputFile(filePath, std::ofstream::binary);
742 // Size of the vector
743 write<int32_t>(list.size(), outputFile);
744
745 outputFile.write(
746 reinterpret_cast<const char*>(list.data()), list.size() * sizeof(T));
747 outputFile.close();
748}
749
750template void saveStdVectorToFile<column_index_t>(
751 const std::vector<column_index_t>& list,

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.45
writeMethod · 0.45
dataMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected