aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/TensorFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validation/TensorFactory.h')
-rw-r--r--tests/validation/TensorFactory.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/tests/validation/TensorFactory.h b/tests/validation/TensorFactory.h
index 2f33dd283d..a3bb5f9615 100644
--- a/tests/validation/TensorFactory.h
+++ b/tests/validation/TensorFactory.h
@@ -24,29 +24,24 @@
#ifndef __ARM_COMPUTE_TEST_TENSOR_FACTORY_H__
#define __ARM_COMPUTE_TEST_TENSOR_FACTORY_H__
-#include "RawTensor.h"
-#include "Tensor.h"
#include "arm_compute/core/Error.h"
+#include "tests/RawTensor.h"
+#include "tests/validation/Tensor.h"
+#include "tests/validation/half.h"
#include "boost_wrapper.h"
-#if ARM_COMPUTE_ENABLE_FP16
-#include <arm_fp16.h> // needed for float16_t
-#endif /* ARM_COMPUTE_ENABLE_FP16 */
-
namespace arm_compute
{
namespace test
{
namespace validation
{
-using TensorVariant = boost::variant < Tensor<uint8_t>, Tensor<int8_t>,
+using TensorVariant = boost::variant<Tensor<uint8_t>, Tensor<int8_t>,
Tensor<uint16_t>, Tensor<int16_t>,
Tensor<uint32_t>, Tensor<int32_t>,
-#ifdef ARM_COMPUTE_ENABLE_FP16
- Tensor<float16_t>,
-#endif /* ARM_COMPUTE_ENABLE_FP16 */
- Tensor<float >>;
+ Tensor<half_float::half>,
+ Tensor<float>>;
/** Helper to create a constant type if the passed reference is constant. */
template <typename R, typename T>
@@ -95,12 +90,10 @@ public:
using value_type_s32 = typename match_const<R, int32_t>::type;
v = Tensor<int32_t>(shape, dt, fixed_point_position, reinterpret_cast<value_type_s32 *>(data));
break;
-#ifdef ARM_COMPUTE_ENABLE_FP16
case DataType::F16:
- using value_type_f16 = typename match_const<R, float16_t>::type;
- v = Tensor<float16_t>(shape, dt, fixed_point_position, reinterpret_cast<value_type_f16 *>(data));
+ using value_type_f16 = typename match_const<R, half_float::half>::type;
+ v = Tensor<half_float::half>(shape, dt, fixed_point_position, reinterpret_cast<value_type_f16 *>(data));
break;
-#endif /* ARM_COMPUTE_ENABLE_FP16 */
case DataType::F32:
using value_type_f32 = typename match_const<R, float>::type;
v = Tensor<float>(shape, dt, fixed_point_position, reinterpret_cast<value_type_f32 *>(data));