diff options
Diffstat (limited to 'arm_compute/runtime/CL')
-rw-r--r-- | arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h b/arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h index 75a3d3213e..8892dbad6c 100644 --- a/arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h +++ b/arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 Arm Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -26,20 +26,33 @@ #include "arm_compute/core/CL/CLKernelLibrary.h" #include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" +#include "arm_compute/runtime/IFunction.h" #include "arm_compute/runtime/ITransformWeights.h" +#include <memory> + namespace arm_compute { class CLCompileContext; -class CLConvertFullyConnectedWeightsKernel; class ICLTensor; class ITensorInfo; -/** Basic function to run @ref CLConvertFullyConnectedWeightsKernel. */ -class CLConvertFullyConnectedWeights : public ICLSimpleFunction +/** Basic function to run an @ref opencl::kernels::ClConvertFullyConnectedWeightsKernel. */ +class CLConvertFullyConnectedWeights : public IFunction { public: + /** Constructor */ + CLConvertFullyConnectedWeights(); + /** Destructor */ + ~CLConvertFullyConnectedWeights(); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + CLConvertFullyConnectedWeights(const CLConvertFullyConnectedWeights &) = delete; + /** Default move constructor */ + CLConvertFullyConnectedWeights(CLConvertFullyConnectedWeights &&) = default; + /** Prevent instances of this class from being copied (As this class contains pointers) */ + CLConvertFullyConnectedWeights &operator=(const CLConvertFullyConnectedWeights &) = delete; + /** Default move assignment operator */ + CLConvertFullyConnectedWeights &operator=(CLConvertFullyConnectedWeights &&) = default; /** Initialize the function. * * @param[in] input Source weights tensor to convert. Must be 2 dimensional. Data types supported: All. @@ -69,11 +82,18 @@ public: * @param[in] data_layout The data layout the weights have been trained in. */ static Status validate(const ITensorInfo *input, const ITensorInfo *output, const TensorShape &original_input_shape, DataLayout data_layout); + + // Inherited methods overridden: + void run() override; + +private: + struct Impl; + std::unique_ptr<Impl> _impl; }; namespace weights_transformations { -/** Basic function to run @ref CLConvertFullyConnectedWeightsKernel. */ +/** Basic function to manage @ref CLConvertFullyConnectedWeights. */ class CLConvertFullyConnectedWeightsManaged : public ITransformWeights { public: |