MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / GetValueFromEnv

Function GetValueFromEnv

paddle/common/flags_native.cc:437–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435}
436
437bool GetValueFromEnv(const std::string& name, std::string* value) {
438 const char* env_var = std::getenv(name.c_str());
439 if (env_var == nullptr) {
440 return false;
441 }
442 *value = std::string(env_var);
443 return true;
444}
445
446/**
447 * @brief Set flags from environment variables.

Callers 2

SetFlagsFromEnvFunction · 0.85
GetFromEnvFunction · 0.85

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected