aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/CL/kernels/CLScaleKernel.h
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2018-04-10 13:41:30 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:52:54 +0000
commit46da23fac3bba64f78f20192750aa094781efbb3 (patch)
tree929e8237c1efe2fcd93a4baf1b74e30383c54b4f /arm_compute/core/CL/kernels/CLScaleKernel.h
parentb940fd6a17b32ad87bdafc57adccb4433cf3fb75 (diff)
downloadComputeLibrary-46da23fac3bba64f78f20192750aa094781efbb3.tar.gz
COMPMID-813 Add NHWC data format support for CL scale
Change-Id: Ie218447c4f3f94a37b5dd2d3b33488c7f5869adf Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/128520 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'arm_compute/core/CL/kernels/CLScaleKernel.h')
-rw-r--r--arm_compute/core/CL/kernels/CLScaleKernel.h30
1 files changed, 22 insertions, 8 deletions
diff --git a/arm_compute/core/CL/kernels/CLScaleKernel.h b/arm_compute/core/CL/kernels/CLScaleKernel.h
index 3bca6efd0a..b089e8f61a 100644
--- a/arm_compute/core/CL/kernels/CLScaleKernel.h
+++ b/arm_compute/core/CL/kernels/CLScaleKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017 ARM Limited.
+ * Copyright (c) 2016-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -37,17 +37,31 @@ class CLScaleKernel : public ICLSimple2DKernel
public:
/** Initialise the kernel's inputs, output and interpolation policy
*
- * @param[in] input Source tensor. Data types supported: U8/S16/F16/F32
- * @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/F16/F32
+ * @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 Selected border mode.
+ * @param[in] sampling_policy (Optional) Sampling policy used by the interpolation. Defaults to @ref SamplingPolicy::CENTER
*/
- void configure(const ICLTensor *input, ICLTensor *output, InterpolationPolicy policy, bool border_undefined, SamplingPolicy sampling_policy = SamplingPolicy::CENTER);
+ void configure(const ICLTensor *input, ICLTensor *output, InterpolationPolicy policy, BorderMode border_mode, SamplingPolicy sampling_policy = SamplingPolicy::CENTER);
+
+ /** Static function to check if given info will lead to a valid configuration of @ref CLScaleKernel
+ *
+ * @param[in] input Source tensor info. Data types supported: U8/S16/F16/F32
+ * @param[in] output Destination tensor info. 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 Selected border mode.
+ * @param[in] sampling_policy (Optional) Sampling policy used by the interpolation. Defaults to @ref SamplingPolicy::CENTER
+ *
+ * @return a status
+ */
+ static Status validate(const ITensorInfo *input, const ITensorInfo *output, InterpolationPolicy policy, BorderMode border_mode, SamplingPolicy sampling_policy = SamplingPolicy::CENTER);
// Inherited methods overridden:
BorderSize border_size() const override;
+ void run(const Window &window, cl::CommandQueue &queue) override;
};
} // namespace arm_compute
#endif /*__ARM_COMPUTE_CLSCALEKERNEL_H__ */