blob: 120d52e58af52161e0794d3f5d3f3d33ec12ec7f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include "layer_context.hh"
#include <cstdlib> // for env var
#include <string_view>
namespace low_latency {
static bool parse_bool_env(const auto& name) {
const auto env = std::getenv(name);
return env && std::string_view{env} == "1";
}
LayerContext::LayerContext()
: should_expose_reflex(parse_bool_env(EXPOSE_REFLEX_ENV)),
should_spoof_nvidia(parse_bool_env(SPOOF_NVIDIA_ENV)) {}
LayerContext::~LayerContext() {}
} // namespace low_latency
|