MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / validateAndSetWhetherGpuSharingIsPermitted

Function validateAndSetWhetherGpuSharingIsPermitted

quest/src/core/envvars.cpp:94–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92
93
94void validateAndSetWhetherGpuSharingIsPermitted(const char* caller) {
95
96 // permit unspecified, falling back to default value
97 string name = envvar_names::PERMIT_NODES_TO_SHARE_GPU;
98 if (!isEnvVarSpecified(name))
99 return;
100
101 // otherwise ensure value == '0' or '1' precisely (no whitespace)
102 string value = getSpecifiedEnvVarValue(name);
103 validate_envVarPermitNodesToShareGpu(value, caller);
104
105 // overwrite default env-var value
106 envvar_values::PERMIT_NODES_TO_SHARE_GPU = (value[0] == '1');
107}
108
109
110void validateAndSetDefaultValidationEpsilon(const char* caller) {

Callers 1

Calls 3

isEnvVarSpecifiedFunction · 0.85
getSpecifiedEnvVarValueFunction · 0.85

Tested by

no test coverage detected