aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2017-06-27 11:41:59 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:15:39 +0100
commit4e288696a2ca8e1c9d6d37d90d237c1a18d6e364 (patch)
tree02c6792d1097fe84bb8c0fcee4c72d120ead6438 /arm_compute/core
parent3b77e9df5d2d33bda0500235d3f258f3197037de (diff)
downloadComputeLibrary-4e288696a2ca8e1c9d6d37d90d237c1a18d6e364.tar.gz
COMPMID-417 - Adding support for rectangular kernels
Change-Id: I4dde0929bc689c83582b95856dd0253228125df2 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78994 Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/core')
-rw-r--r--arm_compute/core/Types.h28
-rw-r--r--arm_compute/core/Utils.h20
2 files changed, 27 insertions, 21 deletions
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index 725567b9ae..b7a30a5634 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -563,32 +563,42 @@ private:
class WeightsInfo
{
public:
+ /** Default constructor */
WeightsInfo()
- : _are_reshaped(false), _kernel_size(0)
+ : _are_reshaped(false), _kernel_width(0), _kernel_height(0)
{
}
/** Constructor
*
- * @param[in] are_reshaped True if the weights have been reshaped
- * @param[in] kernel_size The size of the kernel.
+ * @param[in] are_reshaped True if the weights have been reshaped
+ * @param[in] kernel_width Kernel width.
+ * @param[in] kernel_height Kernel height.
*/
- WeightsInfo(bool are_reshaped, unsigned int kernel_size)
- : _are_reshaped(are_reshaped), _kernel_size(kernel_size)
+ WeightsInfo(bool are_reshaped, unsigned int kernel_width, unsigned int kernel_height)
+ : _are_reshaped(are_reshaped), _kernel_width(kernel_width), _kernel_height(kernel_height)
{
}
-
+ /** Flag which specifies if the weights tensor has been reshaped.
+ *
+ * @return True if the weights tensors has been reshaped
+ */
bool are_reshaped() const
{
return _are_reshaped;
};
- unsigned int kernel_size() const
+ /** Return the width and height of the kernel
+ *
+ * @return The width and height of the kernel
+ */
+ std::pair<unsigned int, unsigned int> kernel_size() const
{
- return _kernel_size;
+ return std::make_pair(_kernel_width, _kernel_height);
}
private:
const bool _are_reshaped;
- const unsigned int _kernel_size;
+ const unsigned int _kernel_width;
+ const unsigned int _kernel_height;
};
/** IO formatting information class*/
diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h
index 9d3ff0a1bd..c2f0e3982a 100644
--- a/arm_compute/core/Utils.h
+++ b/arm_compute/core/Utils.h
@@ -542,21 +542,17 @@ inline DataType data_type_for_convolution_matrix(const int16_t *conv, size_t siz
/** Returns expected width and height of output scaled tensor depending on dimensions rounding mode.
*
- * @param[in] width Width of input tensor (Number of columns)
- * @param[in] height Height of input tensor (Number of rows)
- * @param[in] kernel_size Kernel size.
- * @param[in] stride_x Stride of the operation in the x dimension.
- * @param[in] stride_y Stride of the operation in the y dimension.
- * @param[in] pad_x Padding size in the x dimension.
- * @param[in] pad_y Padding size in the y dimension.
- * @param[in] round_type Dimensions rounding mode.
+ * @param[in] width Width of input tensor (Number of columns)
+ * @param[in] height Height of input tensor (Number of rows)
+ * @param[in] kernel_width Kernel width.
+ * @param[in] kernel_height Kernel height.
+ * @param[in] pad_stride_info Pad and stride information.
*
* @return A pair with the new width in the first position and the new height in the second.
*/
-const std::pair<unsigned int, unsigned int> scaled_dimensions(unsigned int width, unsigned int height, unsigned int kernel_size,
- unsigned int stride_x, unsigned int stride_y,
- unsigned int pad_x, unsigned int pad_y,
- DimensionRoundingType round_type);
+const std::pair<unsigned int, unsigned int> scaled_dimensions(unsigned int width, unsigned int height,
+ unsigned int kernel_width, unsigned int kernel_height,
+ const PadStrideInfo &pad_stride_info);
/** Convert a tensor format into a string.
*