aboutsummaryrefslogtreecommitdiff
path: root/src/graph/SubTensor.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-10-04 16:53:58 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitff421f2100e0e9e532f5fe78585300546af61690 (patch)
tree9ba5a1bfe64b5b10f70c64a965f9c5ca14de9ce3 /src/graph/SubTensor.cpp
parent925ca0f7402115da3bffb21c04fca0bc822c9b38 (diff)
downloadComputeLibrary-ff421f2100e0e9e532f5fe78585300546af61690.tar.gz
COMPMID-601: Add GraphContext
GraphContext hold all the information about the hints that need to be passed in the nodes. As these might expand, it serves as a centralized class for such information. Change-Id: I0b5527630fb97cc5fa500db0bac8307ff2ea36e6 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/90300 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/graph/SubTensor.cpp')
-rw-r--r--src/graph/SubTensor.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/graph/SubTensor.cpp b/src/graph/SubTensor.cpp
index a70f32927b..abf8506c33 100644
--- a/src/graph/SubTensor.cpp
+++ b/src/graph/SubTensor.cpp
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
#include "arm_compute/graph/SubTensor.h"
#include "arm_compute/core/Error.h"
@@ -45,12 +44,12 @@ std::unique_ptr<ITensor> initialise_subtensor(ITensor *parent, TensorShape shape
} // namespace
SubTensor::SubTensor()
- : _target(Hint::DONT_CARE), _coords(), _info(), _parent(nullptr), _subtensor(nullptr)
+ : _target(TargetHint::DONT_CARE), _coords(), _info(), _parent(nullptr), _subtensor(nullptr)
{
}
SubTensor::SubTensor(Tensor &parent, TensorShape tensor_shape, Coordinates coords)
- : _target(Hint::DONT_CARE), _coords(coords), _info(), _parent(nullptr), _subtensor(nullptr)
+ : _target(TargetHint::DONT_CARE), _coords(coords), _info(), _parent(nullptr), _subtensor(nullptr)
{
ARM_COMPUTE_ERROR_ON(parent.tensor() == nullptr);
_parent = parent.tensor();
@@ -60,7 +59,7 @@ SubTensor::SubTensor(Tensor &parent, TensorShape tensor_shape, Coordinates coord
instantiate_subtensor();
}
-SubTensor::SubTensor(ITensor *parent, TensorShape tensor_shape, Coordinates coords, Hint target)
+SubTensor::SubTensor(ITensor *parent, TensorShape tensor_shape, Coordinates coords, TargetHint target)
: _target(target), _coords(coords), _info(), _parent(parent), _subtensor(nullptr)
{
ARM_COMPUTE_ERROR_ON(parent == nullptr);
@@ -84,7 +83,7 @@ ITensor *SubTensor::tensor()
return _subtensor.get();
}
-Hint SubTensor::target() const
+TargetHint SubTensor::target() const
{
return _target;
}
@@ -93,13 +92,13 @@ void SubTensor::instantiate_subtensor()
{
switch(_target)
{
- case Hint::OPENCL:
+ case TargetHint::OPENCL:
_subtensor = initialise_subtensor<arm_compute::CLSubTensor, arm_compute::ICLTensor>(_parent, _info.tensor_shape(), _coords);
break;
- case Hint::NEON:
+ case TargetHint::NEON:
_subtensor = initialise_subtensor<arm_compute::SubTensor, arm_compute::ITensor>(_parent, _info.tensor_shape(), _coords);
break;
default:
- ARM_COMPUTE_ERROR("Invalid Hint");
+ ARM_COMPUTE_ERROR("Invalid TargetHint");
}
}