MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Write

Method Write

tensorflow/core/framework/embedding/emb_file.h:87–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 }
86
87 void Write(const char* val, const size_t val_len) {
88 if (fs_.is_open()) {
89 fs_.write(val, val_len);
90 posix_fadvise(fd_, 0, file_size_, POSIX_FADV_DONTNEED);
91 } else {
92 fs_.open(filepath_,
93 std::ios::app | std::ios::in | std::ios::out |
94 std::ios::binary);
95 fs_.write(val, val_len);
96 fs_.close();
97 }
98 }
99
100 size_t Count() const {
101 return count_;

Callers 5

BatchCommitMethod · 0.45
~SSDHashKVMethod · 0.45
WriteFileMethod · 0.45
FlushAndUpdateMethod · 0.45

Calls 2

closeMethod · 0.65
writeMethod · 0.45

Tested by

no test coverage detected