aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime
diff options
context:
space:
mode:
authorUsama Arif <usama.arif@arm.com>2019-05-13 17:45:54 +0100
committerUsama Arif <usama.arif@arm.com>2019-05-15 17:09:19 +0000
commiteb312ef6c20e8548c43eb9d4a3edf7265bc6777b (patch)
tree3319474f9360dac5148a0942051608d5cbd7874f /arm_compute/runtime
parentf391fff0336ae84387dd3ebc683ef85649de9eb5 (diff)
downloadComputeLibrary-eb312ef6c20e8548c43eb9d4a3edf7265bc6777b.tar.gz
COMPMID-2267: Implement NEG for CL
Change-Id: I5019103987c92df5080809201feb9b646fae8cc5 Signed-off-by: Usama Arif <usama.arif@arm.com> Reviewed-on: https://review.mlplatform.org/c/1130 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime')
-rw-r--r--arm_compute/runtime/CL/functions/CLElementWiseUnaryLayer.h22
1 files changed, 21 insertions, 1 deletions
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__ */