diff options
Diffstat (limited to 'tests/Utils.h')
-rw-r--r-- | tests/Utils.h | 13 |
1 files changed, 3 insertions, 10 deletions
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 <cmath> #include <cstddef> @@ -40,10 +41,6 @@ #include <string> #include <type_traits> -#ifdef ARM_COMPUTE_ENABLE_FP16 -#include <arm_fp16.h> // needed for float16_t -#endif /* ARM_COMPUTE_ENABLE_FP16 */ - namespace arm_compute { namespace test @@ -100,9 +97,7 @@ template <> struct promote<int16_t> { using type = int32_t; }; template <> struct promote<uint32_t> { using type = uint64_t; }; template <> struct promote<int32_t> { using type = int64_t; }; template <> struct promote<float> { using type = float; }; -#ifdef ARM_COMPUTE_ENABLE_FP16 -template <> struct promote<float16_t> { using type = float16_t; }; -#endif /* ARM_COMPUTE_ENABLE_FP16 */ +template <> struct promote<half_float::half> { using type = half_float::half; }; template <typename T> @@ -248,11 +243,9 @@ void store_value_with_data_type(void *ptr, T value, DataType data_type) case DataType::S64: *reinterpret_cast<int64_t *>(ptr) = value; break; -#if ARM_COMPUTE_ENABLE_FP16 case DataType::F16: - *reinterpret_cast<float16_t *>(ptr) = value; + *reinterpret_cast<half_float::half *>(ptr) = value; break; -#endif /* ARM_COMPUTE_ENABLE_FP16 */ case DataType::F32: *reinterpret_cast<float *>(ptr) = value; break; |