24.02.1
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_CPU_ELEMENTWISE_KERNEL_H
25 #define ARM_COMPUTE_CPU_ELEMENTWISE_KERNEL_H
42 template <
class Derived>
46 using ElementwiseKernelPtr =
57 const char *
name()
const override;
76 ElementwiseKernelPtr _run_method{
nullptr};
103 static const std::vector<CpuElementwiseKernel<CpuArithmeticKernel>::ElementwiseKernel> &
get_available_kernels();
112 size_t get_mws(
const CPUInfo &platform,
size_t thread_count)
const override;
152 size_t get_mws(
const CPUInfo &platform,
size_t thread_count)
const override;
208 static const std::vector<CpuElementwiseKernel<CpuComparisonKernel>::ElementwiseKernel> &
get_available_kernels();
const char * name() const override
Name of the kernel.
decltype(strategy::transforms) typedef type
CpuElementwiseKernel()=default
CpuDivisionKernel()=default
static Status validate(ArithmeticOperation op, const ITensorInfo *src0, const ITensorInfo *src1, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
static Status validate(ComparisonOperation op, const ITensorInfo *src0, const ITensorInfo *src1, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
void configure(ComparisonOperation op, const ITensorInfo *src0, const ITensorInfo *src1, ITensorInfo *dst)
Configure kernel.
Interface for CPU tensor.
ComparisonOperation
Supported comparison operations.
static const std::vector< CpuElementwiseKernel< CpuComparisonKernel >::ElementwiseKernel > & get_available_kernels()
static Status validate(const ITensorInfo *src0, const ITensorInfo *src1, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
static Status validate(const ITensorInfo *src0, const ITensorInfo *src1, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE(CpuElementwiseKernel)
CpuArithmeticKernel()=default
const Window & window() const
The maximum window the kernel can be executed on.
void(const ITensor *, const ITensor *, ITensor *, const Window &) ElementwiseFunction
Information about executing thread and CPU.
size_t get_mws(const CPUInfo &platform, size_t thread_count) const override
Return minimum workload size of the relevant kernel.
Describe a multidimensional execution window.
static const std::vector< CpuElementwiseKernel< CpuArithmeticKernel >::ElementwiseKernel > & get_available_kernels()
void configure(const ITensorInfo *src0, const ITensorInfo *src1, ITensorInfo *dst)
Configure kernel.
size_t get_mws(const CPUInfo &platform, size_t thread_count) const override
Return minimum workload size of the relevant kernel.
Copyright (c) 2017-2024 Arm Limited.
ElementwiseKernelPtr ukernel
CpuComparisonKernel()=default
void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) override
Execute the kernel on the passed window.
Interface for an element-wise operation kernel.
void configure(const ITensorInfo *src0, const ITensorInfo *src1, ITensorInfo *dst)
Configure kernel.
Store the tensor's metadata.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
const ElementwiseDataTypeISASelectorPtr is_selected
void configure(ArithmeticOperation op, const ITensorInfo *src0, const ITensorInfo *src1, ITensorInfo *dst)
Configure kernel.
std::add_pointer< bool(const ElementwiseDataTypeISASelectorData &data)>::type ElementwiseDataTypeISASelectorPtr
ArithmeticOperation
Available element-wise operations.