21.02
|
Interface for the normalization layer kernel. More...
#include <GCNormalizationLayerKernel.h>
Public Member Functions | |
GCNormalizationLayerKernel () | |
Constructor. More... | |
GCNormalizationLayerKernel (const GCNormalizationLayerKernel &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
GCNormalizationLayerKernel & | operator= (const GCNormalizationLayerKernel &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
GCNormalizationLayerKernel (GCNormalizationLayerKernel &&)=default | |
Default Move Constructor. More... | |
GCNormalizationLayerKernel & | operator= (GCNormalizationLayerKernel &&)=default |
Default move assignment operator. More... | |
~GCNormalizationLayerKernel ()=default | |
Default destrutor. More... | |
void | configure (const IGCTensor *input, const IGCTensor *squared_input, IGCTensor *output, NormalizationLayerInfo norm_info) |
Set the input and output tensors. More... | |
void | run (const Window &window) override |
Enqueue the OpenGL ES shader to process the given window. More... | |
BorderSize | border_size () const override |
The size of the border for that kernel. 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 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 normalization layer kernel.
Definition at line 35 of file GCNormalizationLayerKernel.h.
Constructor.
Definition at line 42 of file GCNormalizationLayerKernel.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default Move Constructor.
|
default |
Default destrutor.
|
overridevirtual |
The size of the border for that kernel.
Reimplemented from IKernel.
Definition at line 47 of file GCNormalizationLayerKernel.cpp.
Referenced by GCNormalizationLayer::configure().
void configure | ( | const IGCTensor * | input, |
const IGCTensor * | squared_input, | ||
IGCTensor * | output, | ||
NormalizationLayerInfo | norm_info | ||
) |
Set the input and output tensors.
[in] | input | Source tensor. 3 lower dims represent a single input with dimensions [width, height, IFM], and an optional 4th dimension for batch of inputs. Data types supported: F32. |
[in] | squared_input | Source with each element has been squared. 3 lower dims represent a single input with dimensions [width, height, IFM], Data types should match the input type. |
[out] | output | Destination tensor. Output will have the same number of dimensions as input. Data types should match the input type. |
[in] | norm_info | Normalization layer information like the normalization type, normalization size and other parameters. |
Definition at line 52 of file GCNormalizationLayerKernel.cpp.
References ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES, ARM_COMPUTE_ERROR_ON_MSG, NormalizationLayerInfo::beta(), arm_compute::calculate_max_window(), GCKernelLibrary::create_kernel(), arm_compute::F32, arm_compute::float_to_string_with_full_precision(), GCKernelLibrary::get(), arm_compute::IN_MAP_1D, arm_compute::IN_MAP_2D, ITensor::info(), arm_compute::test::validation::input, NormalizationLayerInfo::is_in_map(), NormalizationLayerInfo::kappa(), NormalizationLayerInfo::norm_size(), num_elems_processed_per_iteration, NormalizationLayerInfo::scale_coeff(), arm_compute::support::cpp11::to_string(), NormalizationLayerInfo::type(), arm_compute::U, arm_compute::update_window_and_padding(), and ITensorInfo::valid_region().
Referenced by GCNormalizationLayer::configure().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move assignment operator.
|
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 101 of file GCNormalizationLayerKernel.cpp.
References IGCKernel::add_3D_tensor_argument(), ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW, 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().