diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-12-19 16:23:17 +0000 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-01-14 16:26:50 +0000 |
commit | dea2d2d58fe3a742e6f66fe50befbe0044e15ad1 (patch) | |
tree | 87c30d892f45b8cc2de5fdb2c825d9ff05de7fae /arm_compute/core/utils/misc | |
parent | 053e7510f24c2b02f9fae9c45fb6b874631a5376 (diff) | |
download | ComputeLibrary-dea2d2d58fe3a742e6f66fe50befbe0044e15ad1.tar.gz |
COMPMID-1772: Implement PadV2 for NEON
Change-Id: Ia4604524a034c46b004fd850183480c5fbfd8cb3
Reviewed-on: https://review.mlplatform.org/437
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Diffstat (limited to 'arm_compute/core/utils/misc')
-rw-r--r-- | arm_compute/core/utils/misc/ShapeCalculator.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arm_compute/core/utils/misc/ShapeCalculator.h b/arm_compute/core/utils/misc/ShapeCalculator.h index 619234d306..f8a6df7fe7 100644 --- a/arm_compute/core/utils/misc/ShapeCalculator.h +++ b/arm_compute/core/utils/misc/ShapeCalculator.h @@ -1011,7 +1011,9 @@ inline TensorShape compute_padded_shape(const TensorShape &input_shape, const Pa TensorShape padded_shape = input_shape; for(size_t dim = 0; dim < padding.size(); ++dim) { - padded_shape.set(dim, padding[dim].first + input_shape[dim] + padding[dim].second); + const auto &padding_pair = padding[dim]; + const uint32_t shape_on_index = (padded_shape.num_dimensions() <= dim) ? 1 : input_shape[dim]; + padded_shape.set(dim, padding_pair.first + shape_on_index + padding_pair.second); } return padded_shape; } |