MCPcopy Create free account
hub / github.com/dmlc/parameter_server / openNextFile

Method openNextFile

src/data/stream_reader.h:65–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64template<typename V>
65bool StreamReader<V>::openNextFile() {
66 if (data_file_) { data_file_->close(); data_file_ = nullptr; }
67 while (true) {
68 if (next_file_ >= max_num_files_) {
69 reach_data_end_ = true;
70 return false;
71 }
72 data_file_ = File::open(ithFile(data_, next_file_ ++), "r");
73 if (data_file_ != nullptr) break;
74 }
75 return true;
76}
77
78template<typename V>
79void StreamReader<V>::init(const DataConfig& data) {

Callers

nothing calls this directly

Calls 2

ithFileFunction · 0.85
closeMethod · 0.80

Tested by

no test coverage detected