diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-01-10 15:33:28 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:43:42 +0000 |
commit | 652bde553f506caac4c563988dc9baf746f9584d (patch) | |
tree | 931d17bdfa70e9968cd434cfa53db8919bb534ea /src/graph/SubTensor.cpp | |
parent | f72f9367d1eddee91f15a64952b99ee6b80b821d (diff) | |
download | ComputeLibrary-652bde553f506caac4c563988dc9baf746f9584d.tar.gz |
COMPMID-674 - Create Google InceptionV3 example
Change-Id: I389e0d4104b7dde60b7cdd612a83f3328517e44c
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/115804
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/graph/SubTensor.cpp')
-rw-r--r-- | src/graph/SubTensor.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/graph/SubTensor.cpp b/src/graph/SubTensor.cpp index 2edeb3b1d4..2e640dd93c 100644 --- a/src/graph/SubTensor.cpp +++ b/src/graph/SubTensor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -37,21 +37,21 @@ using namespace arm_compute::graph; namespace { template <typename SubTensorType, typename ParentTensorType> -std::unique_ptr<arm_compute::ITensor> initialise_subtensor(arm_compute::ITensor *parent, TensorShape shape, Coordinates coords) +std::unique_ptr<arm_compute::ITensor> initialise_subtensor(arm_compute::ITensor *parent, TensorShape shape, Coordinates coords, bool extend_parent) { auto ptensor = dynamic_cast<ParentTensorType *>(parent); - auto subtensor = arm_compute::support::cpp14::make_unique<SubTensorType>(ptensor, shape, coords); + auto subtensor = arm_compute::support::cpp14::make_unique<SubTensorType>(ptensor, shape, coords, extend_parent); return std::move(subtensor); } } // namespace SubTensor::SubTensor() - : _target(TargetHint::DONT_CARE), _tensor_shape(), _coords(), _parent(nullptr), _subtensor(nullptr) + : _target(TargetHint::DONT_CARE), _tensor_shape(), _coords(), _parent(nullptr), _subtensor(nullptr), _extend_parent(false) { } -SubTensor::SubTensor(Tensor &parent, TensorShape tensor_shape, Coordinates coords) - : _target(TargetHint::DONT_CARE), _tensor_shape(tensor_shape), _coords(coords), _parent(nullptr), _subtensor(nullptr) +SubTensor::SubTensor(Tensor &parent, TensorShape tensor_shape, Coordinates coords, bool extend_parent) + : _target(TargetHint::DONT_CARE), _tensor_shape(tensor_shape), _coords(coords), _parent(nullptr), _subtensor(nullptr), _extend_parent(extend_parent) { ARM_COMPUTE_ERROR_ON(parent.tensor() == nullptr); _parent = parent.tensor(); @@ -60,8 +60,8 @@ SubTensor::SubTensor(Tensor &parent, TensorShape tensor_shape, Coordinates coord instantiate_subtensor(); } -SubTensor::SubTensor(arm_compute::ITensor *parent, TensorShape tensor_shape, Coordinates coords, TargetHint target) - : _target(target), _tensor_shape(tensor_shape), _coords(coords), _parent(parent), _subtensor(nullptr) +SubTensor::SubTensor(arm_compute::ITensor *parent, TensorShape tensor_shape, Coordinates coords, TargetHint target, bool extend_parent) + : _target(target), _tensor_shape(tensor_shape), _coords(coords), _parent(parent), _subtensor(nullptr), _extend_parent(extend_parent) { ARM_COMPUTE_ERROR_ON(parent == nullptr); instantiate_subtensor(); @@ -108,10 +108,10 @@ void SubTensor::instantiate_subtensor() switch(_target) { case TargetHint::OPENCL: - _subtensor = initialise_subtensor<arm_compute::CLSubTensor, arm_compute::ICLTensor>(_parent, _tensor_shape, _coords); + _subtensor = initialise_subtensor<arm_compute::CLSubTensor, arm_compute::ICLTensor>(_parent, _tensor_shape, _coords, _extend_parent); break; case TargetHint::NEON: - _subtensor = initialise_subtensor<arm_compute::SubTensor, arm_compute::ITensor>(_parent, _tensor_shape, _coords); + _subtensor = initialise_subtensor<arm_compute::SubTensor, arm_compute::ITensor>(_parent, _tensor_shape, _coords, _extend_parent); break; default: ARM_COMPUTE_ERROR("Invalid TargetHint"); |