From f47f718e87889b7d501a48e1d86b5d12b2e3f54c Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Fri, 15 Jan 2021 09:29:50 +0000 Subject: Make CLFloor and CLActivation kernels and functions state-less Signed-off-by: Georgios Pinitas Change-Id: Icbe4e6a7c6732a59bdda0136af44c4852452dfd1 Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4891 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins --- arm_compute/runtime/CL/functions/CLFloor.h | 31 +++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'arm_compute/runtime/CL/functions/CLFloor.h') diff --git a/arm_compute/runtime/CL/functions/CLFloor.h b/arm_compute/runtime/CL/functions/CLFloor.h index 85d7071194..7c7607002d 100644 --- a/arm_compute/runtime/CL/functions/CLFloor.h +++ b/arm_compute/runtime/CL/functions/CLFloor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -24,20 +24,34 @@ #ifndef ARM_COMPUTE_CLFLOOR_H #define ARM_COMPUTE_CLFLOOR_H -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" +#include "arm_compute/runtime/IFunction.h" #include "arm_compute/core/Types.h" +#include + namespace arm_compute { class CLCompileContext; class ICLTensor; class ITensorInfo; -/** Basic function to run @ref CLFloorKernel */ -class CLFloor : public ICLSimpleFunction +/** Basic function to run @ref opencl::kernels::ClFloorKernel */ +class CLFloor : public IFunction { public: + /** Constructor */ + CLFloor(); + /** Destructor */ + ~CLFloor(); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + CLFloor(const CLFloor &) = delete; + /** Default move constructor */ + CLFloor(CLFloor &&); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + CLFloor &operator=(const CLFloor &) = delete; + /** Default move assignment operator */ + CLFloor &operator=(CLFloor &&); /** Set the source, destination of the kernel * * @param[in] input Source tensor. Data type supported: F16/F32. @@ -59,6 +73,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_CLFLOOR_H */ -- cgit v1.2.1