From eb312ef6c20e8548c43eb9d4a3edf7265bc6777b Mon Sep 17 00:00:00 2001 From: Usama Arif Date: Mon, 13 May 2019 17:45:54 +0100 Subject: COMPMID-2267: Implement NEG for CL Change-Id: I5019103987c92df5080809201feb9b646fae8cc5 Signed-off-by: Usama Arif Reviewed-on: https://review.mlplatform.org/c/1130 Comments-Addressed: Arm Jenkins Reviewed-by: Gian Marco Iodice Tested-by: Arm Jenkins --- .../runtime/CL/functions/CLElementWiseUnaryLayer.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'arm_compute/runtime/CL/functions/CLElementWiseUnaryLayer.h') diff --git a/arm_compute/runtime/CL/functions/CLElementWiseUnaryLayer.h b/arm_compute/runtime/CL/functions/CLElementWiseUnaryLayer.h index 37061a647c..a2012ab054 100644 --- a/arm_compute/runtime/CL/functions/CLElementWiseUnaryLayer.h +++ b/arm_compute/runtime/CL/functions/CLElementWiseUnaryLayer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -69,5 +69,25 @@ public: */ static Status validate(const ITensorInfo *input, const ITensorInfo *output); }; + +/** Basic function to negate an input tensor. */ +class CLNegLayer : public ICLSimpleFunction +{ +public: + /** Initialize the function + * + * @param[in] input Input tensor. Data types supported: F16/F32. + * @param[out] output Output tensor. Data types supported: same as @p input. + */ + void configure(const ICLTensor *input, ICLTensor *output); + /** Static function to check if given info will lead to a valid configuration of @ref CLNegLayer + * + * @param[in] input First tensor input info. Data types supported: F16/F32. + * @param[in] output Output tensor info. Data types supported: Same as @p input. + * + * @return a status + */ + static Status validate(const ITensorInfo *input, const ITensorInfo *output); +}; } // namespace arm_compute #endif /* __ARM_COMPUTE_CLELEMENTWISEUNARYLAYER_H__ */ -- cgit v1.2.1