From 11d8415aa57b69fb6c83e86a37e3026c22d1d37d Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 28 Apr 2021 10:20:18 +0100 Subject: Port DepthConvert to new Api - Renames DepthConvert to Cast - Ports both NEDepthConverLayer and CLDepthConvert variants - Removes legacy shift capability from DepthConvert, allowing only shifts of 0 Signed-off-by: Georgios Pinitas Change-Id: I806a0f8eb23d23502b632c529fda7edde19c8176 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5565 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- .../runtime/CL/functions/CLDepthConvertLayer.h | 28 ++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'arm_compute/runtime/CL/functions/CLDepthConvertLayer.h') diff --git a/arm_compute/runtime/CL/functions/CLDepthConvertLayer.h b/arm_compute/runtime/CL/functions/CLDepthConvertLayer.h index 34dfdd7f3a..58deb7ec40 100644 --- a/arm_compute/runtime/CL/functions/CLDepthConvertLayer.h +++ b/arm_compute/runtime/CL/functions/CLDepthConvertLayer.h @@ -24,10 +24,11 @@ #ifndef ARM_COMPUTE_CLDEPTHCONVERT_H #define ARM_COMPUTE_CLDEPTHCONVERT_H +#include "arm_compute/runtime/IFunction.h" + #include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" -#include +#include namespace arm_compute { @@ -35,10 +36,22 @@ class CLCompileContext; class ICLTensor; class ITensorInfo; -/** Basic function to run @ref CLDepthConvertLayerKernel. */ -class CLDepthConvertLayer : public ICLSimpleFunction +/** Basic function to run @ref opencl::kernels::ClCastKernel */ +class CLDepthConvertLayer : public IFunction { public: + /** Constructor */ + CLDepthConvertLayer(); + /** Destructor */ + ~CLDepthConvertLayer(); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + CLDepthConvertLayer(const CLDepthConvertLayer &) = delete; + /** Default move constructor */ + CLDepthConvertLayer(CLDepthConvertLayer &&); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + CLDepthConvertLayer &operator=(const CLDepthConvertLayer &) = delete; + /** Default move assignment operator */ + CLDepthConvertLayer &operator=(CLDepthConvertLayer &&); /** Initialize the function's source, destination * * Valid data layouts: @@ -94,6 +107,13 @@ public: * @return a status */ static Status validate(const ITensorInfo *input, const ITensorInfo *output, ConvertPolicy policy, uint32_t shift); + + // Inherited methods overridden: + void run() override; + +private: + struct Impl; + std::unique_ptr _impl; }; } // namespace arm_compute #endif /*ARM_COMPUTE_CLDEPTHCONVERT_H*/ -- cgit v1.2.1