MCPcopy Create free account
hub / github.com/PaddlePaddle/Serving / SeqFileWriter

Method SeqFileWriter

core/predictor/tools/seq_file.cpp:24–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22#include "seq_file.h"
23
24SeqFileWriter::SeqFileWriter(const char *file) {
25 _fs = new std::ofstream(file, std::ios::binary);
26 std::srand(std::time(0));
27 for (int i = 0; i < SYNC_MARKER_SIZE; ++i) {
28 _sync_marker[i] = std::rand() % 255;
29 }
30
31 _write_seq_header();
32
33 _bytes_to_prev_sync = 0;
34}
35
36void SeqFileWriter::close() {
37 _fs->close();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected