aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/NEElementwiseUnaryKernel.h
diff options
context:
space:
mode:
authorSang-Hoon Park <sang-hoon.park@arm.com>2020-12-08 18:50:56 +0000
committerSang-Hoon Park <sang-hoon.park@arm.com>2021-01-07 13:11:57 +0000
commitaf1870b38bd4f86ccbb4152a506586afd6c64e02 (patch)
tree75e99bdda471dd44b986c689b6bd5799bc36b0d8 /src/core/NEON/kernels/NEElementwiseUnaryKernel.h
parent7e5b7bfc06c0bd8aecd809817866733c4fdf07fe (diff)
downloadComputeLibrary-af1870b38bd4f86ccbb4152a506586afd6c64e02.tar.gz
Add SVE support to elementwise unary kernels
It also includes decoupling of kernels using different data types. Partially implements: COMPMID-3872 Change-Id: I226cb9e55a5d9f8a0c63e37631f087af45f2d640 Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4711 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/NEElementwiseUnaryKernel.h')
-rw-r--r--src/core/NEON/kernels/NEElementwiseUnaryKernel.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/core/NEON/kernels/NEElementwiseUnaryKernel.h b/src/core/NEON/kernels/NEElementwiseUnaryKernel.h
index fcf0aa51c5..b248e821c3 100644
--- a/src/core/NEON/kernels/NEElementwiseUnaryKernel.h
+++ b/src/core/NEON/kernels/NEElementwiseUnaryKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020 Arm Limited.
+ * Copyright (c) 2018-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -78,26 +78,17 @@ public:
// Inherited methods overridden:
void run(const Window &window, const ThreadInfo &info) override;
-private:
- /** Common signature for all the specialised arithmetic functions
+ /** Common signature for all the specialised elementwise unary micro-kernels
*
* @param[in] window Region on which to execute the kernel.
*/
- using ElementwiseUnaryPtr = void (NEElementwiseUnaryKernel::*)(const Window &window);
-
- /** Template function to run elementwise unary operation
- *
- * @tparam ScalarType Scalar datatype
- *
- * @param[in] window Region on which to execute the kernel. (Must be a valid region of the window returned by window()).
- */
- template <typename ScalarType>
- void elementwise_op(const Window &window);
+ using ElementwiseUnaryUkernelPtr = std::add_pointer<void(const ITensor *, ITensor *, const Window &, ElementWiseUnary)>::type;
- ElementwiseUnaryPtr _func;
- const ITensor *_input;
- ITensor *_output;
- ElementWiseUnary _op;
+private:
+ ElementwiseUnaryUkernelPtr _func;
+ const ITensor *_input;
+ ITensor *_output;
+ ElementWiseUnary _op;
};
} // namespace arm_compute
#endif /* ARM_COMPUTE_NEELEMENTWISEUNARYKERNEL_H */