diff options
Diffstat (limited to 'arm_compute/core/utils')
-rw-r--r-- | arm_compute/core/utils/logging/LoggerRegistry.h | 6 | ||||
-rw-r--r-- | arm_compute/core/utils/logging/Types.h | 13 | ||||
-rw-r--r-- | arm_compute/core/utils/misc/CRTP.h | 1 | ||||
-rw-r--r-- | arm_compute/core/utils/misc/Iterable.h | 16 | ||||
-rw-r--r-- | arm_compute/core/utils/strong_type/StrongTypeAttributes.h | 2 |
5 files changed, 33 insertions, 5 deletions
diff --git a/arm_compute/core/utils/logging/LoggerRegistry.h b/arm_compute/core/utils/logging/LoggerRegistry.h index d3c691139e..066a42ff4f 100644 --- a/arm_compute/core/utils/logging/LoggerRegistry.h +++ b/arm_compute/core/utils/logging/LoggerRegistry.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -51,7 +51,7 @@ public: * @note Some names are reserved e.g. [CORE, RUNTIME, GRAPH] * * @param[in] name Logger's name - * @param[in] log_level Logger's log level. Defaults to @ref LogLevel::INFO + * @param[in] log_level Logger's log level. Defaults to INFO * @param[in] printers Printers to attach to the system loggers. Defaults with a @ref StdPrinter. */ void create_logger(const std::string &name, LogLevel log_level = LogLevel::INFO, @@ -70,7 +70,7 @@ public: std::shared_ptr<Logger> logger(const std::string &name); /** Creates reserved library loggers * - * @param[in] log_level (Optional) Logger's log level. Defaults to @ref LogLevel::INFO + * @param[in] log_level (Optional) Logger's log level. Defaults to INFO * @param[in] printers (Optional) Printers to attach to the system loggers. Defaults with a @ref StdPrinter. */ void create_reserved_loggers(LogLevel log_level = LogLevel::INFO, diff --git a/arm_compute/core/utils/logging/Types.h b/arm_compute/core/utils/logging/Types.h index 0b40e3d7a1..d56784369c 100644 --- a/arm_compute/core/utils/logging/Types.h +++ b/arm_compute/core/utils/logging/Types.h @@ -31,7 +31,7 @@ namespace arm_compute namespace logging { /** Logging level enumeration */ -enum class LogLevel : unsigned int +enum class LogLevel { VERBOSE, /**< All logging messages */ INFO, /**< Information log level */ @@ -40,19 +40,28 @@ enum class LogLevel : unsigned int OFF /**< No logging */ }; +/** Log message */ struct LogMsg { + /** Default constructor */ LogMsg() : raw_(), log_level_(LogLevel::OFF) { } + /** Construct a log message + * + * @param[in] msg Message to log. + * @param[in] log_level Logging level. Default: OFF + */ LogMsg(std::string msg, LogLevel log_level = LogLevel::OFF) : raw_(msg), log_level_(log_level) { } + /** Log message */ std::string raw_; - LogLevel log_level_; + /** Logging level */ + LogLevel log_level_; }; } // namespace logging } // namespace arm_compute diff --git a/arm_compute/core/utils/misc/CRTP.h b/arm_compute/core/utils/misc/CRTP.h index 9947312f95..8c39af14b1 100644 --- a/arm_compute/core/utils/misc/CRTP.h +++ b/arm_compute/core/utils/misc/CRTP.h @@ -33,6 +33,7 @@ template <typename T, template <typename> class Type> struct CRTP { public: + /** Exact type */ using ExactType = T; protected: diff --git a/arm_compute/core/utils/misc/Iterable.h b/arm_compute/core/utils/misc/Iterable.h index 96a650af35..d150111a56 100644 --- a/arm_compute/core/utils/misc/Iterable.h +++ b/arm_compute/core/utils/misc/Iterable.h @@ -49,21 +49,37 @@ public: { } + /** Get beginning of iterator. + * + * @return beginning of iterator. + */ typename T::reverse_iterator begin() { return _it.rbegin(); } + /** Get end of iterator. + * + * @return end of iterator. + */ typename T::reverse_iterator end() { return _it.rend(); } + /** Get beginning of const iterator. + * + * @return beginning of const iterator. + */ typename T::const_reverse_iterator cbegin() { return _it.rbegin(); } + /** Get end of const iterator. + * + * @return end of const iterator. + */ typename T::const_reverse_iterator cend() { return _it.rend(); diff --git a/arm_compute/core/utils/strong_type/StrongTypeAttributes.h b/arm_compute/core/utils/strong_type/StrongTypeAttributes.h index b5ed48f5ce..78a4032da7 100644 --- a/arm_compute/core/utils/strong_type/StrongTypeAttributes.h +++ b/arm_compute/core/utils/strong_type/StrongTypeAttributes.h @@ -34,6 +34,7 @@ namespace strong_type template <typename T> struct Comparable : misc::CRTP<T, Comparable> { +#ifndef DOXYGEN_SKIP_THIS bool operator==(T const &other) const { return this->impl().get() == other.get(); @@ -58,6 +59,7 @@ struct Comparable : misc::CRTP<T, Comparable> { return !(*this > other); } +#endif /* DOXYGEN_SKIP_THIS */ }; } // namespace strong_type } // namespace arm_compute |