aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/functions/CLLogicalNot.cpp
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2021-01-26 10:20:17 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-01-27 18:55:08 +0000
commitc9c8905350d8409dfefd1f95d90009f4718ba852 (patch)
tree0d4bba06083a24443479ce6255450090345ca65b /src/runtime/CL/functions/CLLogicalNot.cpp
parentc727d5261f158c10f6c6dbd926b76c2b96e0c2c4 (diff)
downloadComputeLibrary-c9c8905350d8409dfefd1f95d90009f4718ba852.tar.gz
Make CL Elementwise Unary kernels and functions state-less
Resolves COMPMID-4004 Change-Id: I1dfe8bc52c1ff394ea208ba98b51033c738746a4 Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4922 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/runtime/CL/functions/CLLogicalNot.cpp')
-rw-r--r--src/runtime/CL/functions/CLLogicalNot.cpp39
1 files changed, 10 insertions, 29 deletions
diff --git a/src/runtime/CL/functions/CLLogicalNot.cpp b/src/runtime/CL/functions/CLLogicalNot.cpp
index d3774da597..388d2bce86 100644
--- a/src/runtime/CL/functions/CLLogicalNot.cpp
+++ b/src/runtime/CL/functions/CLLogicalNot.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -22,38 +22,19 @@
* SOFTWARE.
*/
#include "arm_compute/runtime/CL/functions/CLLogicalNot.h"
-#include "arm_compute/core/CL/ICLTensor.h"
-#include "src/core/CL/kernels/CLElementWiseUnaryLayerKernel.h"
-#include <utility>
+#include "arm_compute/core/CL/CLKernelLibrary.h"
+#include "arm_compute/core/CL/ICLTensor.h"
+#include "src/core/CL/ICLKernel.h"
+#include "src/runtime/gpu/cl/operators/ClLogicalNot.h"
namespace arm_compute
{
-namespace experimental
-{
-void CLLogicalNot::configure(const CLCompileContext &compile_context, const ITensorInfo *input, ITensorInfo *output)
-{
- auto k = std::make_unique<CLElementWiseUnaryLayerKernel>();
- k->configure(compile_context, input, output, ElementWiseUnary::LOGICAL_NOT);
- _kernel = std::move(k);
-}
-
-Status CLLogicalNot::validate(const ITensorInfo *input, const ITensorInfo *output)
-{
- return CLElementWiseUnaryLayerKernel::validate(input, output, ElementWiseUnary::LOGICAL_NOT);
-}
-
-void CLLogicalNot::run(ITensorPack &tensors)
-{
- ICLOperator::run(tensors);
-}
-} // namespace experimental
-
struct CLLogicalNot::Impl
{
- const ICLTensor *src{ nullptr };
- ICLTensor *dst{ nullptr };
- std::unique_ptr<experimental::CLLogicalNot> op{ nullptr };
+ const ICLTensor *src{ nullptr };
+ ICLTensor *dst{ nullptr };
+ std::unique_ptr<opencl::ClLogicalNot> op{ nullptr };
};
CLLogicalNot::CLLogicalNot()
@@ -73,13 +54,13 @@ void CLLogicalNot::configure(const CLCompileContext &compile_context, const ICLT
{
_impl->src = input;
_impl->dst = output;
- _impl->op = std::make_unique<experimental::CLLogicalNot>();
+ _impl->op = std::make_unique<opencl::ClLogicalNot>();
_impl->op->configure(compile_context, input->info(), output->info());
}
Status CLLogicalNot::validate(const ITensorInfo *input, const ITensorInfo *output)
{
- return experimental::CLLogicalNot::validate(input, output);
+ return opencl::ClLogicalNot::validate(input, output);
}
void CLLogicalNot::run()