mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00

Related-To: NEO-3677 Change-Id: I3374abde6717be20c064ec6d65c0751a783f5138 Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
33 lines
928 B
C++
33 lines
928 B
C++
/*
|
|
* Copyright (C) 2017-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "core/utilities/debug_settings_reader_creator.h"
|
|
#include "runtime/helpers/hw_info.h"
|
|
#include "runtime/os_interface/debug_settings_manager.h"
|
|
|
|
namespace NEO {
|
|
|
|
template <DebugFunctionalityLevel DebugLevel>
|
|
DebugSettingsManager<DebugLevel>::DebugSettingsManager() {
|
|
}
|
|
|
|
template <DebugFunctionalityLevel DebugLevel>
|
|
DebugSettingsManager<DebugLevel>::~DebugSettingsManager() = default;
|
|
|
|
template <DebugFunctionalityLevel DebugLevel>
|
|
void DebugSettingsManager<DebugLevel>::writeToFile(std::string filename, const char *str, size_t length, std::ios_base::openmode mode) {
|
|
std::ofstream outFile(filename, mode);
|
|
if (outFile.is_open()) {
|
|
outFile.write(str, length);
|
|
outFile.close();
|
|
}
|
|
}
|
|
|
|
// Global Debug Settings Manager
|
|
DebugSettingsManager<globalDebugFunctionalityLevel> DebugManager;
|
|
} // namespace NEO
|