From 70eb53b09adf57cc6ff7435c795e65a4f4697f67 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 6 Jan 2021 19:42:21 +0000 Subject: 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 Change-Id: I9240b8ec534589c0f15c354f771f1ac5d7010c3b Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4773 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Michalis Spyrou --- arm_compute/runtime/NEON/functions/NEFloor.h | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'arm_compute') diff --git a/arm_compute/runtime/NEON/functions/NEFloor.h b/arm_compute/runtime/NEON/functions/NEFloor.h index 7f4248eadb..92993503da 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 + 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 @@ public: * @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; }; } // namespace arm_compute #endif /* ARM_COMPUTE_NEFLOOR_H */ -- cgit v1.2.1