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

Method SetFlagValue

paddle/common/flags_native.cc:336–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334}
335
336bool FlagRegistry::SetFlagValue(const std::string& name,
337 const std::string& value) {
338 if (HasFlag(name)) {
339 std::lock_guard<std::mutex> lock(mutex_);
340 flags_[name]->SetValueFromString(value);
341
342 UpdateLinkedFlags(name, value);
343 return true;
344 } else {
345 LOG_FLAG_ERROR("illegal SetFlagValue, flag \"" + name +
346 "\" is not defined.");
347 return false;
348 }
349}
350/**
351 * Sets the value of linked variables
352 *

Callers 3

SetFlagValueFunction · 0.80
SetFlagsFromEnvFunction · 0.80
ParseCommandLineFlagsFunction · 0.80

Calls 2

SetValueFromStringMethod · 0.80
UpdateLinkedFlagsFunction · 0.70

Tested by

no test coverage detected