aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-08-10 15:28:25 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit8914e32962be3dc8608499e3c0f2f13141493fc4 (patch)
tree033149dd7969e483811602883fb996f255d82993 /utils
parentdb9d46da3a8645d0c2cc71d035448999a36770ec (diff)
downloadComputeLibrary-8914e32962be3dc8608499e3c0f2f13141493fc4.tar.gz
COMPMID-1473: Added missing TypePrinter for CPUModel, added accessor for number of CPUs
Change-Id: If81d58b83143129bed91b9c6658b0cd4e623bc38 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/143664 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/TypePrinter.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index d9b971d993..5d57dda201 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -25,6 +25,7 @@
#define __ARM_COMPUTE_TEST_TYPE_PRINTER_H__
#include "arm_compute/core/CL/CLTypes.h"
+#include "arm_compute/core/CPP/CPPTypes.h"
#include "arm_compute/core/Dimensions.h"
#include "arm_compute/core/Error.h"
#include "arm_compute/core/GPUTarget.h"
@@ -1667,6 +1668,54 @@ inline std::string to_string(const Termination &termination)
return str.str();
}
+/** Formatted output of the CPUModel type.
+ *
+ * @param[out] os Output stream
+ * @param[in] cpu_model Model to output
+ *
+ * @return Modified output stream.
+ */
+inline ::std::ostream &operator<<(::std::ostream &os, const CPUModel &cpu_model)
+{
+ switch(cpu_model)
+ {
+ case CPUModel::GENERIC:
+ os << "GENERIC";
+ break;
+ case CPUModel::GENERIC_FP16:
+ os << "GENERIC_FP16";
+ break;
+ case CPUModel::GENERIC_FP16_DOT:
+ os << "GENERIC_FP16_DOT";
+ break;
+ case CPUModel::A53:
+ os << "A53";
+ break;
+ case CPUModel::A55r0:
+ os << "A55r0";
+ break;
+ case CPUModel::A55r1:
+ os << "A55r1";
+ break;
+ default:
+ ARM_COMPUTE_ERROR("NOT_SUPPORTED!");
+ }
+
+ return os;
+}
+
+/** Formatted output of the CPUModel type.
+ *
+ * @param[in] cpu_model Model to output
+ *
+ * @return Formatted string.
+ */
+inline std::string to_string(const CPUModel &cpu_model)
+{
+ std::stringstream str;
+ str << cpu_model;
+ return str.str();
+}
/** Formatted output of a vector of objects.
*
* @param[out] os Output stream