|
1 |
| -#Class tensorflow::Env |
| 1 | +#Class tensorflow::Env <a class="md-anchor" id="AUTOGENERATED-class-tensorflow--env"></a> |
2 | 2 |
|
3 | 3 | An interface used by the tensorflow implementation to access operating system functionality like the filesystem etc.
|
4 | 4 |
|
5 | 5 | Callers may wish to provide a custom Env object to get fine grain control.
|
6 | 6 |
|
7 | 7 | All Env implementations are safe for concurrent access from multiple threads without any external synchronization.
|
8 | 8 |
|
9 |
| -##Member Summary |
| 9 | +##Member Summary <a class="md-anchor" id="AUTOGENERATED-member-summary"></a> |
10 | 10 |
|
11 | 11 | * [tensorflow::Env::Env](#tensorflow_Env_Env)
|
12 | 12 | * [virtual tensorflow::Env::~Env](#virtual_tensorflow_Env_Env)
|
@@ -39,105 +39,105 @@ All Env implementations are safe for concurrent access from multiple threads wit
|
39 | 39 | * [static Env* tensorflow::Env::Default](#static_Env_tensorflow_Env_Default)
|
40 | 40 | * Returns a default environment suitable for the current operating system.
|
41 | 41 |
|
42 |
| -##Member Details |
| 42 | +##Member Details <a class="md-anchor" id="AUTOGENERATED-member-details"></a> |
43 | 43 |
|
44 |
| -#### tensorflow::Env::Env() {#tensorflow_Env_Env} |
| 44 | +#### tensorflow::Env::Env() <a class="md-anchor" id="tensorflow_Env_Env"></a> |
45 | 45 |
|
46 | 46 |
|
47 | 47 |
|
48 | 48 |
|
49 | 49 |
|
50 |
| -#### virtual tensorflow::Env::~Env() {#virtual_tensorflow_Env_Env} |
| 50 | +#### virtual tensorflow::Env::~Env() <a class="md-anchor" id="virtual_tensorflow_Env_Env"></a> |
51 | 51 |
|
52 | 52 |
|
53 | 53 |
|
54 | 54 |
|
55 | 55 |
|
56 |
| -#### virtual Status tensorflow::Env::NewRandomAccessFile(const string &fname, RandomAccessFile **result)=0 {#virtual_Status_tensorflow_Env_NewRandomAccessFile} |
| 56 | +#### virtual Status tensorflow::Env::NewRandomAccessFile(const string &fname, RandomAccessFile **result)=0 <a class="md-anchor" id="virtual_Status_tensorflow_Env_NewRandomAccessFile"></a> |
57 | 57 |
|
58 | 58 | Creates a brand new random access read-only file with the specified name.
|
59 | 59 |
|
60 | 60 | On success, stores a pointer to the new file in *result and returns OK. On failure stores NULL in *result and returns non-OK. If the file does not exist, returns a non-OK status.
|
61 | 61 |
|
62 | 62 | The returned file may be concurrently accessed by multiple threads.
|
63 | 63 |
|
64 |
| -#### virtual Status tensorflow::Env::NewWritableFile(const string &fname, WritableFile **result)=0 {#virtual_Status_tensorflow_Env_NewWritableFile} |
| 64 | +#### virtual Status tensorflow::Env::NewWritableFile(const string &fname, WritableFile **result)=0 <a class="md-anchor" id="virtual_Status_tensorflow_Env_NewWritableFile"></a> |
65 | 65 |
|
66 | 66 | Creates an object that writes to a new file with the specified name.
|
67 | 67 |
|
68 | 68 | Deletes any existing file with the same name and creates a new file. On success, stores a pointer to the new file in *result and returns OK. On failure stores NULL in *result and returns non-OK.
|
69 | 69 |
|
70 | 70 | The returned file will only be accessed by one thread at a time.
|
71 | 71 |
|
72 |
| -#### virtual Status tensorflow::Env::NewAppendableFile(const string &fname, WritableFile **result)=0 {#virtual_Status_tensorflow_Env_NewAppendableFile} |
| 72 | +#### virtual Status tensorflow::Env::NewAppendableFile(const string &fname, WritableFile **result)=0 <a class="md-anchor" id="virtual_Status_tensorflow_Env_NewAppendableFile"></a> |
73 | 73 |
|
74 | 74 | Creates an object that either appends to an existing file, or writes to a new file (if the file does not exist to begin with).
|
75 | 75 |
|
76 | 76 | On success, stores a pointer to the new file in *result and returns OK. On failure stores NULL in *result and returns non-OK.
|
77 | 77 |
|
78 | 78 | The returned file will only be accessed by one thread at a time.
|
79 | 79 |
|
80 |
| -#### virtual bool tensorflow::Env::FileExists(const string &fname)=0 {#virtual_bool_tensorflow_Env_FileExists} |
| 80 | +#### virtual bool tensorflow::Env::FileExists(const string &fname)=0 <a class="md-anchor" id="virtual_bool_tensorflow_Env_FileExists"></a> |
81 | 81 |
|
82 | 82 | Returns true iff the named file exists.
|
83 | 83 |
|
84 | 84 |
|
85 | 85 |
|
86 |
| -#### virtual Status tensorflow::Env::GetChildren(const string &dir, std::vector< string > *result)=0 {#virtual_Status_tensorflow_Env_GetChildren} |
| 86 | +#### virtual Status tensorflow::Env::GetChildren(const string &dir, std::vector< string > *result)=0 <a class="md-anchor" id="virtual_Status_tensorflow_Env_GetChildren"></a> |
87 | 87 |
|
88 | 88 | Stores in *result the names of the children of the specified directory. The names are relative to "dir".
|
89 | 89 |
|
90 | 90 | Original contents of *results are dropped.
|
91 | 91 |
|
92 |
| -#### virtual Status tensorflow::Env::DeleteFile(const string &fname)=0 {#virtual_Status_tensorflow_Env_DeleteFile} |
| 92 | +#### virtual Status tensorflow::Env::DeleteFile(const string &fname)=0 <a class="md-anchor" id="virtual_Status_tensorflow_Env_DeleteFile"></a> |
93 | 93 |
|
94 | 94 | Deletes the named file.
|
95 | 95 |
|
96 | 96 |
|
97 | 97 |
|
98 |
| -#### virtual Status tensorflow::Env::CreateDir(const string &dirname)=0 {#virtual_Status_tensorflow_Env_CreateDir} |
| 98 | +#### virtual Status tensorflow::Env::CreateDir(const string &dirname)=0 <a class="md-anchor" id="virtual_Status_tensorflow_Env_CreateDir"></a> |
99 | 99 |
|
100 | 100 | Creates the specified directory.
|
101 | 101 |
|
102 | 102 |
|
103 | 103 |
|
104 |
| -#### virtual Status tensorflow::Env::DeleteDir(const string &dirname)=0 {#virtual_Status_tensorflow_Env_DeleteDir} |
| 104 | +#### virtual Status tensorflow::Env::DeleteDir(const string &dirname)=0 <a class="md-anchor" id="virtual_Status_tensorflow_Env_DeleteDir"></a> |
105 | 105 |
|
106 | 106 | Deletes the specified directory.
|
107 | 107 |
|
108 | 108 |
|
109 | 109 |
|
110 |
| -#### virtual Status tensorflow::Env::GetFileSize(const string &fname, uint64 *file_size)=0 {#virtual_Status_tensorflow_Env_GetFileSize} |
| 110 | +#### virtual Status tensorflow::Env::GetFileSize(const string &fname, uint64 *file_size)=0 <a class="md-anchor" id="virtual_Status_tensorflow_Env_GetFileSize"></a> |
111 | 111 |
|
112 | 112 | Stores the size of fname in *file_size.
|
113 | 113 |
|
114 | 114 |
|
115 | 115 |
|
116 |
| -#### virtual Status tensorflow::Env::RenameFile(const string &src, const string &target)=0 {#virtual_Status_tensorflow_Env_RenameFile} |
| 116 | +#### virtual Status tensorflow::Env::RenameFile(const string &src, const string &target)=0 <a class="md-anchor" id="virtual_Status_tensorflow_Env_RenameFile"></a> |
117 | 117 |
|
118 | 118 | Renames file src to target. If target already exists, it will be replaced.
|
119 | 119 |
|
120 | 120 |
|
121 | 121 |
|
122 |
| -#### virtual uint64 tensorflow::Env::NowMicros()=0 {#virtual_uint64_tensorflow_Env_NowMicros} |
| 122 | +#### virtual uint64 tensorflow::Env::NowMicros()=0 <a class="md-anchor" id="virtual_uint64_tensorflow_Env_NowMicros"></a> |
123 | 123 |
|
124 | 124 | Returns the number of micro-seconds since some fixed point in time. Only useful for computing deltas of time.
|
125 | 125 |
|
126 | 126 |
|
127 | 127 |
|
128 |
| -#### virtual void tensorflow::Env::SleepForMicroseconds(int micros)=0 {#virtual_void_tensorflow_Env_SleepForMicroseconds} |
| 128 | +#### virtual void tensorflow::Env::SleepForMicroseconds(int micros)=0 <a class="md-anchor" id="virtual_void_tensorflow_Env_SleepForMicroseconds"></a> |
129 | 129 |
|
130 | 130 | Sleeps/delays the thread for the prescribed number of micro-seconds.
|
131 | 131 |
|
132 | 132 |
|
133 | 133 |
|
134 |
| -#### virtual Thread* tensorflow::Env::StartThread(const ThreadOptions &thread_options, const string &name, std::function< void()> fn) TF_MUST_USE_RESULT=0 {#virtual_Thread_tensorflow_Env_StartThread} |
| 134 | +#### virtual Thread* tensorflow::Env::StartThread(const ThreadOptions &thread_options, const string &name, std::function< void()> fn) TF_MUST_USE_RESULT=0 <a class="md-anchor" id="virtual_Thread_tensorflow_Env_StartThread"></a> |
135 | 135 |
|
136 | 136 | Returns a new thread that is running fn() and is identified (for debugging/performance-analysis) by "name".
|
137 | 137 |
|
138 | 138 | Caller takes ownership of the result and must delete it eventually (the deletion will block until fn() stops running).
|
139 | 139 |
|
140 |
| -#### static Env* tensorflow::Env::Default() {#static_Env_tensorflow_Env_Default} |
| 140 | +#### static Env* tensorflow::Env::Default() <a class="md-anchor" id="static_Env_tensorflow_Env_Default"></a> |
141 | 141 |
|
142 | 142 | Returns a default environment suitable for the current operating system.
|
143 | 143 |
|
|
0 commit comments