diff options
Diffstat (limited to 'arm_compute/core/utils/misc/ShapeCalculator.h')
-rw-r--r-- | arm_compute/core/utils/misc/ShapeCalculator.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arm_compute/core/utils/misc/ShapeCalculator.h b/arm_compute/core/utils/misc/ShapeCalculator.h index e0b6ce639f..1a86d27727 100644 --- a/arm_compute/core/utils/misc/ShapeCalculator.h +++ b/arm_compute/core/utils/misc/ShapeCalculator.h @@ -433,7 +433,6 @@ inline TensorShape compute_mm_shape(const ITensorInfo &input0, const ITensorInfo return output_shape; } - inline TensorShape compute_strided_slice_shape(const ITensorInfo &input, const Coordinates &starts, const Coordinates &ends, const Coordinates &strides, int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask) @@ -449,6 +448,16 @@ inline TensorShape compute_strided_slice_shape(const ITensorInfo &input, return compute_strided_slice_output_shape(input_shape, starts_abs, ends_abs, final_strides); } +inline TensorShape compute_batch_to_space_shape(const ITensorInfo *input, const int block_x, const int block_y) +{ + ARM_COMPUTE_ERROR_ON(block_x <= 0 || block_y <= 0); + TensorShape output_shape{ input->tensor_shape() }; + output_shape.set(0, input->tensor_shape()[0] * block_x); + output_shape.set(1, input->tensor_shape()[1] * block_y); + output_shape.set(3, input->tensor_shape()[3] / (block_x * block_y)); + + return output_shape; +} template <typename T> inline TensorShape extract_shape(T *data) |