diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2018-08-31 10:07:09 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | 6a8d3b6db13042a859972c33cf40cfeb6d7cfcda (patch) | |
tree | de26f019f708b4cc7bffe9616f04ed43db1260ff /arm_compute/core/utils | |
parent | da19dab20191b86a97b0f925183088712445b39f (diff) | |
download | ComputeLibrary-6a8d3b6db13042a859972c33cf40cfeb6d7cfcda.tar.gz |
COMPMID-1218 Implementing Batch to Space on OpenCL
Change-Id: I12ba4c0c35f086ea3f395970b85af5bf8f94850b
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/145052
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/utils')
-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) |