aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Types.h
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-02-16 15:17:48 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:47:18 +0000
commit21f67d6763c82d78278f6bca6c6f9e42bb5ee1b9 (patch)
treebc02a622f78ebec4b50b51708c94404ab0bef724 /arm_compute/core/Types.h
parent7567f5f1919f69ea00c2cd5bdca65b67dfe6b388 (diff)
downloadComputeLibrary-21f67d6763c82d78278f6bca6c6f9e42bb5ee1b9.tar.gz
COMPMID-934: Return an error in Validate when we don't support asymmetric padding
Currently an assert gets fired in debug mode, and we just ignore the asymmetric padding in release mode. Change-Id: Ia6278b5722f7e93f356a975ab3243e6bb07e44a8 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/120840 Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com> Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/core/Types.h')
-rw-r--r--arm_compute/core/Types.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index 3affe7e8ec..417369cd9b 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -536,10 +536,14 @@ public:
{
return _stride;
}
+ bool padding_is_symmetric() const
+ {
+ return (_pad_left == _pad_right) && (_pad_top == _pad_bottom);
+ }
std::pair<unsigned int, unsigned int> pad() const
{
//this accessor should be used only when padding is symmetric
- ARM_COMPUTE_ERROR_ON(_pad_left != _pad_right || _pad_top != _pad_bottom);
+ ARM_COMPUTE_ERROR_ON(!padding_is_symmetric());
return std::make_pair(_pad_left, _pad_top);
}