aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/kernels/CpuAddKernel.h
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2021-11-18 18:02:13 +0000
committerYair Schwarzbaum <yair.schwarzbaum@arm.com>2022-01-12 06:52:04 +0000
commit5ae8d804d67f57fbfa793800ddcc21a5aff954dd (patch)
tree1defbe7f788645f6f0fb4c3f79be6c4b8ecfb709 /src/cpu/kernels/CpuAddKernel.h
parent3475ffe40b7db99c782cbaf351aa7b4e341562ef (diff)
downloadComputeLibrary-5ae8d804d67f57fbfa793800ddcc21a5aff954dd.tar.gz
Enable kernel selection testing (Phase #1)
Change-Id: I1d65fb9d3a7583cf8d4163ca7c0fbee27dc52633 Signed-off-by: Yair Schwarzbaum <yair.schwarzbaum@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6767 Reviewed-by: Giorgio Arena <giorgio.arena@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/cpu/kernels/CpuAddKernel.h')
-rw-r--r--src/cpu/kernels/CpuAddKernel.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/cpu/kernels/CpuAddKernel.h b/src/cpu/kernels/CpuAddKernel.h
index a0c7e497dd..93b86de4ae 100644
--- a/src/cpu/kernels/CpuAddKernel.h
+++ b/src/cpu/kernels/CpuAddKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2021 Arm Limited.
+ * Copyright (c) 2016-2022 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -34,9 +34,19 @@ namespace cpu
namespace kernels
{
/** Interface for the kernel to perform addition between two tensors */
-class CpuAddKernel : public ICpuKernel
+class CpuAddKernel : public NewICpuKernel<CpuAddKernel>
{
+private:
+ using AddKernelPtr = std::add_pointer<void(const ITensor *, const ITensor *, ITensor *, const ConvertPolicy &, const Window &)>::type;
+
public:
+ struct AddKernel
+ {
+ const char *name;
+ const DataTypeISASelectorPtr is_selected;
+ AddKernelPtr ukernel;
+ };
+
CpuAddKernel() = default;
ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE(CpuAddKernel);
/** Initialise the kernel's input, dst and border mode.
@@ -79,8 +89,7 @@ public:
*/
size_t get_mws(const CPUInfo &platform, size_t thread_count) const override;
-private:
- using AddKernelPtr = std::add_pointer<void(const ITensor *, const ITensor *, ITensor *, const ConvertPolicy &, const Window &)>::type;
+ static const std::vector<AddKernel> &get_available_kernels();
private:
ConvertPolicy _policy{};