21.02
|
#include <CpuElementwiseKernel.h>
Public Member Functions | |
CpuArithmeticKernel ()=default | |
Default constructor. More... | |
void | configure (ArithmeticOperation op, const ITensorInfo *input1, const ITensorInfo *input2, ITensorInfo *output) |
Configure kernel. More... | |
Public Member Functions inherited from CpuElementwiseKernel | |
const char * | name () const override |
Name of the kernel. More... | |
CpuElementwiseKernel ()=default | |
ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE (CpuElementwiseKernel) | |
void | run_op (ITensorPack &tensors, const Window &window, const ThreadInfo &info) override |
Execute the kernel on the passed window. More... | |
Public Member Functions inherited from ICPPKernel | |
virtual | ~ICPPKernel ()=default |
Default destructor. More... | |
virtual void | run (const Window &window, const ThreadInfo &info) |
Execute the kernel on the passed window. More... | |
virtual void | run_nd (const Window &window, const ThreadInfo &info, const Window &thread_locator) |
legacy compatibility layer for implemantions which do not support thread_locator In these cases we simply narrow the interface down the legacy version More... | |
Public Member Functions inherited from IKernel | |
IKernel () | |
Constructor. More... | |
virtual | ~IKernel ()=default |
Destructor. More... | |
virtual bool | is_parallelisable () const |
Indicates whether or not the kernel is parallelisable. More... | |
virtual BorderSize | border_size () const |
The size of the border for that kernel. More... | |
const Window & | window () const |
The maximum window the kernel can be executed on. More... | |
Static Public Member Functions | |
static Status | validate (ArithmeticOperation op, const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output) |
Static function to check if given info will lead to a valid configuration of cpu::kernels::CpuArithmeticKernel. More... | |
Additional Inherited Members | |
Public Types inherited from CpuElementwiseKernel | |
using | ElementwiseFunction = void(const ITensor *, const ITensor *, ITensor *, const Window &) |
Common signature for all the specialised arithmetic functions. More... | |
Definition at line 91 of file CpuElementwiseKernel.h.
|
default |
Default constructor.
void configure | ( | ArithmeticOperation | op, |
const ITensorInfo * | input1, | ||
const ITensorInfo * | input2, | ||
ITensorInfo * | output | ||
) |
Configure kernel.
Arithmetic operators (min, max, squared_diff)
[in] | op | Arithmetic operation to be executed. |
[in] | input1 | First tensor input info. Data types supported: QASYMM8/S16/F16/S32/F32. |
[in] | input2 | Second tensor input info. Data types supported: Same as input1 . |
[out] | output | Output tensor info. Data types supported: Same as input1 . |
Definition at line 213 of file CpuElementwiseKernel.cpp.
References ARM_COMPUTE_ERROR_THROW_ON, ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES, arm_compute::F16, arm_compute::F32, arm_compute::QASYMM8, arm_compute::QASYMM8_SIGNED, arm_compute::S16, arm_compute::S32, ITensorInfo::total_size(), and arm_compute::validate_arguments().
|
static |
Static function to check if given info will lead to a valid configuration of cpu::kernels::CpuArithmeticKernel.
[in] | op | Arithmetic operation to be executed. |
[in] | input1 | First tensor input info. Data types supported: QASYMM8/S16/F16/S32/F32. |
[in] | input2 | Second tensor input info. Data types supported: Same as input1 . |
[in] | output | Output tensor info. Data types supported: Same as input1 . |
Definition at line 231 of file CpuElementwiseKernel.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, ARM_COMPUTE_UNUSED, arm_compute::DIV, arm_compute::MAX, arm_compute::MIN, arm_compute::POWER, arm_compute::PRELU, arm_compute::SQUARED_DIFF, and arm_compute::validate_arguments().
Referenced by CpuElementwiseMax::validate(), NEPRelu::validate(), CpuElementwiseMin::validate(), and CpuElementwiseSquaredDiff::validate().