aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph/Tensor.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-10-02 18:51:47 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commite2c82fee3b6d38f6e79412c78176792b817defd0 (patch)
treeaa6821e33cfe8001c33086191c81c18d66ac7837 /arm_compute/graph/Tensor.h
parent48a60f9f7b0b7b5cf38253b7a2ac576aac43ef78 (diff)
downloadComputeLibrary-e2c82fee3b6d38f6e79412c78176792b817defd0.tar.gz
COMPMID-550: Adds support for branches.
Change-Id: I778007c9221ce3156400284c4039b90245eb2b7f Reviewed-on: http://mpd-gerrit.cambridge.arm.com/90043 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'arm_compute/graph/Tensor.h')
-rw-r--r--arm_compute/graph/Tensor.h43
1 files changed, 14 insertions, 29 deletions
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<ITensorAccessor> _accessor; /**< Tensor Accessor */
- std::unique_ptr<ITensor> _tensor; /**< Tensor */
+ TargetHint _target; /**< Target that this tensor is pinned on */
+ TensorInfo _info; /**< Tensor metadata */
+ std::unique_ptr<ITensorAccessor> _accessor; /**< Tensor Accessor */
+ std::unique_ptr<arm_compute::ITensor> _tensor; /**< Tensor */
};
} // namespace graph
} // namespace arm_compute