aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/NEON
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2020-07-02 17:39:25 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2020-07-07 09:14:00 +0000
commit6eb73458c4869165c88d33c6a745a91cdc73a36a (patch)
tree1f22bd141f420ad4e2906939bb4abf11fec3aea3 /arm_compute/core/NEON
parent1fad814022ba98506ba30b2e25601985e7ec5259 (diff)
downloadComputeLibrary-6eb73458c4869165c88d33c6a745a91cdc73a36a.tar.gz
COMPMID-3373: Async support to NEArithmetic* kernels/functions (Pt. 2)
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Change-Id: Iec06adb535aaf7efb1838d921e8d6bb978b7b215 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3498 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/NEON')
-rw-r--r--arm_compute/core/NEON/kernels/NEPixelWiseMultiplicationKernel.h33
1 files changed, 7 insertions, 26 deletions
diff --git a/arm_compute/core/NEON/kernels/NEPixelWiseMultiplicationKernel.h b/arm_compute/core/NEON/kernels/NEPixelWiseMultiplicationKernel.h
index 3cb0874a2f..5483fae565 100644
--- a/arm_compute/core/NEON/kernels/NEPixelWiseMultiplicationKernel.h
+++ b/arm_compute/core/NEON/kernels/NEPixelWiseMultiplicationKernel.h
@@ -72,7 +72,7 @@ public:
* @param[in] overflow_policy Overflow policy. ConvertPolicy cannot be WRAP if datatype is QASYMM8, QASYMM8_SIGNED or QSYMM16.
* @param[in] rounding_policy Rounding policy.
*/
- void configure(const ITensor *input1, const ITensor *input2, ITensor *output, float scale, ConvertPolicy overflow_policy, RoundingPolicy rounding_policy);
+ void configure(ITensorInfo *input1, ITensorInfo *input2, ITensorInfo *output, float scale, ConvertPolicy overflow_policy, RoundingPolicy rounding_policy);
/** Static function to check if given info will lead to a valid configuration of @ref NEPixelWiseMultiplicationKernel
*
* @note For @p scale equal to 1/255 only round to nearest even (implemented as round half up) is supported.
@@ -98,8 +98,8 @@ public:
*/
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, float scale, ConvertPolicy overflow_policy, RoundingPolicy rounding_policy);
- // Inherited methods overridden:
- void run(const Window &window, const ThreadInfo &info) override;
+ // Inherited methods overridden
+ void run_op(const InputTensorMap &inputs, const OutputTensorMap &outputs, const Window &window, const ThreadInfo &info) override;
private:
/** Common signature for all the specialised multiplication functions with integer scaling factor
@@ -136,11 +136,8 @@ private:
MulFunctionQuantized *_func_quantized;
private:
- const ITensor *_input1;
- const ITensor *_input2;
- ITensor *_output;
- float _scale;
- int _scale_exponent;
+ float _scale;
+ int _scale_exponent;
};
/** Interface for the complex pixelwise multiplication kernel. */
@@ -151,23 +148,13 @@ public:
{
return "NEComplexPixelWiseMultiplicationKernel";
}
- /** Default constructor.*/
- NEComplexPixelWiseMultiplicationKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- NEComplexPixelWiseMultiplicationKernel(const NEComplexPixelWiseMultiplicationKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- NEComplexPixelWiseMultiplicationKernel &operator=(const NEComplexPixelWiseMultiplicationKernel &) = delete;
- /** Allow instances of this class to be moved */
- NEComplexPixelWiseMultiplicationKernel(NEComplexPixelWiseMultiplicationKernel &&) = default;
- /** Allow instances of this class to be moved */
- NEComplexPixelWiseMultiplicationKernel &operator=(NEComplexPixelWiseMultiplicationKernel &&) = default;
/** Initialise the kernel's input, output and border mode.
*
* @param[in] input1 An input tensor. Data types supported: F32. Number of channels supported: 2 (complex tensor).
* @param[in] input2 An input tensor. Data types supported: same as @p input1. Number of channels supported: same as @p input1.
* @param[out] output The output tensor, Data types supported: same as @p input1. Number of channels supported: same as @p input1.
*/
- void configure(const ITensor *input1, const ITensor *input2, ITensor *output);
+ void configure(ITensorInfo *input1, ITensorInfo *input2, ITensorInfo *output);
/** Static function to check if given info will lead to a valid configuration of @ref NEComplexPixelWiseMultiplicationKernel
*
* @param[in] input1 An input tensor info. Data types supported: F32. Number of channels supported: 2 (complex tensor).
@@ -179,13 +166,7 @@ public:
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output);
// Inherited methods overridden:
- void run(const Window &window, const ThreadInfo &info) override;
- BorderSize border_size() const override;
-
-private:
- const ITensor *_input1;
- const ITensor *_input2;
- ITensor *_output;
+ void run_op(const InputTensorMap &inputs, const OutputTensorMap &outputs, const Window &window, const ThreadInfo &info) override;
};
} // namespace arm_compute