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/validation/Reference.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tests/validation/Reference.cpp') diff --git a/tests/validation/Reference.cpp b/tests/validation/Reference.cpp index 1db3c3f5fb..b94a0e5195 100644 --- a/tests/validation/Reference.cpp +++ b/tests/validation/Reference.cpp @@ -476,15 +476,13 @@ RawTensor Reference::compute_reference_activation_layer(const TensorShape &shape library->fill(ref_src, distribution, 0); break; } -#ifdef ARM_COMPUTE_ENABLE_FP16 case DataType::F16: { - const std::pair bounds = get_activation_layer_test_bounds(act_info.activation()); + const std::pair bounds = get_activation_layer_test_bounds(act_info.activation()); std::uniform_real_distribution<> distribution(bounds.first, bounds.second); library->fill(ref_src, distribution, 0); break; } -#endif /* ARM_COMPUTE_ENABLE_FP16 */ case DataType::F32: { const std::pair bounds = get_activation_layer_test_bounds(act_info.activation()); @@ -604,9 +602,9 @@ RawTensor Reference::compute_reference_depth_concatenate_layer(const std::vector TensorShape dst_shape = calculate_depth_concatenate_shape(shapes); // Create tensors - for(unsigned int i = 0; i < shapes.size(); ++i) + for(const auto &shape : shapes) { - ref_srcs.push_back(support::cpp14::make_unique(RawTensor(shapes[i], dt, 1, fixed_point_position))); + ref_srcs.push_back(support::cpp14::make_unique(shape, dt, 1, fixed_point_position)); } RawTensor ref_dst(dst_shape, dt, 1, fixed_point_position); -- cgit v1.2.1