aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Window.h
diff options
context:
space:
mode:
authorSang-Hoon Park <sang-hoon.park@arm.com>2019-09-17 08:59:09 +0100
committerSiCongLi <sicong.li@arm.com>2019-12-11 17:05:24 +0000
commite6c3344f2a76b0724172200b1d5a443393045336 (patch)
tree8cfa3fb5ed70ab226b35a09f38b3ffaf226bba98 /arm_compute/core/Window.h
parent35c3eb011d8e2813d83c6a6cbe28a446534e4a14 (diff)
downloadComputeLibrary-e6c3344f2a76b0724172200b1d5a443393045336.tar.gz
COMPMID-2637 [CL] fix broadcast pixel-wise multiplication with 5D tensors
Broadcast pixel-wise multiplication with 5D tensors is fixed by adding information whether a dimension has been broadcasted to compute correct start offset when adding 3D tensor argument. The testcase that failed is added to the validation test suite. Change-Id: I320876f507012c27b39daae1316f9b69138ed204 Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com> Reviewed-on: https://review.mlplatform.org/c/1994 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/core/Window.h')
-rw-r--r--arm_compute/core/Window.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/arm_compute/core/Window.h b/arm_compute/core/Window.h
index a56227996b..be42fe9a87 100644
--- a/arm_compute/core/Window.h
+++ b/arm_compute/core/Window.h
@@ -48,7 +48,7 @@ public:
/** Default constructor: create a window containing a single element. */
constexpr Window()
- : _dims()
+ : _dims(), _is_broadcasted(utility::generate_array<bool, Coordinates::num_max_dimensions, false>::value)
{
}
/** Copy constructor
@@ -170,6 +170,20 @@ public:
*/
void set(size_t dimension, const Dimension &dim);
+ /** Set the dimension as broadcasted dimension
+ *
+ * @param[in] dimension The dimension to set
+ */
+ void set_broadcasted(size_t dimension);
+
+ /** Return whether a dimension has been broadcasted
+ *
+ * @param[in] dimension The requested dimension
+ *
+ * @return true if the dimension has been broadcasted
+ */
+ bool is_broadcasted(size_t dimension) const;
+
/** Use the tensor's dimensions to fill the window dimensions.
*
* @param[in] shape @ref TensorShape to copy the dimensions from.
@@ -419,6 +433,7 @@ private:
private:
std::array<Dimension, Coordinates::num_max_dimensions> _dims;
+ std::array<bool, Coordinates::num_max_dimensions> _is_broadcasted;
};
} // namespace arm_compute
#include "Window.inl"