diff options
Diffstat (limited to 'src/runtime/CL/functions/CLReshapeLayer.cpp')
-rw-r--r-- | src/runtime/CL/functions/CLReshapeLayer.cpp | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/src/runtime/CL/functions/CLReshapeLayer.cpp b/src/runtime/CL/functions/CLReshapeLayer.cpp index 5112064b23..3d6349fb25 100644 --- a/src/runtime/CL/functions/CLReshapeLayer.cpp +++ b/src/runtime/CL/functions/CLReshapeLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -23,41 +23,29 @@ */ #include "arm_compute/runtime/CL/functions/CLReshapeLayer.h" +#include "arm_compute/core/CL/CLKernelLibrary.h" #include "arm_compute/core/CL/ICLTensor.h" -#include "src/core/CL/kernels/CLReshapeLayerKernel.h" -#include "support/MemorySupport.h" +#include "arm_compute/core/Types.h" +#include "arm_compute/core/Validate.h" + +#include "src/core/CL/ICLKernel.h" +#include "src/gpu/cl/operators/ClReshape.h" /** [CLReshapeLayer snippet] **/ namespace arm_compute { -namespace experimental -{ -void CLReshape::configure(const CLCompileContext &compile_context, const ITensorInfo *input, ITensorInfo *output) -{ - auto k = arm_compute::support::cpp14::make_unique<CLReshapeLayerKernel>(); - k->configure(compile_context, input, output); - _kernel = std::move(k); -} - -Status CLReshape::validate(const ITensorInfo *input, const ITensorInfo *output) -{ - return arm_compute::CLReshapeLayerKernel::validate(input, output); -} -} // namespace experimental - struct CLReshapeLayer::Impl { - const ICLTensor *src{ nullptr }; - ICLTensor *dst{ nullptr }; - std::unique_ptr<experimental::CLReshape> op{ nullptr }; + const ICLTensor *src{nullptr}; + ICLTensor *dst{nullptr}; + std::unique_ptr<opencl::ClReshape> op{nullptr}; }; -CLReshapeLayer::CLReshapeLayer() - : _impl(support::cpp14::make_unique<Impl>()) +CLReshapeLayer::CLReshapeLayer() : _impl(std::make_unique<Impl>()) { } -CLReshapeLayer::CLReshapeLayer(CLReshapeLayer &&) = default; +CLReshapeLayer::CLReshapeLayer(CLReshapeLayer &&) = default; CLReshapeLayer &CLReshapeLayer::operator=(CLReshapeLayer &&) = default; CLReshapeLayer::~CLReshapeLayer() = default; @@ -70,14 +58,14 @@ void CLReshapeLayer::configure(const CLCompileContext &compile_context, const IC { _impl->src = input; _impl->dst = output; - _impl->op = arm_compute::support::cpp14::make_unique<experimental::CLReshape>(); + _impl->op = std::make_unique<opencl::ClReshape>(); _impl->op->configure(compile_context, input->info(), output->info()); } Status CLReshapeLayer::validate(const ITensorInfo *input, const ITensorInfo *output) { ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, output); - ARM_COMPUTE_RETURN_ON_ERROR(experimental::CLReshape::validate(input, output)); + ARM_COMPUTE_RETURN_ON_ERROR(opencl::ClReshape::validate(input, output)); return Status{}; } @@ -90,4 +78,4 @@ void CLReshapeLayer::run() _impl->op->run(pack); } } // namespace arm_compute -/** [CLReshapeLayer snippet] **/ + /** [CLReshapeLayer snippet] **/ |