MCPcopy Create free account
hub / github.com/NVIDIA/cuda-quantum / getEnvBool

Function getEnvBool

runtime/common/Environment.cpp:16–25  ·  view source on GitHub ↗

@brief Helper function to get boolean environment variable

Source from the content-addressed store, hash-verified

14
15/// @brief Helper function to get boolean environment variable
16bool getEnvBool(const char *envName, bool defaultVal = false) {
17 if (auto envVal = std::getenv(envName)) {
18 std::string tmp(envVal);
19 std::transform(tmp.begin(), tmp.end(), tmp.begin(),
20 [](unsigned char c) { return std::tolower(c); });
21 return (tmp == "1" || tmp == "on" || tmp == "true" || tmp == "y" ||
22 tmp == "yes");
23 }
24 return defaultVal;
25}
26
27} // namespace cudaq

Callers 14

synthesizeKernelFunction · 0.85
executeMLIRPassManagerFunction · 0.85
pyObserveAsyncFunction · 0.85
dispatchPTSBEFunction · 0.85
lower_to_openqasmMethod · 0.85
jitCodeFunction · 0.85
createJITEngineMethod · 0.85
CompilerMethod · 0.85
enqueueGateMethod · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected