feature: Add debug/release variable prefixes

Resolves:  NEO-6357
Signed-off-by: John Falkowski <john.falkowski@intel.com>
This commit is contained in:
John Falkowski
2023-07-20 05:54:03 +00:00
committed by Compute-Runtime-Automation
parent 6fca8ee195
commit ec95d9314a
24 changed files with 1363 additions and 67 deletions

View File

@@ -1,16 +1,19 @@
/*
* Copyright (C) 2018-2022 Intel Corporation
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <stdint.h>
#include <string>
namespace NEO {
enum class DebugVarPrefix : uint8_t;
class SettingsReader {
public:
virtual ~SettingsReader() = default;
@@ -23,12 +26,17 @@ class SettingsReader {
}
static SettingsReader *createOsReader(bool userScope, const std::string &regKey);
static SettingsReader *createFileReader();
virtual int32_t getSetting(const char *settingName, int32_t defaultValue, DebugVarPrefix &type) = 0;
virtual int32_t getSetting(const char *settingName, int32_t defaultValue) = 0;
virtual int64_t getSetting(const char *settingName, int64_t defaultValue, DebugVarPrefix &type) = 0;
virtual int64_t getSetting(const char *settingName, int64_t defaultValue) = 0;
virtual bool getSetting(const char *settingName, bool defaultValue, DebugVarPrefix &type) = 0;
virtual bool getSetting(const char *settingName, bool defaultValue) = 0;
virtual std::string getSetting(const char *settingName, const std::string &value, DebugVarPrefix &type) = 0;
virtual std::string getSetting(const char *settingName, const std::string &value) = 0;
virtual const char *appSpecificLocation(const std::string &name) = 0;
static const char *settingsFileName;
static const char *neoSettingsFileName;
MOCKABLE_VIRTUAL char *getenv(const char *settingName);
};
}; // namespace NEO