aboutsummaryrefslogtreecommitdiff
path: root/src/graph/Tensor.cpp
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 /src/graph/Tensor.cpp
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 'src/graph/Tensor.cpp')
-rw-r--r--src/graph/Tensor.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/graph/Tensor.cpp b/src/graph/Tensor.cpp
index 31dd4e86ac..f85fe27dbf 100644
--- a/src/graph/Tensor.cpp
+++ b/src/graph/Tensor.cpp
@@ -35,7 +35,7 @@ using namespace arm_compute::graph;
namespace
{
template <typename TensorType>
-std::unique_ptr<ITensor> initialise_tensor(TensorInfo &info)
+std::unique_ptr<arm_compute::ITensor> initialise_tensor(TensorInfo &info)
{
auto tensor = arm_compute::support::cpp14::make_unique<TensorType>();
tensor->allocator()->init(info);
@@ -43,7 +43,7 @@ std::unique_ptr<ITensor> initialise_tensor(TensorInfo &info)
}
template <typename TensorType>
-void tensor_allocate(ITensor &tensor)
+void tensor_allocate(arm_compute::ITensor &tensor)
{
auto itensor = dynamic_cast<TensorType *>(&tensor);
ARM_COMPUTE_ERROR_ON_NULLPTR(itensor);
@@ -85,7 +85,12 @@ bool Tensor::call_accessor()
return retval;
}
-ITensor *Tensor::tensor()
+bool Tensor::has_accessor() const
+{
+ return (_accessor != nullptr);
+}
+
+arm_compute::ITensor *Tensor::tensor()
{
return _tensor.get();
}
@@ -95,7 +100,7 @@ const TensorInfo &Tensor::info() const
return _info;
}
-ITensor *Tensor::set_target(TargetHint target)
+arm_compute::ITensor *Tensor::set_target(TargetHint target)
{
if(_tensor != nullptr)
{