diff options
Diffstat (limited to 'utils/TypePrinter.h')
-rw-r--r-- | utils/TypePrinter.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 70196882de..a71e03696a 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -34,6 +34,7 @@ #include "arm_compute/core/Strides.h" #include "arm_compute/core/TensorInfo.h" #include "arm_compute/core/Types.h" +#include "arm_compute/runtime/CL/CLTunerTypes.h" #include <ostream> #include <sstream> @@ -2218,6 +2219,49 @@ inline std::string to_string(const T &val) return support::cpp11::to_string(val); } +/** Convert a CLTunerMode value to a string + * + * @param val CLTunerMode value to be converted + * + * @return String representing the corresponding CLTunerMode. + */ +inline std::string to_string(const CLTunerMode val) +{ + switch(val) + { + case CLTunerMode::EXHAUSTIVE: + { + return std::string("Exhaustive"); + } + case CLTunerMode::NORMAL: + { + return std::string("Normal"); + } + case CLTunerMode::RAPID: + { + return std::string("Rapid"); + } + default: + { + ARM_COMPUTE_ERROR("Invalid tuner mode."); + return std::string("UNDEFINED"); + } + } +} +/** [Print CLTunerMode type] **/ +/** Formatted output of the CLTunerMode type. + * + * @param[out] os Output stream. + * @param[in] val CLTunerMode to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const CLTunerMode &val) +{ + os << to_string(val); + return os; +} + } // namespace arm_compute #endif /* __ARM_COMPUTE_TYPE_PRINTER_H__ */ |