ARM Compute Library
17.04
|
Interface for the kernel to run an arbitrary size convolution on a tensor. More...
#include <NEConvolutionKernel.h>
Public Member Functions | |
NEConvolutionKernel () | |
Default constructor. More... | |
void | configure (const ITensor *input, ITensor *output, const int16_t *conv, uint32_t scale, bool border_undefined) |
Initialise the kernel's input, output and border mode. More... | |
void | run (const Window &window) override |
Execute the kernel on the passed window. More... | |
BorderSize | border_size () const override |
The size of the border for that kernel. More... | |
Public Member Functions inherited from ICPPSimpleKernel | |
ICPPSimpleKernel () | |
Constructor. More... | |
ICPPSimpleKernel (const ICPPSimpleKernel &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICPPSimpleKernel & | operator= (const ICPPSimpleKernel &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICPPSimpleKernel (ICPPSimpleKernel &&)=default | |
Allow instances of this class to be moved. More... | |
ICPPSimpleKernel & | operator= (ICPPSimpleKernel &&)=default |
Allow instances of this class to be moved. More... | |
~ICPPSimpleKernel ()=default | |
Default destructor. More... | |
Public Member Functions inherited from ICPPKernel | |
virtual | ~ICPPKernel ()=default |
Default destructor. More... | |
Public Member Functions inherited from IKernel | |
IKernel () | |
Constructor. More... | |
virtual | ~IKernel ()=default |
Destructor. More... | |
virtual bool | is_parallelisable () const |
Indicates whether or not the kernel is parallelisable. More... | |
const Window & | window () const |
The maximum window the kernel can be executed on. More... | |
Interface for the kernel to run an arbitrary size convolution on a tensor.
(Currently supports 3x3, 5x5, 7x7 and 9x9). The client can supply a convolution matrix \( C_{m,n} \).
\begin{eqnarray} k_0 &=& \frac{m}{2} \\ l_0 &=& \frac{n}{2} \\ sum &=& \sum_{k=0,l=0}^{k=m-1,l=n-1} input(x+k-k_0, y+l-l_0) C_{k,l} \end{eqnarray}
Definition at line 55 of file NEConvolutionKernel.h.
Default constructor.
|
overridevirtual |
The size of the border for that kernel.
Reimplemented from IKernel.
void configure | ( | const ITensor * | input, |
ITensor * | output, | ||
const int16_t * | conv, | ||
uint32_t | scale, | ||
bool | border_undefined | ||
) |
Initialise the kernel's input, output and border mode.
[in] | input | Source tensor. Data type supported: U8. |
[out] | output | Destination tensor. Data types supported: U8, S16. |
[in] | conv | Convolution matrix to apply to the input tensor. |
[in] | scale | Scale of the convolution matrix. If 0 is passed, it will be set to the sum of the coefficients of the convolution or 1 if they add up to 0. |
[in] | border_undefined | True if the border mode is undefined. False if it's replicate or constant. |
|
overridevirtual |
Execute the kernel on the passed window.
[in] | window | Region on which to execute the kernel. (Must be a region of the window returned by window()) |
Implements ICPPKernel.