MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / getEnvVar

Function getEnvVar

src/backend/common/util.cpp:74–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74string getEnvVar(const string& key) {
75#if defined(OS_WIN)
76 DWORD bufSize =
77 32767; // limit according to GetEnvironment Variable documentation
78 string retVal;
79 retVal.resize(bufSize);
80 bufSize = GetEnvironmentVariable(key.c_str(), &retVal[0], bufSize);
81 if (!bufSize) {
82 return string("");
83 } else {
84 retVal.resize(bufSize);
85 return retVal;
86 }
87#else
88 char* str = getenv(key.c_str());
89 return str == NULL ? string("") : string(str);
90#endif
91}
92
93const char* getName(af_dtype type) {
94 switch (type) {

Callers 15

OneAPICPUOffloadFunction · 0.85
synchronize_callsFunction · 0.85
platform.cppFile · 0.85
DeviceManagerMethod · 0.85
OpenCLCPUOffloadFunction · 0.85
synchronize_callsFunction · 0.85
getOpenCLCDeviceVersionFunction · 0.85
DeviceManagerMethod · 0.85
platform.cppFile · 0.85
queueMethod · 0.85
getMainWindowMethod · 0.85
loggerFactoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected