aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/NEON/kernels/NEMinMaxLocationKernel.h
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2017-07-04 17:19:43 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:16:42 +0100
commitef4b4ae784f7533ed6d9e7b51827a894c32ed48e (patch)
tree6f4268044be18c003f5136b8ef7c7c07e219f2bd /arm_compute/core/NEON/kernels/NEMinMaxLocationKernel.h
parentf87cc7f6fef95f9b022725304118796a6a764a7c (diff)
downloadComputeLibrary-ef4b4ae784f7533ed6d9e7b51827a894c32ed48e.tar.gz
COMPMID-438: Add support for floating point Min-Max Location layer.
Change-Id: I84ae564a40fc7320a6f94a84d53906ba51404f51 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79797 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'arm_compute/core/NEON/kernels/NEMinMaxLocationKernel.h')
-rw-r--r--arm_compute/core/NEON/kernels/NEMinMaxLocationKernel.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/arm_compute/core/NEON/kernels/NEMinMaxLocationKernel.h b/arm_compute/core/NEON/kernels/NEMinMaxLocationKernel.h
index b5375f613b..7b2748deee 100644
--- a/arm_compute/core/NEON/kernels/NEMinMaxLocationKernel.h
+++ b/arm_compute/core/NEON/kernels/NEMinMaxLocationKernel.h
@@ -54,11 +54,11 @@ public:
/** Initialise the kernel's input and outputs.
*
- * @param[in] input Input Image. Data types supported: U8/S16.
- * @param[out] min Minimum value of image.
- * @param[out] max Maximum value of image.
+ * @param[in] input Input Image. Data types supported: U8/S16/F32.
+ * @param[out] min Minimum value of image. Data types supported: S32 if input type is U8/S16, F32 if input type is F32.
+ * @param[out] max Maximum value of image. Data types supported: S32 if input type is U8/S16, F32 if input type is F32.
*/
- void configure(const IImage *input, int32_t *min, int32_t *max);
+ void configure(const IImage *input, void *min, void *max);
/** Resets global minimum and maximum. */
void reset();
@@ -76,6 +76,11 @@ private:
* @param win The window to run the algorithm on.
*/
void minmax_S16(Window win);
+ /** Performs the min/max algorithm on F32 images on a given window.
+ *
+ * @param win The window to run the algorithm on.
+ */
+ void minmax_F32(Window win);
/** Common signature for all the specialised MinMax functions
*
* @param[in] window Region on which to execute the kernel.
@@ -87,12 +92,10 @@ private:
template <typename T>
void update_min_max(T min, T max);
- const IImage *_input; /**< Input image. */
- int32_t *_min; /**< Minimum value. */
- int32_t *_max; /**< Maximum value. */
- int32_t _min_init; /**< Value to initialise global minimum value. */
- int32_t _max_init; /**< Value to initialise global maximum value. */
- std::mutex _mtx; /**< Mutex used for result reduction. */
+ const IImage *_input; /**< Input image. */
+ void *_min; /**< Minimum value. */
+ void *_max; /**< Maximum value. */
+ std::mutex _mtx; /**< Mutex used for result reduction. */
};
/** Interface for the kernel to find min max locations of an image. */
@@ -114,15 +117,15 @@ public:
/** Initialise the kernel's input and outputs.
*
- * @param[in] input Input Image. Data types supported: U8 or S16.
- * @param[out] min Minimum value of image.
- * @param[out] max Maximum value of image.
+ * @param[in] input Input Image. Data types supported: U8/S16/F32.
+ * @param[out] min Minimum value of image. Data types supported: S32 if input type is U8/S16, F32 if input type is F32.
+ * @param[out] max Maximum value of image. Data types supported: S32 if input type is U8/S16, F32 if input type is F32.
* @param[out] min_loc Array of minimum value locations.
* @param[out] max_loc Array of maximum value locations.
* @param[out] min_count Number of minimum value encounters.
* @param[out] max_count Number of maximum value encounters.
*/
- void configure(const IImage *input, int32_t *min, int32_t *max,
+ void configure(const IImage *input, void *min, void *max,
ICoordinates2DArray *min_loc = nullptr, ICoordinates2DArray *max_loc = nullptr,
uint32_t *min_count = nullptr, uint32_t *max_count = nullptr);
@@ -149,8 +152,8 @@ private:
struct create_func_table;
const IImage *_input; /**< Input image. */
- int32_t *_min; /**< Minimum value. */
- int32_t *_max; /**< Maximum value. */
+ void *_min; /**< Minimum value. */
+ void *_max; /**< Maximum value. */
uint32_t *_min_count; /**< Count of minimum value encounters. */
uint32_t *_max_count; /**< Count of maximum value encounters. */
ICoordinates2DArray *_min_loc; /**< Locations of minimum values. */