aboutsummaryrefslogtreecommitdiff
path: root/tests/Utils.h
diff options
context:
space:
mode:
authorPablo Tello <pablo.tello@arm.com>2017-06-23 10:40:05 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:14:20 +0100
commit383deec6b38f8b00f901d475000d46f8d3e5fb97 (patch)
treedc2e72587ea624d1b0eb06d8559af0e7783d90d0 /tests/Utils.h
parentfabb038a54ca217497c17e31ba7ae098690f2f69 (diff)
downloadComputeLibrary-383deec6b38f8b00f901d475000d46f8d3e5fb97.tar.gz
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 <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/Utils.h')
-rw-r--r--tests/Utils.h12
1 files changed, 10 insertions, 2 deletions
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 <string>
#include <type_traits>
+#if ARM_COMPUTE_ENABLE_FP16
+#include <arm_fp16.h> // needed for float16_t
+#endif
+
namespace arm_compute
{
namespace test
@@ -362,6 +366,10 @@ 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
+
template <typename T>
using promote_t = typename promote<T>::type;
@@ -513,11 +521,11 @@ void store_value_with_data_type(void *ptr, T value, DataType data_type)
case DataType::S64:
*reinterpret_cast<int64_t *>(ptr) = value;
break;
-#ifdef ENABLE_FP16
+#if ARM_COMPUTE_ENABLE_FP16
case DataType::F16:
*reinterpret_cast<float16_t *>(ptr) = value;
break;
-#endif /* ENABLE_FP16 */
+#endif /* ARM_COMPUTE_ENABLE_FP16 */
case DataType::F32:
*reinterpret_cast<float *>(ptr) = value;
break;