aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLL2NormalizeLayerKernel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/CL/kernels/CLL2NormalizeLayerKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLL2NormalizeLayerKernel.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/core/CL/kernels/CLL2NormalizeLayerKernel.cpp b/src/core/CL/kernels/CLL2NormalizeLayerKernel.cpp
index 288e1e8e61..8816138e2e 100644
--- a/src/core/CL/kernels/CLL2NormalizeLayerKernel.cpp
+++ b/src/core/CL/kernels/CLL2NormalizeLayerKernel.cpp
@@ -37,15 +37,12 @@
namespace arm_compute
{
-CLL2NormalizeLayerKernel::CLL2NormalizeLayerKernel()
- : _input(nullptr), _sum(nullptr), _output(nullptr), _actual_axis(0), _epsilon(1e-12)
-{
-}
-
namespace
{
constexpr int max_input_tensor_dim = 3;
+constexpr unsigned int num_elems_processed_per_iteration = 16;
+
Status validate_arguments(const ITensorInfo *input, const ITensorInfo *sum, const ITensorInfo *output, int axis, float epsilon)
{
ARM_COMPUTE_UNUSED(epsilon);
@@ -76,8 +73,6 @@ Status validate_arguments(const ITensorInfo *input, const ITensorInfo *sum, cons
std::tuple<Status, Window> validate_and_configure_window(ITensorInfo *input, ITensorInfo *output)
{
- const unsigned int num_elems_processed_per_iteration = 16;
-
Window win = calculate_max_window(*input, Steps(num_elems_processed_per_iteration));
// Output tensor auto initialization if not yet initialized
@@ -95,6 +90,11 @@ std::tuple<Status, Window> validate_and_configure_window(ITensorInfo *input, ITe
}
} // namespace
+CLL2NormalizeLayerKernel::CLL2NormalizeLayerKernel()
+ : _input(nullptr), _sum(nullptr), _output(nullptr), _actual_axis(0), _epsilon(1e-12)
+{
+}
+
void CLL2NormalizeLayerKernel::configure(const ICLTensor *input, const ICLTensor *sum, ICLTensor *output, int axis, float epsilon)
{
ARM_COMPUTE_ERROR_ON_NULLPTR(input, sum, output);
@@ -106,8 +106,6 @@ void CLL2NormalizeLayerKernel::configure(const ICLTensor *input, const ICLTensor
_actual_axis = wrap_around(axis, max_input_tensor_dim);
_epsilon = epsilon;
- const unsigned int num_elems_processed_per_iteration = 16;
-
// Set build options
std::set<std::string> build_opts;
build_opts.emplace(("-DDATA_TYPE=" + get_cl_type_from_data_type(input->info()->data_type())));
@@ -221,4 +219,4 @@ void CLL2NormalizeLayerKernel::run(const Window &window, cl::CommandQueue &queue
ARM_COMPUTE_ERROR("Not supported");
}
}
-} // namespace arm_compute \ No newline at end of file
+} // namespace arm_compute