21.02
|
Interface for filling the border of a kernel. More...
#include <GCFillBorderKernel.h>
Public Member Functions | |
GCFillBorderKernel () | |
Default constructor. More... | |
GCFillBorderKernel (const GCFillBorderKernel &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
GCFillBorderKernel & | operator= (const GCFillBorderKernel &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
GCFillBorderKernel (GCFillBorderKernel &&)=default | |
Allow instances of this class to be moved. More... | |
GCFillBorderKernel & | operator= (GCFillBorderKernel &&)=default |
Allow instances of this class to be moved. More... | |
~GCFillBorderKernel ()=default | |
Default destructor. More... | |
void | configure (const IGCTensor *tensor, BorderSize border_size, BorderMode border_mode, const PixelValue &constant_border_value=PixelValue()) |
Initialise the kernel's input, output and border mode. More... | |
template<class T > | |
void | set_constant_border (unsigned int idx, const PixelValue &constant_border_value) |
Function to set the constant value on fill border kernel depending on type. More... | |
void | run (const Window &window) override |
Enqueue the OpenGL ES shader to process the given window. More... | |
bool | is_parallelisable () const override |
Indicates whether or not the kernel is parallelisable. More... | |
Public Member Functions inherited from IGCKernel | |
IGCKernel () | |
Constructor. More... | |
GCKernel & | kernel () |
Returns a reference to the GLES kernel of this object. More... | |
void | add_1D_tensor_argument (unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window) |
Add the passed 1D tensor's parameters to the object's kernel's arguments starting from the index idx. More... | |
void | add_2D_tensor_argument (unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window) |
Add the passed 2D tensor's parameters to the object's kernel's arguments starting from the index idx. More... | |
void | add_3D_tensor_argument (unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window) |
Add the passed 3D tensor's parameters to the object's kernel's arguments starting from the index idx. More... | |
unsigned int | num_arguments_per_1D_tensor () const |
Returns the number of arguments enqueued per 1D tensor object. More... | |
unsigned int | num_arguments_per_2D_tensor () const |
Returns the number of arguments enqueued per 2D tensor object. More... | |
unsigned int | num_arguments_per_3D_tensor () const |
Returns the number of arguments enqueued per 3D tensor object. More... | |
void | set_lws_hint (gles::NDRange &lws_hint) |
Set the Local-Workgroup-Size hint. More... | |
void | set_target (GPUTarget target) |
Set the targeted GPU architecture. More... | |
GPUTarget | get_target () const |
Get the targeted GPU architecture. More... | |
Public Member Functions inherited from IKernel | |
IKernel () | |
Constructor. More... | |
virtual | ~IKernel ()=default |
Destructor. More... | |
virtual BorderSize | border_size () const |
The size of the border for that kernel. More... | |
const Window & | window () const |
The maximum window the kernel can be executed on. More... | |
Interface for filling the border of a kernel.
Definition at line 36 of file GCFillBorderKernel.h.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
|
default |
Default destructor.
void configure | ( | const IGCTensor * | tensor, |
BorderSize | border_size, | ||
BorderMode | border_mode, | ||
const PixelValue & | constant_border_value = PixelValue() |
||
) |
Initialise the kernel's input, output and border mode.
[in,out] | tensor | Tensor to process Data types supported: F16/F32. |
[in] | border_size | Size of the border to fill in elements. |
[in] | border_mode | Border mode to use for the convolution. |
[in] | constant_border_value | (Optional) Constant value to use for borders if border_mode is set to CONSTANT. |
Definition at line 63 of file GCFillBorderKernel.cpp.
References ValidRegion::anchor, ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, BorderSize::bottom, arm_compute::CONSTANT, GCKernelLibrary::create_kernel(), ITensorInfo::data_type(), Window::DimX, Window::DimY, Window::DimZ, BorderSize::empty(), arm_compute::F16, arm_compute::F32, GCKernelLibrary::get(), ITensor::info(), kernel_name, BorderSize::left, BorderSize::limit(), arm_compute::lower_string(), IGCKernel::num_arguments_per_3D_tensor(), ITensorInfo::num_channels(), ITensorInfo::padding(), arm_compute::REPLICATE, BorderSize::right, Window::set(), ValidRegion::shape, arm_compute::string_from_border_mode(), ITensorInfo::tensor_shape(), arm_compute::support::cpp11::to_string(), BorderSize::top, arm_compute::UNDEFINED, and ITensorInfo::valid_region().
Referenced by GCPoolingLayer::configure(), GCNormalizationLayer::configure(), GCDepthwiseConvolutionLayer3x3::configure(), GCDirectConvolutionLayer::configure(), and GCConvolutionLayer::configure().
|
overridevirtual |
Indicates whether or not the kernel is parallelisable.
If the kernel is parallelisable then the window returned by window() can be split into sub-windows which can then be run in parallel.
If the kernel is not parallelisable then only the window returned by window() can be passed to run()
Reimplemented from IKernel.
Definition at line 50 of file GCFillBorderKernel.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
|
overridevirtual |
Enqueue the OpenGL ES shader to process the given window.
[in] | window | Region on which to execute the kernel. (Must be a valid region of the window returned by window()). |
Implements IGCKernel.
Definition at line 144 of file GCFillBorderKernel.cpp.
References IGCKernel::add_3D_tensor_argument(), ARM_COMPUTE_ERROR_ON_MISMATCHING_WINDOWS, ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL, arm_compute::enqueue(), Window::first_slice_window_3D(), arm_compute::test::validation::reference::slice(), Window::slide_window_slice_3D(), and IKernel::window().
void set_constant_border | ( | unsigned int | idx, |
const PixelValue & | constant_border_value | ||
) |
Function to set the constant value on fill border kernel depending on type.
[in] | idx | Index of the kernel argument to set. |
[in] | constant_border_value | Constant value to use for borders if border_mode is set to CONSTANT. |
Definition at line 56 of file GCFillBorderKernel.cpp.