diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2017-06-22 12:57:51 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | bbd9fb95daa08d6da67c567b40ca2cd032f7a2d3 (patch) | |
tree | c1401585f64396d6f22bb790442d8183f3a17a9e /tests/Utils.h | |
parent | 2eac5bd444d16e4e81c427d5a99e1534b387e211 (diff) | |
download | ComputeLibrary-bbd9fb95daa08d6da67c567b40ca2cd032f7a2d3.tar.gz |
COMPMID-412: Port PoolingLayer to use fixed point 16.
Change-Id: I2005de4c7c14526996309826d33a0ec8e732d2d5
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78720
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Steven Niu <steven.niu@arm.com>
Diffstat (limited to 'tests/Utils.h')
-rw-r--r-- | tests/Utils.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/Utils.h b/tests/Utils.h index 389c9806bb..06d27b87fa 100644 --- a/tests/Utils.h +++ b/tests/Utils.h @@ -198,8 +198,11 @@ inline ValidRegion shape_to_valid_region(TensorShape shape, bool border_undefine ARM_COMPUTE_ERROR_ON(shape.num_dimensions() < 2); anchor.set(0, border_size.left); anchor.set(1, border_size.top); - shape.set(0, shape.x() - border_size.left - border_size.right); - shape.set(1, shape.y() - border_size.top - border_size.bottom); + const int x_dim_shape = shape.x() - border_size.left - border_size.right; + const int y_dim_shape = shape.y() - border_size.top - border_size.bottom; + ARM_COMPUTE_ERROR_ON(x_dim_shape < 0 || y_dim_shape < 0); + shape.set(0, x_dim_shape); + shape.set(1, y_dim_shape); } return ValidRegion(std::move(anchor), std::move(shape)); } |