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

Function TF_NewWritableFile

tensorflow/c/env.cc:65–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void TF_NewWritableFile(const char* filename, TF_WritableFileHandle** handle,
66 TF_Status* status) {
67 std::unique_ptr<::tensorflow::WritableFile> f;
68 TF_SetStatus(status, TF_OK, "");
69 ::tensorflow::Status s =
70 ::tensorflow::Env::Default()->NewWritableFile(filename, &f);
71 ::tensorflow::Set_TF_Status_from_Status(status, s);
72
73 if (s.ok()) {
74 *handle = reinterpret_cast<TF_WritableFileHandle*>(f.release());
75 }
76}
77
78void TF_CloseWritableFile(TF_WritableFileHandle* handle, TF_Status* status) {
79 auto* cc_file = reinterpret_cast<::tensorflow::WritableFile*>(handle);

Callers 2

mainFunction · 0.85
TESTFunction · 0.85

Calls 6

TF_SetStatusFunction · 0.85
DefaultFunction · 0.85
NewWritableFileMethod · 0.45
okMethod · 0.45
releaseMethod · 0.45

Tested by 2

mainFunction · 0.68
TESTFunction · 0.68