From 383deec6b38f8b00f901d475000d46f8d3e5fb97 Mon Sep 17 00:00:00 2001 From: Pablo Tello Date: Fri, 23 Jun 2017 10:40:05 +0100 Subject: COMPMID-345: Added support for arm8.2+FP16 in the the validation framework. Change-Id: Ifef2133d4a0da5456bec147330405b6d58cf6a71 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78676 Tested-by: Kaizen Reviewed-by: Anthony Barbier --- tests/Utils.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tests/Utils.h') diff --git a/tests/Utils.h b/tests/Utils.h index f3622cafaa..b2d4bf4f90 100644 --- a/tests/Utils.h +++ b/tests/Utils.h @@ -38,6 +38,10 @@ #include #include +#if ARM_COMPUTE_ENABLE_FP16 +#include // needed for float16_t +#endif + namespace arm_compute { namespace test @@ -362,6 +366,10 @@ template <> struct promote { using type = int32_t; }; template <> struct promote { using type = uint64_t; }; template <> struct promote { using type = int64_t; }; template <> struct promote { using type = float; }; +#ifdef ARM_COMPUTE_ENABLE_FP16 +template <> struct promote { using type = float16_t; }; +#endif + template using promote_t = typename promote::type; @@ -513,11 +521,11 @@ void store_value_with_data_type(void *ptr, T value, DataType data_type) case DataType::S64: *reinterpret_cast(ptr) = value; break; -#ifdef ENABLE_FP16 +#if ARM_COMPUTE_ENABLE_FP16 case DataType::F16: *reinterpret_cast(ptr) = value; break; -#endif /* ENABLE_FP16 */ +#endif /* ARM_COMPUTE_ENABLE_FP16 */ case DataType::F32: *reinterpret_cast(ptr) = value; break; -- cgit v1.2.1