| 155 | } |
| 156 | |
| 157 | bool SubTensorInfo::extend_padding(const PaddingSize &padding) |
| 158 | { |
| 159 | ARM_COMPUTE_ERROR_ON(_lock_paddings); |
| 160 | ARM_COMPUTE_ERROR_ON(_parent == nullptr); |
| 161 | ARM_COMPUTE_ERROR_ON(!_parent->is_resizable()); |
| 162 | ARM_COMPUTE_ERROR_ON(_parent->total_size() == 0); |
| 163 | |
| 164 | // Check that you do not extend padding on sub-tensors unless XY shape matches parent tensor |
| 165 | if (!_extend_parent && (padding.left || padding.right)) |
| 166 | { |
| 167 | ARM_COMPUTE_ERROR_ON(_parent->tensor_shape().x() != tensor_shape().x()); |
| 168 | } |
| 169 | if (!_extend_parent && (padding.top || padding.bottom)) |
| 170 | { |
| 171 | ARM_COMPUTE_ERROR_ON(_parent->tensor_shape().y() != tensor_shape().y()); |
| 172 | } |
| 173 | |
| 174 | // Extend parent padding if required |
| 175 | return _parent->extend_padding(padding); |
| 176 | } |
| 177 | |
| 178 | int32_t SubTensorInfo::offset_element_in_bytes(const Coordinates &pos) const |
| 179 | { |
nothing calls this directly
no test coverage detected