43 : _input(nullptr), _squared_input(nullptr), _output(nullptr), _border_size(0)
60 std::set<std::string> build_opts;
63 _squared_input = squared_input;
66 const bool is_in_map = norm_info.
is_in_map();
67 const unsigned int border_width = is_in_map ? std::min(norm_info.
norm_size() / 2, 3
U) : 0;
72 build_opts.emplace((
"#define " + func_name));
86 const unsigned int num_elems_read_per_iteration = num_elems_processed_per_iteration + 2 * (norm_info.
norm_size() / 2);
98 IGCKernel::configure(win);
112 unsigned int idx = 0;
113 unsigned int binding = 1;
118 _kernel.update_shader_params();
float scale_coeff() const
Return the scaling factor of the normalization function.
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
const Window & window() const
The maximum window the kernel can be executed on.
float kappa() const
Get the kappa value.
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...
void enqueue(IGCKernel &kernel, const Window &window, const gles::NDRange &lws=gles::NDRange(1U, 1U, 1U))
Add the kernel to the command queue with the given window.
bool is_in_map() const
Check if normalization is not cross map.
Container for 2D border size.
uint32_t norm_size() const
Get the normalization size.
NormType type() const
Get the normalization type.
std::string to_string(T &&value)
Convert integer and float values to string.
void run(const Window &window) override
Enqueue the OpenGL ES shader to process the given window.
1 channel, 1 F32 per channel
Normalization Layer Information class.
GCNormalizationLayerKernel()
Constructor.
Interface for GLES Compute tensor.
Copyright (c) 2017-2021 Arm Limited.
virtual ValidRegion valid_region() const =0
Valid region of the tensor.
bool update_window_and_padding(Window &win, Ts &&... patterns)
Update window and padding size for each of the access patterns.
std::string float_to_string_with_full_precision(float val)
Create a string with the float in full precision.
Normalization applied within the same map in 1D region.
#define ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(...)
Manages all the GLES kernels compilation and caching, provides accessors for the GLES Context...
Class to describe a number of elements in each dimension.
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
Implementation of a row access pattern.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
float beta() const
Get the beta value.
void configure(const IGCTensor *input, const IGCTensor *squared_input, IGCTensor *output, NormalizationLayerInfo norm_info)
Set the input and output tensors.
bool slide_window_slice_3D(Window &slice) const
Slide the passed 3D window slice.
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
#define ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
static GCKernelLibrary & get()
Get the static instance of GCKernelLibrary.
BorderSize border_size() const override
The size of the border for that kernel.
GCKernel create_kernel(const std::string &shader_name, const StringSet &build_options_set={}) const
Creates a kernel from the kernel library.
unsigned int num_elems_processed_per_iteration
Window first_slice_window_3D() const
First 3D slice of the window.
Describe a multidimensional execution window.
Normalization applied within the same map in 2D region.
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
SimpleTensor< T > slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)