From 583137cc60580023abfd9d05abf933e7e117e29f Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 31 Aug 2017 18:12:42 +0100 Subject: COMPMID-417: Add support for floats in scale. Change-Id: I7d714ba13861509080a89817f54e9d32da83e970 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/86026 Reviewed-by: Pablo Tello Tested-by: Kaizen --- src/core/NEON/kernels/NEFillBorderKernel.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/core/NEON/kernels/NEFillBorderKernel.cpp') diff --git a/src/core/NEON/kernels/NEFillBorderKernel.cpp b/src/core/NEON/kernels/NEFillBorderKernel.cpp index 3f1f678a7e..9505a2520f 100644 --- a/src/core/NEON/kernels/NEFillBorderKernel.cpp +++ b/src/core/NEON/kernels/NEFillBorderKernel.cpp @@ -27,16 +27,13 @@ #include "arm_compute/core/Helpers.h" #include "arm_compute/core/ITensor.h" #include "arm_compute/core/TensorInfo.h" +#include "arm_compute/core/Types.h" #include "arm_compute/core/Validate.h" #include "arm_compute/core/Window.h" #include #include -#if ARM_COMPUTE_ENABLE_FP16 -#include // needed for float16_t -#endif /* ARM_COMPUTE_ENABLE_FP16 */ - using namespace arm_compute; namespace @@ -163,18 +160,20 @@ void NEFillBorderKernel::run(const Window &window, const ThreadInfo &info) case DataType::S32: fill_constant_value_single_channel(window); break; -#ifdef ARM_COMPUTE_ENABLE_FP16 case DataType::F16: - static_assert(sizeof(float16_t) == 2, "Float16_t must be 16 bit"); - fill_constant_value_single_channel(window); + static_assert(sizeof(half) == 2, "Float16_t must be 16 bit"); + fill_constant_value_single_channel(window); break; -#endif /* ARM_COMPUTE_ENABLE_FP16 */ case DataType::F32: static_assert(sizeof(float) == 4, "Float must be 32 bit"); if(_border_size.left == 1 && _border_size.top == 1) + { fill_constant_value_single_channel_special(_tensor, window, _border_size.right, _border_size.bottom, _constant_border_value); + } else + { fill_constant_value_single_channel(window); + } break; default: ARM_COMPUTE_ERROR("Not handled"); @@ -205,12 +204,10 @@ void NEFillBorderKernel::run(const Window &window, const ThreadInfo &info) case DataType::S32: fill_replicate_single_channel(window); break; -#ifdef ARM_COMPUTE_ENABLE_FP16 case DataType::F16: - static_assert(sizeof(float16_t) == 2, "Float16_t must be 16 bit"); - fill_replicate_single_channel(window); + static_assert(sizeof(half) == 2, "Float16_t must be 16 bit"); + fill_replicate_single_channel(window); break; -#endif /* ARM_COMPUTE_ENABLE_FP16 */ case DataType::F32: static_assert(sizeof(float) == 4, "Float must be 32 bit"); fill_replicate_single_channel(window); -- cgit v1.2.1