diff options
Diffstat (limited to 'arm_compute/core/utils')
-rw-r--r-- | arm_compute/core/utils/misc/ShapeCalculator.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arm_compute/core/utils/misc/ShapeCalculator.h b/arm_compute/core/utils/misc/ShapeCalculator.h index 4ae97f7c1f..2db7b28161 100644 --- a/arm_compute/core/utils/misc/ShapeCalculator.h +++ b/arm_compute/core/utils/misc/ShapeCalculator.h @@ -573,6 +573,16 @@ inline TensorShape compute_space_to_batch_shape(const ITensorInfo *input, const return output_shape; } +inline TensorShape compute_padded_shape(const TensorShape &input_shape, const PaddingList &padding) +{ + 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); + } + return padded_shape; +} + template <typename T> inline TensorShape extract_shape(T *data) { |