From ab14c15dc9a0f55664fe523aed072fffa60da420 Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Thu, 9 Nov 2017 10:29:59 +0000 Subject: COMPMID-663: Reworked / cleaned up instuments' measurements Everything used to be stored as double which led to some numbers appearing in scientific notation and some counters values getting corrupted. Now measurements can be stored as either floating point or integer values. Added support for raw_data in order to output more detailed information to the JSON files (Will make use of that in the OpenCL timer instrument) Change-Id: Ie83776b347a764c8bf45b47d7d9d7bec02b04257 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95035 Tested-by: Kaizen Reviewed-by: Gian Marco Iodice Reviewed-by: Georgios Pinitas --- tests/framework/Utils.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/framework/Utils.h') diff --git a/tests/framework/Utils.h b/tests/framework/Utils.h index a9fe0dcaa3..4f4b6fce56 100644 --- a/tests/framework/Utils.h +++ b/tests/framework/Utils.h @@ -152,6 +152,22 @@ inline std::string tolower(std::string string) }); return string; } + +/** Create a string with the arithmetic value in full precision. + * + * @param val Arithmetic value + * + * @return String with the arithmetic value. + */ +template ::value, int>::type = 0> +inline std::string arithmetic_to_string(T val) +{ + std::stringstream ss; + ss.precision(std::numeric_limits::digits10 + 1); + ss << val; + return ss.str(); +} + } // namespace framework } // namespace test } // namespace arm_compute -- cgit v1.2.1