diff options
Diffstat (limited to 'arm_compute/core/NEON/kernels/NEDepthwiseIm2ColKernel.h')
-rw-r--r-- | arm_compute/core/NEON/kernels/NEDepthwiseIm2ColKernel.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/arm_compute/core/NEON/kernels/NEDepthwiseIm2ColKernel.h b/arm_compute/core/NEON/kernels/NEDepthwiseIm2ColKernel.h index 8d59ba3248..ca10bfaab2 100644 --- a/arm_compute/core/NEON/kernels/NEDepthwiseIm2ColKernel.h +++ b/arm_compute/core/NEON/kernels/NEDepthwiseIm2ColKernel.h @@ -55,7 +55,7 @@ public: /** Set the input and output of the kernel. * * @param[in] input The input tensor to convert. 3 lower dimensions represent a single input [width, height, IFM], - * while every optional dimension from 4 and above represent a batch of inputs. Data types supported: F32 + * while every optional dimension from 4 and above represent a batch of inputs. Data types supported: QASYMM8, F32 * @param[out] output The output tensor. First 3 lower dimensions represent a transform of each 3D input, * while every dimension above 3 represents a batch. Data types supported: Same as @p input * @param[in] kernel_dims The kernel dimensions (width and height). @@ -68,11 +68,25 @@ public: void run(const Window &window, const ThreadInfo &info) override; private: - const ITensor *_input; - ITensor *_output; - Size2D _kernel_dims; - PadStrideInfo _conv_info; - bool _has_bias; + /** Template function to run the im2col used for the depthwise convolution layer case + * + * @param[in] window Region on which to execute the kernel. (Must be a valid region of the window returned by window()). + */ + template <typename T> + void run_generic(const Window &window); + /** Common signature for all the specialised depthwise im2col functions + * + * @param[in] window Region on which to execute the kernel. + */ + using DepthwiseIm2ColFunctionPtr = void (NEDepthwiseIm2ColKernel::*)(const Window &window); + +private: + DepthwiseIm2ColFunctionPtr _func; + const ITensor *_input; + ITensor *_output; + Size2D _kernel_dims; + PadStrideInfo _conv_info; + bool _has_bias; }; } // arm_compute #endif /*__ARM_COMPUTE_NEDEPTHWISEIM2COLKERNEL_H__ */ |