Refactor of IO functions

Related-To: NEO-4562

Signed-off-by: Konstanty Misiak <konstanty.misiak@intel.com>
This commit is contained in:
Konstanty Misiak
2023-02-13 09:55:24 +00:00
committed by Compute-Runtime-Automation
parent c0f0472b6e
commit 1f37e69fd2
13 changed files with 27 additions and 16 deletions

View File

@@ -7,6 +7,7 @@
#pragma once
#include "shared/source/helpers/string.h"
#include "shared/source/utilities/io_functions.h"
#include <cstdint>
#include <memory>
@@ -37,13 +38,13 @@ extern FileLogger<globalDebugFunctionalityLevel> &fileLoggerInstance();
template <typename StreamT, typename... Args>
void flushDebugStream(StreamT stream, Args &&...args) {
fflush(stream);
IoFunctions::fflushPtr(stream);
}
template <typename... Args>
void printDebugString(bool showDebugLogs, Args &&...args) {
if (showDebugLogs) {
fprintf(std::forward<Args>(args)...);
IoFunctions::fprintf(std::forward<Args>(args)...);
flushDebugStream(args...);
}
}