blob: 469920214476e984d50f220b65d22c24f2a08119 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include "layer_context.hh"
#include <cstdlib> // for env var
#include <string_view>
namespace low_latency {
LayerContext::LayerContext() {
const auto parse_bool_env = [](const auto& name) -> bool {
const auto env = std::getenv(name);
return env && std::string_view{env} == "1";
};
this->is_antilag_1_enabled = parse_bool_env(SLEEP_AFTER_PRESENT_ENV);
this->should_spoof_nvidia = parse_bool_env(SPOOF_NVIDIA_ENV);
}
LayerContext::~LayerContext() {}
} // namespace low_latency
|