| 37 | } |
| 38 | |
| 39 | inline void MakeTempFilename(string* temp_filename) { |
| 40 | static path temp_files_subpath; |
| 41 | static uint64_t next_temp_file = 0; |
| 42 | temp_filename->clear(); |
| 43 | if ( temp_files_subpath.empty() ) { |
| 44 | string path_string=""; |
| 45 | MakeTempDir(&path_string); |
| 46 | temp_files_subpath = path_string; |
| 47 | } |
| 48 | *temp_filename = |
| 49 | (temp_files_subpath/caffe::format_int(next_temp_file++, 9)).string(); |
| 50 | } |
| 51 | |
| 52 | bool ReadProtoFromTextFile(const char* filename, Message* proto); |
| 53 |