aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/CPP
diff options
context:
space:
mode:
authorPablo Tello <pablo.tello@arm.com>2018-10-01 14:31:11 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:55:19 +0000
commit4e0ac6fd6bc647e811cc12c1e3d392a6151ec576 (patch)
tree6526fd9f286831c37381dcae5b29975b043df40b /arm_compute/core/CPP
parentb92805b2a0b8703f506fb287bcb0960232eca5bc (diff)
downloadComputeLibrary-4e0ac6fd6bc647e811cc12c1e3d392a6151ec576.tar.gz
COMPMID-162: output cpus list and capabilities in validation suite.
Change-Id: I6f71f2da851454e8fbbdfc9223592dea9ad03bac Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/151014 Tested-by: bsgcomp <bsgcomp@arm.com> Reviewed-by: Giuseppe Rossini <giuseppe.rossini@arm.com> Reviewed-by: Isabella Gottardi <isabella.gottardi@arm.com>
Diffstat (limited to 'arm_compute/core/CPP')
-rw-r--r--arm_compute/core/CPP/CPPTypes.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/arm_compute/core/CPP/CPPTypes.h b/arm_compute/core/CPP/CPPTypes.h
index 3ab1316369..9ffb4840a3 100644
--- a/arm_compute/core/CPP/CPPTypes.h
+++ b/arm_compute/core/CPP/CPPTypes.h
@@ -24,6 +24,9 @@
#ifndef __ARM_COMPUTE_CPP_TYPES_H__
#define __ARM_COMPUTE_CPP_TYPES_H__
+#include "arm_compute/core/Error.h"
+
+#include <string>
#include <vector>
namespace arm_compute
@@ -43,6 +46,48 @@ enum class CPUModel
A55r1
};
+/** Convert a cpumodel value to a string
+ *
+ * @param val CPUModel value to be converted
+ *
+ * @return String representing the corresponding CPUModel.
+ */
+inline std::string cpu_model_to_string(CPUModel val)
+{
+ switch(val)
+ {
+ case CPUModel::GENERIC:
+ {
+ return std::string("GENERIC");
+ }
+ case CPUModel::GENERIC_FP16:
+ {
+ return std::string("GENERIC_FP16");
+ }
+ case CPUModel::GENERIC_FP16_DOT:
+ {
+ return std::string("GENERIC_FP16_DOT");
+ }
+ case CPUModel::A53:
+ {
+ return std::string("A53");
+ }
+ case CPUModel::A55r0:
+ {
+ return std::string("A55r0");
+ }
+ case CPUModel::A55r1:
+ {
+ return std::string("A55r1");
+ }
+ default:
+ {
+ ARM_COMPUTE_ERROR("Invalid CPUModel.");
+ return std::string("GENERIC");
+ }
+ }
+}
+
class CPUInfo final
{
public: