From e49e26613264842f91d29a32be3a226a0d6adb42 Mon Sep 17 00:00:00 2001 From: Moritz Pflanzer Date: Fri, 21 Jul 2017 15:55:28 +0100 Subject: COMPMID-415: Use half_float library for F16 3RDPARTY_UPDATE Change-Id: Iee572e18d5b1df71300d738cc8690f49d7203d5c Reviewed-on: http://mpd-gerrit.cambridge.arm.com/81353 Tested-by: Kaizen Reviewed-by: Anthony Barbier --- tests/Utils.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'tests/Utils.h') diff --git a/tests/Utils.h b/tests/Utils.h index ad45bffe6e..0a58d41e35 100644 --- a/tests/Utils.h +++ b/tests/Utils.h @@ -31,6 +31,7 @@ #include "arm_compute/core/TensorShape.h" #include "arm_compute/core/Types.h" #include "support/ToolchainSupport.h" +#include "tests/validation/half.h" #include #include @@ -40,10 +41,6 @@ #include #include -#ifdef ARM_COMPUTE_ENABLE_FP16 -#include // needed for float16_t -#endif /* ARM_COMPUTE_ENABLE_FP16 */ - namespace arm_compute { namespace test @@ -100,9 +97,7 @@ 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 /* ARM_COMPUTE_ENABLE_FP16 */ +template <> struct promote { using type = half_float::half; }; template @@ -248,11 +243,9 @@ void store_value_with_data_type(void *ptr, T value, DataType data_type) case DataType::S64: *reinterpret_cast(ptr) = value; break; -#if ARM_COMPUTE_ENABLE_FP16 case DataType::F16: - *reinterpret_cast(ptr) = value; + *reinterpret_cast(ptr) = value; break; -#endif /* ARM_COMPUTE_ENABLE_FP16 */ case DataType::F32: *reinterpret_cast(ptr) = value; break; -- cgit v1.2.1