diff options
author | Usama Arif <usama.arif@arm.com> | 2019-05-13 17:45:54 +0100 |
---|---|---|
committer | Usama Arif <usama.arif@arm.com> | 2019-05-15 17:09:19 +0000 |
commit | eb312ef6c20e8548c43eb9d4a3edf7265bc6777b (patch) | |
tree | 3319474f9360dac5148a0942051608d5cbd7874f /src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp | |
parent | f391fff0336ae84387dd3ebc683ef85649de9eb5 (diff) | |
download | ComputeLibrary-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 'src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp')
-rw-r--r-- | src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp b/src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp index b7e9a68680..67ffec8991 100644 --- a/src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp +++ b/src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -51,4 +51,16 @@ Status CLExpLayer::validate(const ITensorInfo *input, const ITensorInfo *output) { return CLElementWiseUnaryLayerKernel::validate(input, output, ElementWiseUnary::EXP); } + +void CLNegLayer::configure(const ICLTensor *input, ICLTensor *output) +{ + auto k = arm_compute::support::cpp14::make_unique<CLElementWiseUnaryLayerKernel>(); + k->configure(input, output, ElementWiseUnary::NEG); + _kernel = std::move(k); +} +Status CLNegLayer::validate(const ITensorInfo *input, const ITensorInfo *output) +{ + return CLElementWiseUnaryLayerKernel::validate(input, output, ElementWiseUnary::NEG); +} + } // namespace arm_compute |