COMPMID-948: Add validation to CLL2NormalizeLayer

Change-Id: I452a718a60b81da51cd3e98641fd99c86c4debab
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/129451
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
diff --git a/arm_compute/core/CL/kernels/CLL2NormalizeLayerKernel.h b/arm_compute/core/CL/kernels/CLL2NormalizeLayerKernel.h
index f7d7171..dec4192 100644
--- a/arm_compute/core/CL/kernels/CLL2NormalizeLayerKernel.h
+++ b/arm_compute/core/CL/kernels/CLL2NormalizeLayerKernel.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -21,8 +21,8 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#ifndef __ARM_COMPUTE_CLL2NORMALIZEKERNEL_H__
-#define __ARM_COMPUTE_CLL2NORMALIZEKERNEL_H__
+#ifndef __ARM_COMPUTE_CLL2NORMALIZELAYERKERNEL_H__
+#define __ARM_COMPUTE_CLL2NORMALIZELAYERKERNEL_H__
 
 #include "arm_compute/core/CL/ICLKernel.h"
 #include "arm_compute/core/Types.h"
@@ -31,7 +31,7 @@
 {
 class ICLTensor;
 
-/** Interface for the reduction operation kernel */
+/** Interface for performing a L2 normalize on a given axis given the square sum of it in this axis */
 class CLL2NormalizeLayerKernel : public ICLKernel
 {
 public:
@@ -50,14 +50,30 @@
 
     /** Set the input and output tensors.
      *
-     * @param[in]  input   Source tensor. Data types supported: QS8, QS16, F32.
+     * @param[in]  input   Source tensor. Data types supported: F32. Data layouts supported: NCHW.
      * @param[in]  sum     Sum values tensor. Data types supported: same as @p input.
-     * @param[out] output  Destination tensor. Data types supported: Same as @p input.
+     *                     Sum will have the same number of dimensions as input.
+     * @param[out] output  Destination tensor. Data types and data layouts supported: Same as @p input.
+     *                     Output will have the same number of dimensions as input.
      * @param[in]  axis    Axis along which to reduce. Supported reduction axis : 0
      * @param[in]  epsilon Lower bound value for the normalization.
      */
     void configure(const ICLTensor *input, const ICLTensor *sum, ICLTensor *output, unsigned int axis, float epsilon);
 
+    /** Static function to check if given info will lead to a valid configuration of @ref CLL2NormalizeLayerKernel.
+     *
+     * @param[in] input   Source tensor info. Data types supported: F32. Data layouts supported: NCHW.
+     * @param[in] sum     Sum values tensor info. Data types supported: same as @p input.
+     *                    Sum will have the same number of dimensions as input.
+     * @param[in] output  Destination tensor info. Data types and data layouts supported: Same as @p input.
+     *                    Output will have the same number of dimensions as input.
+     * @param[in] axis    Axis along which to reduce. Supported reduction axis : 0
+     * @param[in] epsilon Lower bound value for the normalization.
+     *
+     * @return a status
+     */
+    static Status validate(const ITensorInfo *input, const ITensorInfo *sum, const ITensorInfo *output, unsigned int axis, float epsilon);
+
     // Inherited methods overridden:
     void run(const Window &window, cl::CommandQueue &queue) override;
 
@@ -69,4 +85,4 @@
     float            _epsilon;
 };
 } // namespace arm_compute
-#endif /*__ARM_COMPUTE_CLL2NORMALIZEKERNEL_H__ */
+#endif /*__ARM_COMPUTE_CLL2NORMALIZELAYERKERNEL_H__ */