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

Function GetEnvVar

tensorflow/core/util/rpc/rpc_factory.cc:23–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22template <>
23bool GetEnvVar(const char* key, const string& default_value, string* value) {
24 const char* env_value = std::getenv(key);
25 if (!env_value || env_value[0] == '\0') {
26 *value = default_value;
27 } else {
28 *value = env_value;
29 }
30 return true;
31}
32
33template <>
34bool GetEnvVar(const char* key, const int64& default_value, int64* value) {

Callers

nothing calls this directly

Calls 2

safe_strto64Function · 0.85
safe_strtou64Function · 0.85

Tested by

no test coverage detected