mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
Refactor of IO functions
Related-To: NEO-4562 Signed-off-by: Konstanty Misiak <konstanty.misiak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c0f0472b6e
commit
1f37e69fd2
@@ -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...);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user