diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SubTensorInfo.cpp | 13 | ||||
-rw-r--r-- | src/core/TensorInfo.cpp | 12 |
2 files changed, 19 insertions, 6 deletions
diff --git a/src/core/SubTensorInfo.cpp b/src/core/SubTensorInfo.cpp index bb8ecf60ea..6279992e89 100644 --- a/src/core/SubTensorInfo.cpp +++ b/src/core/SubTensorInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -56,12 +56,12 @@ TensorShape extend_parent_shape(TensorShape parent_shape, TensorShape shape, Coo } // namespace SubTensorInfo::SubTensorInfo() - : _parent(nullptr), _tensor_shape(), _coords(), _valid_region{ Coordinates(), _tensor_shape }, _extend_parent(false) + : _parent(nullptr), _tensor_shape(), _dims_state(), _coords(), _valid_region{ Coordinates(), _tensor_shape }, _extend_parent(false) { } SubTensorInfo::SubTensorInfo(ITensorInfo *parent, TensorShape tensor_shape, Coordinates coords, bool extend_parent) - : _parent(parent), _tensor_shape(tensor_shape), _coords(coords), _valid_region{ Coordinates(), _tensor_shape }, _extend_parent(extend_parent) + : _parent(parent), _tensor_shape(tensor_shape), _dims_state(), _coords(coords), _valid_region{ Coordinates(), _tensor_shape }, _extend_parent(extend_parent) { ARM_COMPUTE_ERROR_ON(parent == nullptr); @@ -107,6 +107,13 @@ ITensorInfo &SubTensorInfo::set_tensor_shape(const TensorShape &shape) return *this; } +ITensorInfo &SubTensorInfo::set_tensor_dims_state(const TensorDimsState &state) +{ + ARM_COMPUTE_ERROR_ON(_parent == nullptr); + _dims_state = state; + return *this; +} + bool SubTensorInfo::extend_padding(const PaddingSize &padding) { ARM_COMPUTE_ERROR_ON(_parent == nullptr); diff --git a/src/core/TensorInfo.cpp b/src/core/TensorInfo.cpp index 7b1f9c542a..bedfe147b0 100644 --- a/src/core/TensorInfo.cpp +++ b/src/core/TensorInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 Arm Limited. + * Copyright (c) 2016-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -35,7 +35,7 @@ using namespace arm_compute; TensorInfo::TensorInfo() - : _total_size(0), _offset_first_element_in_bytes(0), _strides_in_bytes(), _num_channels(0), _tensor_shape(), _data_type(DataType::UNKNOWN), _format(Format::UNKNOWN), _is_resizable{ true }, _is_dynamic{ false }, + : _total_size(0), _offset_first_element_in_bytes(0), _strides_in_bytes(), _num_channels(0), _tensor_shape(), _dims_state(), _data_type(DataType::UNKNOWN), _format(Format::UNKNOWN), _is_resizable{ true }, _valid_region{ Coordinates(), _tensor_shape }, _padding{ 0 }, _quantization_info(), _data_layout(DataLayout::NCHW) { } @@ -48,10 +48,10 @@ TensorInfo::TensorInfo(const ITensorInfo &info) _strides_in_bytes = info.strides_in_bytes(); _num_channels = info.num_channels(); _tensor_shape = info.tensor_shape(); + _dims_state = info.tensor_dims_state(); _data_type = info.data_type(); _format = info.format(); _is_resizable = info.is_resizable(); - _is_dynamic = info.is_dynamic(); _valid_region = info.valid_region(); _padding = info.padding(); _quantization_info = info.quantization_info(); @@ -371,6 +371,12 @@ ITensorInfo &TensorInfo::set_tensor_shape(const TensorShape &shape) return *this; } +ITensorInfo &TensorInfo::set_tensor_dims_state(const TensorDimsState &state) +{ + _dims_state = state; + return *this; +} + ITensorInfo &TensorInfo::set_quantization_info(const QuantizationInfo &quantization_info) { _quantization_info = quantization_info; |