From e2c82fee3b6d38f6e79412c78176792b817defd0 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 2 Oct 2017 18:51:47 +0100 Subject: COMPMID-550: Adds support for branches. Change-Id: I778007c9221ce3156400284c4039b90245eb2b7f Reviewed-on: http://mpd-gerrit.cambridge.arm.com/90043 Tested-by: Kaizen Reviewed-by: Anthony Barbier --- arm_compute/graph/Tensor.h | 43 ++++++++++++++----------------------------- 1 file changed, 14 insertions(+), 29 deletions(-) (limited to 'arm_compute/graph/Tensor.h') diff --git a/arm_compute/graph/Tensor.h b/arm_compute/graph/Tensor.h index 9fdd56db6e..dcb0c661d6 100644 --- a/arm_compute/graph/Tensor.h +++ b/arm_compute/graph/Tensor.h @@ -25,6 +25,7 @@ #define __ARM_COMPUTE_GRAPH_TENSOR_H__ #include "arm_compute/graph/ITensorAccessor.h" +#include "arm_compute/graph/ITensorObject.h" #include "arm_compute/graph/Types.h" #include "support/ToolchainSupport.h" @@ -35,7 +36,7 @@ namespace arm_compute namespace graph { /** Tensor class */ -class Tensor +class Tensor final : public ITensorObject { public: /** Constructor @@ -84,43 +85,27 @@ public: * @param[in] info TensorInfo to set */ void set_info(TensorInfo &&info); - /** Calls accessor on tensor - * - * @return True if succeeds else false - */ - bool call_accessor(); - /** Sets target of the tensor - * - * @param[in] target Target where the tensor should be pinned in - * - * @return - */ - ITensor *set_target(TargetHint target); /** Returns tensor's TensorInfo * * @return TensorInfo of the tensor */ const TensorInfo &info() const; - /** Returns a pointer to the internal tensor - * - * @return Tensor - */ - ITensor *tensor(); /** Allocates and fills the tensor if needed */ void allocate_and_fill_if_needed(); - /** Allocates the tensor */ - void allocate(); - /** Return the target that this tensor is pinned on - * - * @return Target of the tensor - */ - TargetHint target() const; + + // Inherited methods overriden: + bool call_accessor() override; + bool has_accessor() const override; + arm_compute::ITensor *set_target(TargetHint target) override; + arm_compute::ITensor *tensor() override; + TargetHint target() const override; + void allocate() override; private: - TargetHint _target; /**< Target that this tensor is pinned on */ - TensorInfo _info; /**< Tensor metadata */ - std::unique_ptr _accessor; /**< Tensor Accessor */ - std::unique_ptr _tensor; /**< Tensor */ + TargetHint _target; /**< Target that this tensor is pinned on */ + TensorInfo _info; /**< Tensor metadata */ + std::unique_ptr _accessor; /**< Tensor Accessor */ + std::unique_ptr _tensor; /**< Tensor */ }; } // namespace graph } // namespace arm_compute -- cgit v1.2.1