aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/NEON/kernels/NEScaleKernel.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-05-08 15:54:53 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:52:19 +0000
commit393fa4c87c84356132303170d1b9ce9a45b3c3bf (patch)
treeb5d5a7ca835d625b5afd56155be8ad9de7ab6575 /arm_compute/core/NEON/kernels/NEScaleKernel.h
parent1731d5133f1b081fc669d082ae8c3e744d36ab11 (diff)
downloadComputeLibrary-393fa4c87c84356132303170d1b9ce9a45b3c3bf.tar.gz
COMPMID-814: NEScale NHWC support
Change-Id: Ibf5c624a5c5482faa42eb02bc8abe9ae0d65b0d1 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/130608 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'arm_compute/core/NEON/kernels/NEScaleKernel.h')
-rw-r--r--arm_compute/core/NEON/kernels/NEScaleKernel.h41
1 files changed, 23 insertions, 18 deletions
diff --git a/arm_compute/core/NEON/kernels/NEScaleKernel.h b/arm_compute/core/NEON/kernels/NEScaleKernel.h
index eb47409692..0a3a952537 100644
--- a/arm_compute/core/NEON/kernels/NEScaleKernel.h
+++ b/arm_compute/core/NEON/kernels/NEScaleKernel.h
@@ -56,17 +56,17 @@ public:
*
* @note dx, dy and offsets have the same dimensions (width and height) of the output tensor
*
- * @param[in] input Source tensor. Data types supported: U8/S16/F32.
- * @param[in] dx Pixel's distance between the X real coordinate and the smallest X following integer. Data type supported: F32
- * @param[in] dy Pixel's distance between the Y real coordinate and the smallest Y following integer. Data type supported: F32
- * @param[in] offsets Offset to access the pixel with NEAREST interpolation or the top-left pixel with BILINEAR interpolation in the input tensor. Data type supported: S32.
- * @param[out] output Destination tensor. Data types supported: Same as @p input. All but the lowest two dimensions must be the same size as in the input tensor, i.e. scaling is only performed within the XY-plane.
- * @param[in] policy Interpolation type to use
- * @param[in] border_undefined True if the border mode is undefined. False if it's replicate or constant.
- * @param[in] sampling_policy (Optional) Sampling policy used by the interpolation. Defaults to @ref SamplingPolicy::CENTER
+ * @param[in] input Source tensor. Data types supported: U8/S16/F32.
+ * @param[in] dx Pixel's distance between the X real coordinate and the smallest X following integer. Data type supported: F32
+ * @param[in] dy Pixel's distance between the Y real coordinate and the smallest Y following integer. Data type supported: F32
+ * @param[in] offsets Offset to access the pixel with NEAREST interpolation or the top-left pixel with BILINEAR interpolation in the input tensor. Data type supported: S32.
+ * @param[out] output Destination tensor. Data types supported: Same as @p input. All but the lowest two dimensions must be the same size as in the input tensor, i.e. scaling is only performed within the XY-plane.
+ * @param[in] policy Interpolation type to use
+ * @param[in] border_mode Border mode policy
+ * @param[in] sampling_policy (Optional) Sampling policy used by the interpolation. Defaults to @ref SamplingPolicy::CENTER
*/
- void configure(const ITensor *input, const ITensor *dx, const ITensor *dy, const ITensor *offsets, ITensor *output, InterpolationPolicy policy, bool border_undefined,
- SamplingPolicy sampling_policy = SamplingPolicy::CENTER);
+ void configure(const ITensor *input, const ITensor *dx, const ITensor *dy, const ITensor *offsets, ITensor *output,
+ InterpolationPolicy policy, BorderMode border_mode, SamplingPolicy sampling_policy = SamplingPolicy::CENTER);
// Inherited methods overridden:
void run(const Window &window, const ThreadInfo &info) override;
@@ -74,22 +74,27 @@ public:
private:
/** function to perform scale using nearest interpolation on the given window */
- void scale_nearest(const Window &window);
+ void scale_nearest_nchw(const Window &window);
/** function to perform scale using bilinear interpolation on the given window */
- void scale_bilinear(const Window &window);
+ void scale_bilinear_nchw(const Window &window);
/** function to perform scale using area interpolation on the given window
*
* @note Used only in case down-sampling.
*/
- void scale_area(const Window &window);
+ void scale_area_nchw(const Window &window);
+ /** function to perform scale on the given window */
+ void scale_nhwc(const Window &window);
/** Scale function to use for the particular interpolation type passed to configure() */
void (NEScaleKernel::*_func)(const Window &window);
- const ITensor *_offsets;
- const ITensor *_dx;
- const ITensor *_dy;
- const ITensor *_input;
- ITensor *_output;
+ const ITensor *_offsets;
+ const ITensor *_dx;
+ const ITensor *_dy;
+ const ITensor *_input;
+ ITensor *_output;
+ InterpolationPolicy _policy;
+ BorderSize _border_size;
+ BorderMode _border_mode;
};
} // namespace arm_compute
#endif /*__ARM_COMPUTE_NESCALEKERNEL_H__ */