diff options
Diffstat (limited to 'arm_compute')
-rw-r--r-- | arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h | 19 | ||||
-rw-r--r-- | arm_compute/core/Window.h | 4 | ||||
-rw-r--r-- | arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h | 1 |
3 files changed, 12 insertions, 12 deletions
diff --git a/arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h b/arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h index 2e29234b6f..335a70fc2b 100644 --- a/arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h +++ b/arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h @@ -25,7 +25,7 @@ #define ARM_COMPUTE_NEDEPTHWISECONVOLUTIONLAYERNATIVEKERNEL_H #include "arm_compute/core/NEON/INEKernel.h" -#include "arm_compute/core/utils/misc/Requires.h" +#include "arm_compute/core/utils/misc/Traits.h" #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC #include <arm_neon.h> @@ -92,18 +92,18 @@ public: // Inherited methods overridden: void run(const Window &window, const ThreadInfo &info) override; - BorderSize border_size() const override; private: - template < typename T, typename TW, int S, typename std::enable_if < std::is_same<T, float>::value -#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC - || std::is_same<T, float16_t>::value -#endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC - , - int >::type = 0 > + template <typename T> + using FloatEnalber = typename std::enable_if<arm_compute::utils::traits::is_floating_point<T>::value, int>::type; + + template <typename T, typename TW, FloatEnalber<T> = 0> void run_depthwise(const Window &window, bool has_biases); - template < typename T, typename TW, int S, REQUIRES_TA(std::is_same<T, uint8_t>::value || std::is_same<T, int8_t>::value) > + template <typename T> + using Quantized8bitEnalber = typename std::enable_if < std::is_same<T, uint8_t>::value || std::is_same<T, int8_t>::value, int >::type; + + template <typename T, typename TW, Quantized8bitEnalber<T> = 0> void run_depthwise(const Window &window, bool has_biases); /** Common signature for all the specialised depthwise convolution native functions @@ -113,7 +113,6 @@ private: using DepthwiseFunctionPtr = void (NEDepthwiseConvolutionLayerNativeKernel::*)(const Window &window, bool has_biases); DepthwiseFunctionPtr _func; - BorderSize _border_size; const ITensor *_input; const ITensor *_weights; const ITensor *_biases; diff --git a/arm_compute/core/Window.h b/arm_compute/core/Window.h index 2ba5440c68..150320a90e 100644 --- a/arm_compute/core/Window.h +++ b/arm_compute/core/Window.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Arm Limited. + * Copyright (c) 2016-2020 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -45,6 +45,8 @@ public: static constexpr size_t DimY = 1; /** Alias for dimension 2 also known as Z dimension */ static constexpr size_t DimZ = 2; + /** Alias for dimension 3 also known as W dimension */ + static constexpr size_t DimW = 3; /** Default constructor: create a window containing a single element. */ constexpr Window() diff --git a/arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h b/arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h index 3b75bb11a7..c6b98ed435 100644 --- a/arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h +++ b/arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h @@ -249,7 +249,6 @@ private: private: NEDepthwiseConvolutionLayerNativeKernel _depthwise_conv_kernel; - NEFillBorderKernel _fill_border; NEPermute _permute_input; NEPermute _permute_weights; NEPermute _permute_output; |