diff options
author | Jim Flynn <jim.flynn@arm.com> | 2022-03-10 23:13:01 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2022-03-12 15:14:48 +0000 |
commit | 6c9f17dc5fe58e23db0ba591302168766b38ab2a (patch) | |
tree | 50b302f1bdfcce997a2b8330a8142d6858c672d5 /profiling/common/include | |
parent | 6730fe9cbc195f054d697b25daba8516d70658e0 (diff) | |
download | armnn-6c9f17dc5fe58e23db0ba591302168766b38ab2a.tar.gz |
IVGCVSW-6843 replace armnn::Logging with arm::pipe::Logging in profiling code
Change-Id: I9c3af46ca02c5685e06657b8af0e4658d71891d4
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'profiling/common/include')
-rw-r--r-- | profiling/common/include/Logging.hpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/profiling/common/include/Logging.hpp b/profiling/common/include/Logging.hpp index a31c2aaa7b..7a265d552d 100644 --- a/profiling/common/include/Logging.hpp +++ b/profiling/common/include/Logging.hpp @@ -16,6 +16,14 @@ namespace arm namespace pipe { +#if defined(__clang__) &&((__clang_major__>=3)||(__clang_major__==3 && __clang_minor__ >= 5)) +# define ARM_PIPE_FALLTHROUGH [[clang::fallthrough]] +#elif defined(__GNUC__) && (__GNUC__ >= 7) +# define ARM_PIPE_FALLTHROUGH __attribute__((fallthrough)) +#else +# define ARM_PIPE_FALLTHROUGH ((void)0) +#endif + enum class LogSeverity { Trace, @@ -47,6 +55,13 @@ inline std::string LevelToString(LogSeverity level) } } +/// Configures the logging behaviour of the ARMNN library. +/// printToStandardOutput: Set to true if log messages should be printed to the standard output. +/// printToDebugOutput: Set to true if log messages be printed to a platform-specific debug output +/// (where supported). +/// severity: All log messages that are at this severity level or higher will be printed, others will be ignored. +void ConfigureLogging(bool printToStandardOutput, bool printToDebugOutput, LogSeverity severity); + class LogSink { public: @@ -124,7 +139,7 @@ public: { } - static SimpleLogger& Get() + static SimpleLogger<Level>& Get() { static SimpleLogger<Level> logger; return logger; |