ArmNN
 23.05
Utils.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017,2022 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include <string>
8 
9 namespace armnn
10 {
11 
12 enum class LogSeverity
13 {
14  Trace,
15  Debug,
16  Info,
17  Warning,
18  Error,
19  Fatal
20 };
21 
22 /// Configures the logging behaviour of the ARMNN library.
23 /// printToStandardOutput: Set to true if log messages should be printed to the standard output.
24 /// printToDebugOutput: Set to true if log messages be printed to a platform-specific debug output
25 /// (where supported).
26 /// severity: All log messages that are at this severity level or higher will be printed, others will be ignored.
27 void ConfigureLogging(bool printToStandardOutput, bool printToDebugOutput, LogSeverity severity);
28 
29 
30 #if defined(__clang__) &&((__clang_major__>=3)||(__clang_major__==3 && __clang_minor__ >= 5))
31 # define ARMNN_FALLTHROUGH [[clang::fallthrough]]
32 #elif defined(__GNUC__) && (__GNUC__ >= 7)
33 # define ARMNN_FALLTHROUGH __attribute__((fallthrough))
34 #else
35 # define ARMNN_FALLTHROUGH ((void)0)
36 #endif
37 
38 bool NeonDetected();
39 
40 const std::string GetVersion();
41 
42 } // namespace armnn
armnn::LogSeverity::Warning
@ Warning
armnn::LogSeverity
LogSeverity
Definition: Utils.hpp:12
armnn::ConfigureLogging
void ConfigureLogging(bool printToStandardOutput, bool printToDebugOutput, LogSeverity severity)
Configures the logging behaviour of the ARMNN library.
Definition: Utils.cpp:18
armnn::NeonDetected
bool NeonDetected()
Definition: Utils.cpp:37
armnn::LogSeverity::Info
@ Info
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::LogSeverity::Fatal
@ Fatal
armnn::LogSeverity::Trace
@ Trace
armnn::GetVersion
const std::string GetVersion()
Definition: Utils.cpp:77
armnn::LogSeverity::Error
@ Error
armnn::LogSeverity::Debug
@ Debug