Make CpuFloorKernel kernel stateless

- Rename NEFloorKernel to CpuFloorKernel to accomodate new ISA
implementations
- Remove state and instead pass tensors to operate during run
- Add member function to generate an execution window given an input and
output tensor description

Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: I9240b8ec534589c0f15c354f771f1ac5d7010c3b
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4773
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
diff --git a/Android.bp b/Android.bp
index 040ff44..18d16c0 100644
--- a/Android.bp
+++ b/Android.bp
@@ -268,7 +268,6 @@
         "src/core/NEON/kernels/NEFastCornersKernel.cpp",
         "src/core/NEON/kernels/NEFillArrayKernel.cpp",
         "src/core/NEON/kernels/NEFillBorderKernel.cpp",
-        "src/core/NEON/kernels/NEFloorKernel.cpp",
         "src/core/NEON/kernels/NEFuseBatchNormalizationKernel.cpp",
         "src/core/NEON/kernels/NEGEMMInterleave4x4Kernel.cpp",
         "src/core/NEON/kernels/NEGEMMLowpMatrixMultiplyKernel.cpp",
@@ -417,8 +416,6 @@
         "src/core/NEON/kernels/convolution/winograd/winograd_transforms/weights_4x4_3x3_fp16_fp16_integers.cpp",
         "src/core/NEON/kernels/convolution/winograd/winograd_transforms/weights_4x4_3x3_fp32_fp32_integers.cpp",
         "src/core/NEON/kernels/convolution/winograd/winograd_transforms/weights_6_3_fp32_fp32_integers.cpp",
-        "src/core/NEON/kernels/floor/impl/NEON/fp16.cpp",
-        "src/core/NEON/kernels/floor/impl/NEON/fp32.cpp",
         "src/core/PyramidInfo.cpp",
         "src/core/Rounding.cpp",
         "src/core/Size2D.cpp",
@@ -427,6 +424,9 @@
         "src/core/Utils.cpp",
         "src/core/Validate.cpp",
         "src/core/Version.cpp",
+        "src/core/cpu/kernels/floor/CpuFloorKernel.cpp",
+        "src/core/cpu/kernels/floor/impl/NEON/fp16.cpp",
+        "src/core/cpu/kernels/floor/impl/NEON/fp32.cpp",
         "src/core/helpers/SoftmaxHelpers.cpp",
         "src/core/helpers/WindowHelpers.cpp",
         "src/core/utils/ScaleUtils.cpp",
@@ -763,6 +763,7 @@
         "src/runtime/Tensor.cpp",
         "src/runtime/TensorAllocator.cpp",
         "src/runtime/Utils.cpp",
+        "src/runtime/cpu/operators/CpuFloor.cpp",
         "utils/CommonGraphOptions.cpp",
         "utils/GraphUtils.cpp",
         "utils/Utils.cpp",
diff --git a/SConscript b/SConscript
index 724208c..2388965 100644
--- a/SConscript
+++ b/SConscript
@@ -263,6 +263,23 @@
     runtime_files += Glob('src/runtime/NEON/functions/*.cpp')
     runtime_files += Glob('src/runtime/NEON/functions/assembly/*.cpp')
 
+    core_files += Glob('src/core/cpu/*.cpp')
+    core_files += Glob('src/core/cpu/kernels/*.cpp')
+    core_files += Glob('src/core/cpu/kernels/*/*.cpp')
+    if any(i in env['data_type_support'] for i in ['all', 'fp16']):
+        core_files += Glob('src/core/cpu/kernels/*/impl/*/fp16.cpp')
+    if any(i in env['data_type_support'] for i in ['all', 'fp32']):
+        core_files += Glob('src/core/cpu/kernels/*/impl/*/fp32.cpp')
+    if any(i in env['data_type_support'] for i in ['all', 'qasymm8']):
+        core_files += Glob('src/core/cpu/kernels/*/impl/*/qasymm8.cpp')
+    if any(i in env['data_type_support'] for i in ['all', 'qasymm8_signed']):
+        core_files += Glob('src/core/cpu/kernels/*/impl/*/qasymm8_signed.cpp')
+    if any(i in env['data_type_support'] for i in ['all', 'qsymm16']):
+        core_files += Glob('src/core/cpu/kernels/*/impl/*/qsymm16.cpp')
+
+    runtime_files += Glob('src/runtime/cpu/*.cpp')
+    runtime_files += Glob('src/runtime/cpu/operators/*.cpp')
+
 if env['gles_compute']:
     if env['os'] != 'android':
         arm_compute_env.Append(CPPPATH = ["#opengles-3.1/include", "#opengles-3.1/mali_include"])
diff --git a/arm_compute/runtime/NEON/functions/NEFloor.h b/arm_compute/runtime/NEON/functions/NEFloor.h
index 7f4248e..9299350 100644
--- a/arm_compute/runtime/NEON/functions/NEFloor.h
+++ b/arm_compute/runtime/NEON/functions/NEFloor.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2020 Arm Limited.
+ * Copyright (c) 2017-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -24,19 +24,33 @@
 #ifndef ARM_COMPUTE_NEFLOOR_H
 #define ARM_COMPUTE_NEFLOOR_H
 
-#include "arm_compute/runtime/NEON/INESimpleFunctionNoBorder.h"
+#include "arm_compute/runtime/IFunction.h"
 
 #include "arm_compute/core/Types.h"
 
+#include <memory>
+
 namespace arm_compute
 {
 class ITensor;
 class ITensorInfo;
 
 /** Basic function to run @ref NEFloorKernel */
-class NEFloor : public INESimpleFunctionNoBorder
+class NEFloor : public IFunction
 {
 public:
+    /** Constructor */
+    NEFloor();
+    /** Prevent instances of this class from being copied (As this class contains pointers) */
+    NEFloor(const NEFloor &) = delete;
+    /** Default move constructor */
+    NEFloor(NEFloor &&);
+    /** Prevent instances of this class from being copied (As this class contains pointers) */
+    NEFloor &operator=(const NEFloor &) = delete;
+    /** Default move assignment operator */
+    NEFloor &operator=(NEFloor &&);
+    /** Destructor */
+    ~NEFloor();
     /** Set the source, destination of the kernel
      *
      * @param[in]  input  Source tensor. Data type supported: F16/F32.
@@ -51,6 +65,13 @@
      * @return a status
      */
     static Status validate(const ITensorInfo *input, const ITensorInfo *output);
+
+    // Inherited methods overridden
+    void run() override;
+
+private:
+    struct Impl;
+    std::unique_ptr<Impl> _impl;
 };
 } // namespace arm_compute
 #endif /* ARM_COMPUTE_NEFLOOR_H */
diff --git a/docs/00_introduction.dox b/docs/00_introduction.dox
index 5210b32..6edda04 100644
--- a/docs/00_introduction.dox
+++ b/docs/00_introduction.dox
@@ -442,7 +442,7 @@
    - @ref NEROIAlignLayerKernel
    - NEYOLOLayerKernel
    - NEUpsampleLayerKernel
-   - @ref NEFloorKernel
+   - NEFloorKernel
    - @ref NEWidthConcatenateLayerKernel
    - @ref NEDepthConcatenateLayerKernel
    - @ref NENormalizationLayerKernel
@@ -1177,7 +1177,7 @@
  - New NEON kernels / functions:
     - arm_compute::NEGEMMAssemblyBaseKernel arm_compute::NEGEMMAArch64Kernel
     - @ref NEDequantizationLayerKernel / @ref NEDequantizationLayer
-    - @ref NEFloorKernel / @ref NEFloor
+    - NEFloorKernel / @ref NEFloor
     - @ref NEL2NormalizeLayerKernel / @ref NEL2NormalizeLayer
     - @ref NEQuantizationLayerKernel @ref NEMinMaxLayerKernel / @ref NEQuantizationLayer
     - @ref NEROIPoolingLayerKernel / @ref NEROIPoolingLayer
diff --git a/src/core/NEON/NEKernels.h b/src/core/NEON/NEKernels.h
index d6cd696..1e0b1f0 100644
--- a/src/core/NEON/NEKernels.h
+++ b/src/core/NEON/NEKernels.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2020 Arm Limited.
+ * Copyright (c) 2016-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -69,7 +69,6 @@
 #include "src/core/NEON/kernels/NEFastCornersKernel.h"
 #include "src/core/NEON/kernels/NEFillArrayKernel.h"
 #include "src/core/NEON/kernels/NEFillBorderKernel.h"
-#include "src/core/NEON/kernels/NEFloorKernel.h"
 #include "src/core/NEON/kernels/NEFuseBatchNormalizationKernel.h"
 #include "src/core/NEON/kernels/NEGEMMInterleave4x4Kernel.h"
 #include "src/core/NEON/kernels/NEGEMMLowpMatrixMultiplyKernel.h"
diff --git a/src/core/NEON/SVEMath.h b/src/core/NEON/SVEMath.h
index 2b30e20..075cb45 100644
--- a/src/core/NEON/SVEMath.h
+++ b/src/core/NEON/SVEMath.h
@@ -28,7 +28,6 @@
 #include "src/core/NEON/wrapper/intrinsics/svcvt.h"
 #include "src/core/NEON/wrapper/intrinsics/svdup_n.h"
 #include "src/core/NEON/wrapper/intrinsics/svreinterpret.h"
-#include "src/core/common/StdTypes.h"
 #include <arm_sve.h>
 #include <array>
 
diff --git a/src/core/NEON/kernels/NEArithmeticAdditionKernel.cpp b/src/core/NEON/kernels/NEArithmeticAdditionKernel.cpp
index f706ee5..4b53d26 100644
--- a/src/core/NEON/kernels/NEArithmeticAdditionKernel.cpp
+++ b/src/core/NEON/kernels/NEArithmeticAdditionKernel.cpp
@@ -32,7 +32,6 @@
 #include "src/core/NEON/kernels/arithmetic_addition/impl/SVE/list.h"
 #include "src/core/NEON/wrapper/wrapper.h"
 #include "src/core/common/Registrars.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/helpers/AutoConfiguration.h"
 #include "src/core/helpers/WindowHelpers.h"
 
diff --git a/src/core/NEON/kernels/NEElementwiseUnaryKernel.cpp b/src/core/NEON/kernels/NEElementwiseUnaryKernel.cpp
index ed1cb6f..fdd2aab 100644
--- a/src/core/NEON/kernels/NEElementwiseUnaryKernel.cpp
+++ b/src/core/NEON/kernels/NEElementwiseUnaryKernel.cpp
@@ -31,7 +31,6 @@
 #include "src/core/NEON/kernels/elementwise/impl/elementwise_unary_list.h"
 #include "src/core/SVE/kernels/elementwise/impl/elementwise_unary_list.h"
 #include "src/core/common/Registrars.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/helpers/AutoConfiguration.h"
 #include "src/core/helpers/WindowHelpers.h"
 #include "support/ToolchainSupport.h"
@@ -55,35 +54,35 @@
     {
         "fp32_sve_elementwise_unary",
         [](DataType dt) { return dt == DataType::F32; },
-        REGISTER_FP32_SVE(arm_compute::cpu::elementwise_sve_op<f32>),
+        REGISTER_FP32_SVE(arm_compute::cpu::elementwise_sve_op<float>),
     },
     {
         "fp16_sve_elementwise_unary",
         [](DataType dt) { return dt == DataType::F16; },
-        REGISTER_FP16_SVE(arm_compute::cpu::elementwise_sve_op<f16>),
+        REGISTER_FP16_SVE(arm_compute::cpu::elementwise_sve_op<__fp16>),
     },
     {
         "s32_sve_elementwise_unary",
         [](DataType dt) { return dt == DataType::S32; },
-        REGISTER_INTEGER_SVE(arm_compute::cpu::elementwise_sve_op<s32>),
+        REGISTER_INTEGER_SVE(arm_compute::cpu::elementwise_sve_op<int32_t>),
     },
 #endif // defined(__ARM_FEATURE_SVE)
     {
         "fp32_neon_elementwise_unary",
         [](DataType dt) { return dt == DataType::F32; },
-        REGISTER_FP32_NEON(arm_compute::cpu::elementwise_op<f32>),
+        REGISTER_FP32_NEON(arm_compute::cpu::elementwise_op<float>),
     },
 #if defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)
     {
         "fp16_neon_elementwise_unary",
         [](DataType dt) { return dt == DataType::F16; },
-        REGISTER_FP32_NEON(arm_compute::cpu::elementwise_op<f16>),
+        REGISTER_FP32_NEON(arm_compute::cpu::elementwise_op<__fp16>),
     },
 #endif // defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)
     {
         "s32_neon_elementwise_unary",
         [](DataType dt) { return dt == DataType::S32; },
-        REGISTER_INTEGER_NEON(arm_compute::cpu::elementwise_op<s32>),
+        REGISTER_INTEGER_NEON(arm_compute::cpu::elementwise_op<int32_t>),
     },
 };
 
diff --git a/src/core/NEON/kernels/NEFloorKernel.cpp b/src/core/NEON/kernels/NEFloorKernel.cpp
deleted file mode 100644
index 2750acd..0000000
--- a/src/core/NEON/kernels/NEFloorKernel.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "src/core/NEON/kernels/NEFloorKernel.h"
-
-#include "arm_compute/core/Coordinates.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/ITensor.h"
-#include "arm_compute/core/Validate.h"
-#include "src/core/CPP/Validate.h"
-#include "src/core/NEON/INEKernel.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-
-#include "src/core/NEON/kernels/floor/impl/list.h"
-#include "src/core/common/Registrars.h"
-
-namespace arm_compute
-{
-namespace
-{
-struct FloorSelectorData
-{
-    DataType dt;
-};
-using FloorSelectorPtr = std::add_pointer<bool(const FloorSelectorData &data)>::type;
-using FloorUKernelPtr  = std::add_pointer<void(const void *, void *, int)>::type;
-
-struct FloorKernel
-{
-    const char            *name;
-    const FloorSelectorPtr is_selected;
-    FloorUKernelPtr        ukernel;
-};
-
-static const FloorKernel available_kernels[] =
-{
-    {
-        "fp16_neon_floor",
-        [](const FloorSelectorData & data) { return data.dt == DataType::F16; },
-        REGISTER_FP16_NEON(arm_compute::cpu::fp16_neon_floor)
-    },
-    {
-        "f32_neon_floor",
-        [](const FloorSelectorData & data) { return data.dt == DataType::F32; },
-        REGISTER_FP32_NEON(arm_compute::cpu::fp32_neon_floor)
-    },
-};
-
-const FloorKernel *get_implementation(const FloorSelectorData &data)
-{
-    for(const auto &uk : available_kernels)
-    {
-        if(uk.is_selected(data))
-        {
-            return &uk;
-        }
-    }
-    return nullptr;
-}
-
-Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output)
-{
-    ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, output);
-
-    const auto *uk = get_implementation(FloorSelectorData{ input->data_type() });
-    ARM_COMPUTE_RETURN_ERROR_ON(uk == nullptr || uk->ukernel == nullptr);
-
-    // Validate in case of configured output
-    if(output->total_size() > 0)
-    {
-        ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
-        ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(input, output);
-    }
-
-    return Status{};
-}
-} // namespace
-
-void NEFloorKernel::configure(const ITensor *input, ITensor *output)
-{
-    ARM_COMPUTE_ERROR_ON_NULLPTR(input, output);
-
-    // Auto initialize output
-    auto_init_if_empty(*output->info(), input->info()->tensor_shape(), 1, input->info()->data_type());
-
-    // Validate
-    ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(input->info(), output->info()));
-
-    _input  = input;
-    _output = output;
-
-    // Configure kernel window
-    Window win = calculate_max_window(*input->info(), Steps());
-
-    Coordinates coord;
-    coord.set_num_dimensions(output->info()->num_dimensions());
-    output->info()->set_valid_region(ValidRegion(coord, output->info()->tensor_shape()));
-
-    INEKernel::configure(win);
-}
-
-Status NEFloorKernel::validate(const ITensorInfo *input, const ITensorInfo *output)
-{
-    ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input, output));
-    return Status{};
-}
-
-void NEFloorKernel::run(const Window &window, const ThreadInfo &info)
-{
-    ARM_COMPUTE_UNUSED(info);
-    ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
-    ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(INEKernel::window(), window);
-
-    Window win{ window };
-    win.set(Window::DimX, Window::Dimension(0, 1, 1));
-
-    const auto  len = static_cast<int>(window.x().end()) - static_cast<int>(window.x().start());
-    const auto *uk  = get_implementation(FloorSelectorData{ _input->info()->data_type() });
-
-    Iterator input(_input, win);
-    Iterator output(_output, win);
-
-    execute_window_loop(win, [&](const Coordinates &)
-    {
-        uk->ukernel(input.ptr(), output.ptr(), len);
-    },
-    input, output);
-}
-} // namespace arm_compute
diff --git a/src/core/NEON/kernels/NEFloorKernel.h b/src/core/NEON/kernels/NEFloorKernel.h
deleted file mode 100644
index 99c016b..0000000
--- a/src/core/NEON/kernels/NEFloorKernel.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_NEFLOORKERNEL_H
-#define ARM_COMPUTE_NEFLOORKERNEL_H
-
-#include "src/core/NEON/INESimpleKernel.h"
-
-namespace arm_compute
-{
-class ITensor;
-
-/** NEON kernel to perform a floor operation */
-class NEFloorKernel : public INESimpleKernel
-{
-public:
-    const char *name() const override
-    {
-        return "NEFloorKernel";
-    }
-    /** Constructor */
-    NEFloorKernel() = default;
-    /** Prevent instances of this class from being copied (As this class contains pointers) */
-    NEFloorKernel(const NEFloorKernel &) = delete;
-    /** Prevent instances of this class from being copied (As this class contains pointers) */
-    NEFloorKernel &operator=(const NEFloorKernel &) = delete;
-    /** Allow instances of this class to be moved */
-    NEFloorKernel(NEFloorKernel &&) = default;
-    /** Allow instances of this class to be moved */
-    NEFloorKernel &operator=(NEFloorKernel &&) = default;
-    /** Default destructor */
-    ~NEFloorKernel() = default;
-    /** Set the source, destination of the kernel
-     *
-     * @param[in]  input  Source tensor. Data type supported: F16/F32.
-     * @param[out] output Destination tensor. Same as @p input
-     */
-    void configure(const ITensor *input, ITensor *output);
-    /** Static function to check if given info will lead to a valid configuration of @ref NEFloorKernel
-     *
-     * @param[in] input  Source tensor info. Data type supported: F16/F32.
-     * @param[in] output Destination tensor info. Same as @p input
-     *
-     * @return a status
-     */
-    static Status validate(const ITensorInfo *input, const ITensorInfo *output);
-
-    // Inherited methods overridden:
-    void run(const Window &window, const ThreadInfo &info) override;
-};
-} // namespace arm_compute
-#endif /*ARM_COMPUTE_NEFLOORKERNEL_H */
diff --git a/src/core/NEON/kernels/activation/impl/NEON/fp16.cpp b/src/core/NEON/kernels/activation/impl/NEON/fp16.cpp
index 58e1cfc..27ae283 100644
--- a/src/core/NEON/kernels/activation/impl/NEON/fp16.cpp
+++ b/src/core/NEON/kernels/activation/impl/NEON/fp16.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -26,7 +26,6 @@
 #include "arm_compute/core/Helpers.h"
 #include "arm_compute/core/Validate.h"
 #include "src/core/NEON/wrapper/wrapper.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <arm_neon.h>
diff --git a/src/core/NEON/kernels/activation/impl/NEON/fp32.cpp b/src/core/NEON/kernels/activation/impl/NEON/fp32.cpp
index 610db05..0687646 100644
--- a/src/core/NEON/kernels/activation/impl/NEON/fp32.cpp
+++ b/src/core/NEON/kernels/activation/impl/NEON/fp32.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -26,7 +26,6 @@
 #include "arm_compute/core/Window.h"
 #include "src/core/NEON/NEMath.h"
 #include "src/core/NEON/wrapper/wrapper.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <arm_neon.h>
diff --git a/src/core/NEON/kernels/activation/impl/NEON/qasymm8.cpp b/src/core/NEON/kernels/activation/impl/NEON/qasymm8.cpp
index 7b26441..7506a82 100644
--- a/src/core/NEON/kernels/activation/impl/NEON/qasymm8.cpp
+++ b/src/core/NEON/kernels/activation/impl/NEON/qasymm8.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -27,7 +27,6 @@
 #include "src/core/NEON/NEAsymm.h"
 #include "src/core/NEON/NEMath.h"
 #include "src/core/NEON/wrapper/wrapper.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <arm_neon.h>
diff --git a/src/core/NEON/kernels/activation/impl/NEON/qasymm8_signed.cpp b/src/core/NEON/kernels/activation/impl/NEON/qasymm8_signed.cpp
index c616c5e..8f75abe 100644
--- a/src/core/NEON/kernels/activation/impl/NEON/qasymm8_signed.cpp
+++ b/src/core/NEON/kernels/activation/impl/NEON/qasymm8_signed.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -26,7 +26,6 @@
 #include "src/core/NEON/NEAsymm.h"
 #include "src/core/NEON/NEMath.h"
 #include "src/core/NEON/wrapper/wrapper.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <arm_neon.h>
diff --git a/src/core/NEON/kernels/activation/impl/NEON/qsymm16.cpp b/src/core/NEON/kernels/activation/impl/NEON/qsymm16.cpp
index 0bef807..9eee360 100644
--- a/src/core/NEON/kernels/activation/impl/NEON/qsymm16.cpp
+++ b/src/core/NEON/kernels/activation/impl/NEON/qsymm16.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -28,7 +28,6 @@
 #include "src/core/NEON/NEMath.h"
 #include "src/core/NEON/NESymm.h"
 #include "src/core/NEON/wrapper/wrapper.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <arm_neon.h>
diff --git a/src/core/NEON/kernels/activation/impl/SVE/fp16.cpp b/src/core/NEON/kernels/activation/impl/SVE/fp16.cpp
index 8d6f4f2..8208813 100644
--- a/src/core/NEON/kernels/activation/impl/SVE/fp16.cpp
+++ b/src/core/NEON/kernels/activation/impl/SVE/fp16.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -24,7 +24,6 @@
 #include "arm_compute/core/Helpers.h"
 #include "arm_compute/core/ITensorPack.h"
 #include "arm_compute/core/Window.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <cmath>
diff --git a/src/core/NEON/kernels/activation/impl/SVE/fp32.cpp b/src/core/NEON/kernels/activation/impl/SVE/fp32.cpp
index 2c27602..55bdc99 100644
--- a/src/core/NEON/kernels/activation/impl/SVE/fp32.cpp
+++ b/src/core/NEON/kernels/activation/impl/SVE/fp32.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -25,7 +25,6 @@
 #include "arm_compute/core/ITensorPack.h"
 #include "arm_compute/core/Window.h"
 #include "src/core/NEON/SVEMath.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <cmath>
diff --git a/src/core/NEON/kernels/activation/impl/SVE/qasymm8.cpp b/src/core/NEON/kernels/activation/impl/SVE/qasymm8.cpp
index 55133f0..3e29a68 100644
--- a/src/core/NEON/kernels/activation/impl/SVE/qasymm8.cpp
+++ b/src/core/NEON/kernels/activation/impl/SVE/qasymm8.cpp
@@ -24,7 +24,6 @@
 
 #include "arm_compute/core/Helpers.h"
 #include "arm_compute/core/Window.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <arm_neon.h>
diff --git a/src/core/NEON/kernels/activation/impl/SVE/qasymm8_signed.cpp b/src/core/NEON/kernels/activation/impl/SVE/qasymm8_signed.cpp
index 5b010d9..f21d065 100644
--- a/src/core/NEON/kernels/activation/impl/SVE/qasymm8_signed.cpp
+++ b/src/core/NEON/kernels/activation/impl/SVE/qasymm8_signed.cpp
@@ -24,7 +24,6 @@
 #include "arm_compute/core/Helpers.h"
 #include "arm_compute/core/Window.h"
 #include "src/core/NEON/wrapper/wrapper.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <cmath>
diff --git a/src/core/NEON/kernels/activation/impl/SVE/qsymm16.cpp b/src/core/NEON/kernels/activation/impl/SVE/qsymm16.cpp
index 1432e3b..dbaf267 100644
--- a/src/core/NEON/kernels/activation/impl/SVE/qsymm16.cpp
+++ b/src/core/NEON/kernels/activation/impl/SVE/qsymm16.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -25,7 +25,6 @@
 #include "arm_compute/core/ITensorPack.h"
 #include "arm_compute/core/Window.h"
 #include "arm_compute/core/experimental/Types.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <cmath>
diff --git a/src/core/NEON/kernels/arithmetic_addition/impl/NEON/integer.cpp b/src/core/NEON/kernels/arithmetic_addition/impl/NEON/integer.cpp
index 8dd58ce..0aededf 100644
--- a/src/core/NEON/kernels/arithmetic_addition/impl/NEON/integer.cpp
+++ b/src/core/NEON/kernels/arithmetic_addition/impl/NEON/integer.cpp
@@ -26,7 +26,6 @@
 #include "arm_compute/core/Types.h"
 #include "arm_compute/core/utils/misc/Traits.h"
 #include "src/core/NEON/wrapper/wrapper.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/helpers/WindowHelpers.h"
 
 namespace arm_compute
diff --git a/src/core/NEON/kernels/arithmetic_addition/impl/NEON/qasymm8.cpp b/src/core/NEON/kernels/arithmetic_addition/impl/NEON/qasymm8.cpp
index b93dad2..0b3a851 100644
--- a/src/core/NEON/kernels/arithmetic_addition/impl/NEON/qasymm8.cpp
+++ b/src/core/NEON/kernels/arithmetic_addition/impl/NEON/qasymm8.cpp
@@ -26,7 +26,6 @@
 #include "arm_compute/core/Types.h"
 #include "arm_compute/core/utils/misc/Traits.h"
 #include "src/core/NEON/wrapper/intrinsics/intrinsics.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/helpers/WindowHelpers.h"
 
 namespace arm_compute
diff --git a/src/core/NEON/kernels/arithmetic_addition/impl/NEON/qasymm8_signed.cpp b/src/core/NEON/kernels/arithmetic_addition/impl/NEON/qasymm8_signed.cpp
index ba81cfc..18f5aab 100644
--- a/src/core/NEON/kernels/arithmetic_addition/impl/NEON/qasymm8_signed.cpp
+++ b/src/core/NEON/kernels/arithmetic_addition/impl/NEON/qasymm8_signed.cpp
@@ -26,7 +26,6 @@
 #include "arm_compute/core/Types.h"
 #include "arm_compute/core/utils/misc/Traits.h"
 #include "src/core/NEON/wrapper/intrinsics/intrinsics.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/helpers/WindowHelpers.h"
 
 namespace arm_compute
diff --git a/src/core/NEON/kernels/arithmetic_addition/impl/NEON/qsymm16.cpp b/src/core/NEON/kernels/arithmetic_addition/impl/NEON/qsymm16.cpp
index 538c600..650f25e 100644
--- a/src/core/NEON/kernels/arithmetic_addition/impl/NEON/qsymm16.cpp
+++ b/src/core/NEON/kernels/arithmetic_addition/impl/NEON/qsymm16.cpp
@@ -26,7 +26,6 @@
 #include "arm_compute/core/Types.h"
 #include "arm_compute/core/utils/misc/Traits.h"
 #include "src/core/NEON/wrapper/intrinsics/intrinsics.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/helpers/WindowHelpers.h"
 
 namespace arm_compute
diff --git a/src/core/NEON/kernels/batchnormalization/impl/NEON/fp16.cpp b/src/core/NEON/kernels/batchnormalization/impl/NEON/fp16.cpp
index fd17b98..704f003 100644
--- a/src/core/NEON/kernels/batchnormalization/impl/NEON/fp16.cpp
+++ b/src/core/NEON/kernels/batchnormalization/impl/NEON/fp16.cpp
@@ -27,7 +27,6 @@
 #include "src/core/NEON/NEMath.h"
 #include "src/core/NEON/kernels/detail/NEActivationFunctionDetail.h"
 #include "src/core/NEON/wrapper/wrapper.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <arm_neon.h>
diff --git a/src/core/NEON/kernels/batchnormalization/impl/NEON/fp32.cpp b/src/core/NEON/kernels/batchnormalization/impl/NEON/fp32.cpp
index 5b375e5..76a71ed 100644
--- a/src/core/NEON/kernels/batchnormalization/impl/NEON/fp32.cpp
+++ b/src/core/NEON/kernels/batchnormalization/impl/NEON/fp32.cpp
@@ -27,7 +27,6 @@
 #include "src/core/NEON/NEMath.h"
 #include "src/core/NEON/kernels/detail/NEActivationFunctionDetail.h"
 #include "src/core/NEON/wrapper/wrapper.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <arm_neon.h>
diff --git a/src/core/NEON/kernels/batchnormalization/impl/SVE/fp16.cpp b/src/core/NEON/kernels/batchnormalization/impl/SVE/fp16.cpp
index 00326ff..5638dce 100644
--- a/src/core/NEON/kernels/batchnormalization/impl/SVE/fp16.cpp
+++ b/src/core/NEON/kernels/batchnormalization/impl/SVE/fp16.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -25,7 +25,6 @@
 #include "arm_compute/core/ITensorPack.h"
 #include "arm_compute/core/Window.h"
 #include "src/core/NEON/SVEMath.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <cmath>
diff --git a/src/core/NEON/kernels/batchnormalization/impl/SVE/fp32.cpp b/src/core/NEON/kernels/batchnormalization/impl/SVE/fp32.cpp
index 317befd..51397ac 100644
--- a/src/core/NEON/kernels/batchnormalization/impl/SVE/fp32.cpp
+++ b/src/core/NEON/kernels/batchnormalization/impl/SVE/fp32.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -25,7 +25,6 @@
 #include "arm_compute/core/ITensorPack.h"
 #include "arm_compute/core/Window.h"
 #include "src/core/NEON/SVEMath.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <cmath>
diff --git a/src/core/NEON/kernels/floor/impl/list.h b/src/core/common/Macros.h
similarity index 70%
copy from src/core/NEON/kernels/floor/impl/list.h
copy to src/core/common/Macros.h
index 0eb66e0..d791154 100644
--- a/src/core/NEON/kernels/floor/impl/list.h
+++ b/src/core/common/Macros.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -21,21 +21,13 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#ifndef SRC_CORE_NEON_KERNELS_FLOOR_LIST_H
-#define SRC_CORE_NEON_KERNELS_FLOOR_LIST_H
+#ifndef ARM_COMPUTE_COMMON_MACROS_H
+#define ARM_COMPUTE_COMMON_MACROS_H
 
-namespace arm_compute
-{
-namespace cpu
-{
-#define DECLARE_FLOOR_KERNEL(func_name) \
-    void func_name(const void *src, void *dst, int len)
+#define ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE(TypeName) \
+    TypeName(const TypeName &) = delete;               \
+    TypeName &operator=(const TypeName &) = delete;    \
+    TypeName(TypeName &&)                 = default;   \
+    TypeName &operator=(TypeName &&) = default
 
-DECLARE_FLOOR_KERNEL(fp16_neon_floor);
-DECLARE_FLOOR_KERNEL(fp32_neon_floor);
-
-#undef DECLARE_FLOOR_KERNEL
-} // namespace cpu
-} // namespace arm_compute
-
-#endif /* SRC_CORE_NEON_KERNELS_FLOOR_LIST_H */
+#endif /* ARM_COMPUTE_COMMON_MACROS_H */
diff --git a/src/core/common/StdTypes.h b/src/core/common/StdTypes.h
deleted file mode 100644
index 3fba618..0000000
--- a/src/core/common/StdTypes.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef SRC_CORE_COMMON_STDTYPES_H
-#define SRC_CORE_COMMON_STDTYPES_H
-
-#include <cstdint>
-
-namespace arm_compute
-{
-using u8  = uint8_t;
-using s8  = int8_t;
-using u16 = uint16_t;
-using s16 = int16_t;
-using u32 = uint32_t;
-using s32 = int32_t;
-using f32 = float;
-#if defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)
-using f16 = __fp16;
-#endif /* defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) */
-} // namespace arm_compute
-
-#endif /* SRC_CORE_COMMON_STDTYPES_H */
diff --git a/src/core/NEON/kernels/floor/impl/list.h b/src/core/cpu/ICpuKernel.h
similarity index 75%
copy from src/core/NEON/kernels/floor/impl/list.h
copy to src/core/cpu/ICpuKernel.h
index 0eb66e0..650b3a7 100644
--- a/src/core/NEON/kernels/floor/impl/list.h
+++ b/src/core/cpu/ICpuKernel.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -21,21 +21,16 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#ifndef SRC_CORE_NEON_KERNELS_FLOOR_LIST_H
-#define SRC_CORE_NEON_KERNELS_FLOOR_LIST_H
+#ifndef ARM_COMPUTE_ICPUKERNEL_H
+#define ARM_COMPUTE_ICPUKERNEL_H
+
+#include "arm_compute/core/CPP/ICPPKernel.h"
 
 namespace arm_compute
 {
 namespace cpu
 {
-#define DECLARE_FLOOR_KERNEL(func_name) \
-    void func_name(const void *src, void *dst, int len)
-
-DECLARE_FLOOR_KERNEL(fp16_neon_floor);
-DECLARE_FLOOR_KERNEL(fp32_neon_floor);
-
-#undef DECLARE_FLOOR_KERNEL
+using ICpuKernel = arm_compute::ICPPKernel;
 } // namespace cpu
 } // namespace arm_compute
-
-#endif /* SRC_CORE_NEON_KERNELS_FLOOR_LIST_H */
+#endif /* ARM_COMPUTE_ICPUKERNEL_H */
diff --git a/src/core/cpu/kernels/CpuFloorKernel.h b/src/core/cpu/kernels/CpuFloorKernel.h
new file mode 100644
index 0000000..dc3a9d5
--- /dev/null
+++ b/src/core/cpu/kernels/CpuFloorKernel.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2017-2021 Arm Limited.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+#ifndef ARM_COMPUTE_CPU_FLOOR_KERNEL_H
+#define ARM_COMPUTE_CPU_FLOOR_KERNEL_H
+
+#include "src/core/common/Macros.h"
+#include "src/core/cpu/ICpuKernel.h"
+
+namespace arm_compute
+{
+namespace cpu
+{
+namespace kernels
+{
+/** Cpu accelarated kernel to perform a floor operation */
+class CpuFloorKernel : public ICpuKernel
+{
+public:
+    CpuFloorKernel() = default;
+    ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE(CpuFloorKernel);
+    /** Set the source, destination of the kernel
+     *
+     * @param[in]  src Source tensor. Data type supported: F16/F32.
+     * @param[out] dst Destination tensor. Same as @p src
+     */
+    void configure(const ITensorInfo *src, ITensorInfo *dst);
+    /** Static function to check if given info will lead to a valid configuration of @ref CpuFloorKernel
+     *
+     * @param[in] src Source tensor info. Data type supported: F16/F32.
+     * @param[in] dst Destination tensor info. Same as @p src
+     *
+     * @return a status
+     */
+    static Status validate(const ITensorInfo *src, const ITensorInfo *dst);
+    /** Infer execution window
+     *
+     * @param[in] src Source tensor info. Data type supported: F16/F32.
+     * @param[in] dst Destination tensor info. Same as @p src
+     *
+     * @return an execution Window
+     */
+    Window infer_window(const ITensorInfo *src, const ITensorInfo *dst);
+
+    // Inherited methods overridden:
+    void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) final;
+    const char *name() const final;
+};
+} // namespace kernels
+} // namespace cpu
+} // namespace arm_compute
+#endif /* ARM_COMPUTE_CPU_FLOOR_KERNEL_H */
diff --git a/src/core/cpu/kernels/floor/CpuFloorKernel.cpp b/src/core/cpu/kernels/floor/CpuFloorKernel.cpp
new file mode 100644
index 0000000..738f04d
--- /dev/null
+++ b/src/core/cpu/kernels/floor/CpuFloorKernel.cpp
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2017-2021 Arm Limited.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+#include "src/core/cpu/kernels/CpuFloorKernel.h"
+
+#include "arm_compute/core/Coordinates.h"
+#include "arm_compute/core/Helpers.h"
+#include "arm_compute/core/ITensor.h"
+#include "arm_compute/core/Validate.h"
+#include "src/core/CPP/Validate.h"
+#include "src/core/helpers/AutoConfiguration.h"
+#include "src/core/helpers/WindowHelpers.h"
+
+#include "src/core/common/Registrars.h"
+#include "src/core/cpu/kernels/floor/impl/list.h"
+
+namespace arm_compute
+{
+namespace cpu
+{
+namespace kernels
+{
+namespace
+{
+struct FloorSelectorData
+{
+    DataType dt;
+};
+
+using FloorSelectorPtr = std::add_pointer<bool(const FloorSelectorData &data)>::type;
+using FloorUKernelPtr  = std::add_pointer<void(const void *, void *, int)>::type;
+
+struct FloorUKernel
+{
+    const char            *name;
+    const FloorSelectorPtr is_selected;
+    FloorUKernelPtr        func;
+};
+
+static const FloorUKernel available_kernels[] =
+{
+    {
+        "fp16_neon_floor",
+        [](const FloorSelectorData & data) { return data.dt == DataType::F16; },
+        REGISTER_FP16_NEON(arm_compute::cpu::fp16_neon_floor)
+    },
+    {
+        "f32_neon_floor",
+        [](const FloorSelectorData & data) { return data.dt == DataType::F32; },
+        REGISTER_FP32_NEON(arm_compute::cpu::fp32_neon_floor)
+    },
+};
+
+/** Micro-kernel selector
+ *
+ * @param[in] data Selection data passed to help pick the appropriate micro-kernel
+ *
+ * @return A matching micro-kernel else nullptr
+ */
+const FloorUKernel *get_implementation(const FloorSelectorData &data)
+{
+    for(const auto &uk : available_kernels)
+    {
+        if(uk.is_selected(data))
+        {
+            return &uk;
+        }
+    }
+    return nullptr;
+}
+
+Status validate_arguments(const ITensorInfo *src, const ITensorInfo *dst)
+{
+    ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(src, dst);
+
+    const auto *uk = get_implementation(FloorSelectorData{ src->data_type() });
+    ARM_COMPUTE_RETURN_ERROR_ON(uk == nullptr || uk->func == nullptr);
+
+    // Validate in case of configured output
+    if(dst->total_size() > 0)
+    {
+        ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(src, dst);
+        ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(src, dst);
+    }
+
+    return Status{};
+}
+} // namespace
+
+void CpuFloorKernel::configure(const ITensorInfo *src, ITensorInfo *dst)
+{
+    ARM_COMPUTE_ERROR_ON_NULLPTR(src, dst);
+
+    // Auto initialize output
+    auto_init_if_empty(*dst, src->tensor_shape(), 1, src->data_type());
+
+    // Validate
+    ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(src, dst));
+
+    // Configure kernel window
+    const Window win = calculate_max_window(*src, Steps());
+
+    Coordinates coord;
+    coord.set_num_dimensions(dst->num_dimensions());
+    dst->set_valid_region(ValidRegion(coord, dst->tensor_shape()));
+
+    ICPPKernel::configure(win);
+}
+
+Window CpuFloorKernel::infer_window(const ITensorInfo *src, const ITensorInfo *dst)
+{
+    ARM_COMPUTE_UNUSED(dst);
+    ARM_COMPUTE_ERROR_ON(!bool(validate_arguments(src, dst)));
+
+    Window win;
+    win.use_tensor_dimensions(src->tensor_shape());
+    return win;
+}
+
+Status CpuFloorKernel::validate(const ITensorInfo *input, const ITensorInfo *output)
+{
+    ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input, output));
+    return Status{};
+}
+
+void CpuFloorKernel::run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info)
+{
+    ARM_COMPUTE_UNUSED(info);
+    ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
+    ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
+
+    ARM_COMPUTE_ERROR_ON(tensors.empty());
+
+    const ITensor *src = tensors.get_const_tensor(TensorType::ACL_SRC);
+    ITensor       *dst = tensors.get_tensor(TensorType::ACL_DST);
+
+    const auto  len     = static_cast<int>(window.x().end()) - static_cast<int>(window.x().start());
+    const auto *ukernel = get_implementation(FloorSelectorData{ src->info()->data_type() });
+
+    Window win{ window };
+    win.set(Window::DimX, Window::Dimension(0, 1, 1));
+
+    Iterator src_it(src, win);
+    Iterator dst_it(dst, win);
+
+    execute_window_loop(win, [&](const Coordinates &)
+    {
+        ukernel->func(src_it.ptr(), dst_it.ptr(), len);
+    },
+    src_it, dst_it);
+}
+
+const char *CpuFloorKernel::name() const
+{
+    return "CpuFloorKernel";
+}
+} // namespace kernels
+} // namespace cpu
+} // namespace arm_compute
diff --git a/src/core/NEON/kernels/floor/impl/NEON/fp16.cpp b/src/core/cpu/kernels/floor/impl/NEON/fp16.cpp
similarity index 92%
rename from src/core/NEON/kernels/floor/impl/NEON/fp16.cpp
rename to src/core/cpu/kernels/floor/impl/NEON/fp16.cpp
index 4f56ca9..0d31eb7 100644
--- a/src/core/NEON/kernels/floor/impl/NEON/fp16.cpp
+++ b/src/core/cpu/kernels/floor/impl/NEON/fp16.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -24,7 +24,6 @@
 #if defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) && defined(ENABLE_FP16_KERNELS)
 
 #include "src/core/NEON/NEMath.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <arm_neon.h>
@@ -43,8 +42,8 @@
     ARM_COMPUTE_ASSERT_NOT_NULLPTR(dst);
     ARM_COMPUTE_ASSERT(len >= 0);
 
-    auto psrc = static_cast<const f16 *>(src);
-    auto pdst = static_cast<f16 *>(dst);
+    auto psrc = static_cast<const __fp16 *>(src);
+    auto pdst = static_cast<__fp16 *>(dst);
 
     for(; len >= step; len -= step)
     {
diff --git a/src/core/NEON/kernels/floor/impl/NEON/fp32.cpp b/src/core/cpu/kernels/floor/impl/NEON/fp32.cpp
similarity index 91%
rename from src/core/NEON/kernels/floor/impl/NEON/fp32.cpp
rename to src/core/cpu/kernels/floor/impl/NEON/fp32.cpp
index 3f4b14b..dd63f9f 100644
--- a/src/core/NEON/kernels/floor/impl/NEON/fp32.cpp
+++ b/src/core/cpu/kernels/floor/impl/NEON/fp32.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -22,7 +22,6 @@
  * SOFTWARE.
  */
 #include "src/core/NEON/NEMath.h"
-#include "src/core/common/StdTypes.h"
 #include "src/core/common/Validate.h"
 
 #include <arm_neon.h>
@@ -41,8 +40,8 @@
     ARM_COMPUTE_ASSERT_NOT_NULLPTR(dst);
     ARM_COMPUTE_ASSERT(len >= 0);
 
-    auto psrc = static_cast<const f32 *>(src);
-    auto pdst = static_cast<f32 *>(dst);
+    auto psrc = static_cast<const float *>(src);
+    auto pdst = static_cast<float *>(dst);
 
     for(; len >= step; len -= step)
     {
diff --git a/src/core/NEON/kernels/floor/impl/list.h b/src/core/cpu/kernels/floor/impl/list.h
similarity index 97%
rename from src/core/NEON/kernels/floor/impl/list.h
rename to src/core/cpu/kernels/floor/impl/list.h
index 0eb66e0..4367e0f 100644
--- a/src/core/NEON/kernels/floor/impl/list.h
+++ b/src/core/cpu/kernels/floor/impl/list.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
diff --git a/src/runtime/NEON/functions/NEFloor.cpp b/src/runtime/NEON/functions/NEFloor.cpp
index 74149e6..b4ecb1e 100644
--- a/src/runtime/NEON/functions/NEFloor.cpp
+++ b/src/runtime/NEON/functions/NEFloor.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2020 Arm Limited.
+ * Copyright (c) 2017-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -23,19 +23,44 @@
  */
 #include "arm_compute/runtime/NEON/functions/NEFloor.h"
 
-#include "src/core/NEON/kernels/NEFloorKernel.h"
+#include "src/runtime/cpu/operators/CpuFloor.h"
 
 namespace arm_compute
 {
+NEFloor::NEFloor()
+    : _impl(std::make_unique<Impl>())
+{
+}
+NEFloor::NEFloor(NEFloor &&) = default;
+NEFloor &NEFloor::operator=(NEFloor &&) = default;
+NEFloor::~NEFloor()                     = default;
+
+struct NEFloor::Impl
+{
+    const ITensor                 *src{ nullptr };
+    ITensor                       *dst{ nullptr };
+    std::unique_ptr<cpu::CpuFloor> op{ nullptr };
+};
+
 void NEFloor::configure(const ITensor *input, ITensor *output)
 {
-    auto k = std::make_unique<NEFloorKernel>();
-    k->configure(input, output);
-    _kernel = std::move(k);
+    _impl->src = input;
+    _impl->dst = output;
+
+    _impl->op = std::make_unique<cpu::CpuFloor>();
+    _impl->op->configure(_impl->src->info(), _impl->dst->info());
 }
 
 Status NEFloor::validate(const ITensorInfo *input, const ITensorInfo *output)
 {
-    return NEFloorKernel::validate(input, output);
+    return cpu::CpuFloor::validate(input, output);
+}
+
+void NEFloor::run()
+{
+    ITensorPack pack;
+    pack.add_tensor(TensorType::ACL_SRC, _impl->src);
+    pack.add_tensor(TensorType::ACL_DST, _impl->dst);
+    _impl->op->run(pack);
 }
 } // namespace arm_compute
diff --git a/src/core/NEON/kernels/floor/impl/list.h b/src/runtime/cpu/ICpuOperator.h
similarity index 75%
copy from src/core/NEON/kernels/floor/impl/list.h
copy to src/runtime/cpu/ICpuOperator.h
index 0eb66e0..bb7de1b 100644
--- a/src/core/NEON/kernels/floor/impl/list.h
+++ b/src/runtime/cpu/ICpuOperator.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -21,21 +21,16 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#ifndef SRC_CORE_NEON_KERNELS_FLOOR_LIST_H
-#define SRC_CORE_NEON_KERNELS_FLOOR_LIST_H
+#ifndef ARM_COMPUTE_ICPUOPERATOR_H
+#define ARM_COMPUTE_ICPUOPERATOR_H
+
+#include "arm_compute/runtime/NEON/INEOperator.h"
 
 namespace arm_compute
 {
 namespace cpu
 {
-#define DECLARE_FLOOR_KERNEL(func_name) \
-    void func_name(const void *src, void *dst, int len)
-
-DECLARE_FLOOR_KERNEL(fp16_neon_floor);
-DECLARE_FLOOR_KERNEL(fp32_neon_floor);
-
-#undef DECLARE_FLOOR_KERNEL
+using ICpuOperator = arm_compute::experimental::INEOperator;
 } // namespace cpu
 } // namespace arm_compute
-
-#endif /* SRC_CORE_NEON_KERNELS_FLOOR_LIST_H */
+#endif /* ARM_COMPUTE_ICPUOPERATOR_H */
diff --git a/src/core/NEON/kernels/floor/impl/list.h b/src/runtime/cpu/operators/CpuFloor.cpp
similarity index 72%
copy from src/core/NEON/kernels/floor/impl/list.h
copy to src/runtime/cpu/operators/CpuFloor.cpp
index 0eb66e0..4e169a0 100644
--- a/src/core/NEON/kernels/floor/impl/list.h
+++ b/src/runtime/cpu/operators/CpuFloor.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -21,21 +21,24 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#ifndef SRC_CORE_NEON_KERNELS_FLOOR_LIST_H
-#define SRC_CORE_NEON_KERNELS_FLOOR_LIST_H
+#include "src/runtime/cpu/operators/CpuFloor.h"
+
+#include "src/core/cpu/kernels/CpuFloorKernel.h"
 
 namespace arm_compute
 {
 namespace cpu
 {
-#define DECLARE_FLOOR_KERNEL(func_name) \
-    void func_name(const void *src, void *dst, int len)
+void CpuFloor::configure(const ITensorInfo *src, ITensorInfo *dst)
+{
+    auto k = std::make_unique<kernels::CpuFloorKernel>();
+    k->configure(src, dst);
+    _kernel = std::move(k);
+}
 
-DECLARE_FLOOR_KERNEL(fp16_neon_floor);
-DECLARE_FLOOR_KERNEL(fp32_neon_floor);
-
-#undef DECLARE_FLOOR_KERNEL
+Status CpuFloor::validate(const ITensorInfo *src, const ITensorInfo *dst)
+{
+    return kernels::CpuFloorKernel::validate(src, dst);
+}
 } // namespace cpu
 } // namespace arm_compute
-
-#endif /* SRC_CORE_NEON_KERNELS_FLOOR_LIST_H */
diff --git a/src/runtime/cpu/operators/CpuFloor.h b/src/runtime/cpu/operators/CpuFloor.h
new file mode 100644
index 0000000..30c850a
--- /dev/null
+++ b/src/runtime/cpu/operators/CpuFloor.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2021 Arm Limited.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+#ifndef ARM_COMPUTE_CPU_FLOOR_H
+#define ARM_COMPUTE_CPU_FLOOR_H
+
+#include "src/runtime/cpu/ICpuOperator.h"
+
+namespace arm_compute
+{
+namespace cpu
+{
+/** Basic function to run @ref CpuFloorKernel */
+class CpuFloor : public ICpuOperator
+{
+public:
+    /** Constructor */
+    CpuFloor() = default;
+    /** Set the input and output tensor.
+     *
+     * @param[in] src Source tensor info. Data types supported: F16/F32.
+     * @param[in] dst Destination tensor info. Data type supported: same as @p src
+     */
+    void configure(const ITensorInfo *src, ITensorInfo *dst);
+    /** Static function to check if given info will lead to a valid configuration of @ref CpuFloor
+     *
+     * @param[in] src Source tensor info. Data types supported: F16/F32.
+     * @param[in] dst Destination tensor info. Data type supported: same as @p src
+     *
+     * @return a status
+     */
+    static Status validate(const ITensorInfo *input, const ITensorInfo *output);
+};
+} // namespace cpu
+} // namespace arm_compute
+#endif /* ARM_COMPUTE_CPU_FLOOR_H */