From 7b7858df42fccefbe6eb086ad516d5c011becd07 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 21 Jun 2017 16:44:24 +0100 Subject: COMPMID-359: Implement NEON ROIPoolingLayer Change-Id: Ibffa738d4016d7221968bd43a4e6e1dab85baee8 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78623 Reviewed-by: Moritz Pflanzer Reviewed-by: Gian Marco Iodice Tested-by: Kaizen --- arm_compute/core/Types.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'arm_compute/core/Types.h') diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h index b7a30a5634..2bd449c5c6 100644 --- a/arm_compute/core/Types.h +++ b/arm_compute/core/Types.h @@ -300,6 +300,13 @@ struct Coordinates3D uint32_t z; /**< Z coordinates */ }; +/** Region of interest */ +struct ROI +{ + Rectangle rect; /**< Rectangle specifying the region of interest */ + uint16_t batch_idx; /**< The batch index of the region of interest */ +}; + /** Available channels */ enum class Channel { @@ -454,6 +461,39 @@ private: PadStrideInfo _pad_stride_info; }; +/** ROI Pooling Layer Information class */ +class ROIPoolingLayerInfo +{ +public: + /** Default Constructor + * + * @param[in] pooled_width Pooled width of the layer. + * @param[in] pooled_height Pooled height of the layer. + * @param[in] spatial_scale Spatial scale to be applied to the ROI coordinates and dimensions. + */ + ROIPoolingLayerInfo(unsigned int pooled_width, unsigned int pooled_height, float spatial_scale) + : _pooled_width(pooled_width), _pooled_height(pooled_height), _spatial_scale(spatial_scale) + { + } + unsigned int pooled_width() const + { + return _pooled_width; + } + unsigned int pooled_height() const + { + return _pooled_height; + } + float spatial_scale() const + { + return _spatial_scale; + } + +private: + unsigned int _pooled_width; + unsigned int _pooled_height; + float _spatial_scale; +}; + /** Activation Layer Information class */ class ActivationLayerInfo { -- cgit v1.2.1