23.11
|
Go to the documentation of this file.
35 struct NEElementwiseMax::Impl
37 const ITensor *src_0{
nullptr};
38 const ITensor *src_1{
nullptr};
39 ITensor *
dst{
nullptr};
40 std::unique_ptr<cpu::CpuElementwiseMax> op{
nullptr};
53 _impl->src_0 = input1;
54 _impl->src_1 = input2;
56 _impl->op = std::make_unique<cpu::CpuElementwiseMax>();
57 _impl->op->configure(input1->
info(), input2->
info(), output->
info());
78 struct NEElementwiseMin::Impl
81 const ITensor *src_1{
nullptr};
82 ITensor *
dst{
nullptr};
83 std::unique_ptr<cpu::CpuElementwiseMin> op{
nullptr};
96 _impl->src_0 = input1;
97 _impl->src_1 = input2;
99 _impl->op = std::make_unique<cpu::CpuElementwiseMin>();
100 _impl->op->configure(input1->
info(), input2->
info(), output->
info());
118 _impl->op->run(
pack);
121 struct NEElementwiseSquaredDiff::Impl
124 const ITensor *src_1{
nullptr};
125 ITensor *
dst{
nullptr};
126 std::unique_ptr<cpu::CpuElementwiseSquaredDiff> op{
nullptr};
142 _impl->src_0 = input1;
143 _impl->src_1 = input2;
145 _impl->op = std::make_unique<cpu::CpuElementwiseSquaredDiff>();
146 _impl->op->configure(input1->
info(), input2->
info(), output->
info());
164 _impl->op->run(
pack);
167 struct NEElementwiseDivision::Impl
170 const ITensor *src_1{
nullptr};
171 ITensor *
dst{
nullptr};
172 std::unique_ptr<cpu::CpuElementwiseDivision> op{
nullptr};
188 _impl->src_0 = input1;
189 _impl->src_1 = input2;
191 _impl->op = std::make_unique<cpu::CpuElementwiseDivision>();
192 _impl->op->configure(input1->
info(), input2->
info(), output->
info());
210 _impl->op->run(
pack);
213 struct NEElementwisePower::Impl
216 const ITensor *src_1{
nullptr};
217 ITensor *
dst{
nullptr};
218 std::unique_ptr<cpu::CpuElementwisePower> op{
nullptr};
234 _impl->src_0 = input1;
235 _impl->src_1 = input2;
237 _impl->op = std::make_unique<cpu::CpuElementwisePower>();
238 _impl->op->configure(input1->
info(), input2->
info(), output->
info());
256 _impl->op->run(
pack);
259 template <ComparisonOperation COP>
263 const ITensor *src_1{
nullptr};
264 ITensor *
dst{
nullptr};
265 std::unique_ptr<cpu::CpuElementwiseComparisonStatic<COP>> op{
nullptr};
268 template <ComparisonOperation COP>
272 template <ComparisonOperation COP>
274 template <ComparisonOperation COP>
277 template <ComparisonOperation COP>
280 template <ComparisonOperation COP>
283 _impl->src_0 = input1;
284 _impl->src_1 = input2;
286 _impl->op = std::make_unique<cpu::CpuElementwiseComparisonStatic<COP>>();
287 _impl->op->configure(input1->
info(), input2->
info(), output->
info());
290 template <ComparisonOperation COP>
298 template <ComparisonOperation COP>
305 _impl->op->run(
pack);
308 struct NEElementwiseComparison::Impl
311 const ITensor *src_1{
nullptr};
312 ITensor *
dst{
nullptr};
313 std::unique_ptr<cpu::CpuElementwiseComparison> op{
nullptr};
325 _impl->src_0 = input1;
326 _impl->src_1 = input2;
328 _impl->op = std::make_unique<cpu::CpuElementwiseComparison>();
329 _impl->op->configure(input1->
info(), input2->
info(), output->
info(), op);
346 _impl->op->run(
pack);
void configure(ITensor *input1, ITensor *input2, ITensor *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Initialise the kernel's inputs, output and conversion policy.
~NEElementwiseComparison()
Default Destructor.
Basic function to run cpu::kernels::CpuComparisonKernel.
~NEElementwiseSquaredDiff()
Default Destructor.
void run() override
Run the kernels contained in the function.
NEElementwisePower()
Default Constructor.
void run() override
Run the kernels contained in the function.
~NEElementwiseMin()
Default Destructor.
void configure(ITensor *input1, ITensor *input2, ITensor *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Initialise the kernel's inputs, output and conversion policy.
Interface for CPU tensor.
void run() override
Run the kernels contained in the function.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.
NEElementwiseMin()
Default Constructor.
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.
NEElementwiseComparison & operator=(const NEElementwiseComparison &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
Basic function to run cpu::kernels::CpuArithmeticKernel for max.
NEElementwiseSquaredDiff()
Default Constructor.
~NEElementwiseMax()
Default Destructor.
Activation Layer Information class.
~NEElementwiseDivision()
Default Destructor.
void run() override
Run the kernels contained in the function.
NEElementwiseMin & operator=(const NEElementwiseMin &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
Basic function to run cpu::kernels::CpuComparisonKernel.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
ComparisonOperation
Supported comparison operations.
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration of cpu::kernels::CpuArithme...
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
Basic function to run cpu::kernels::CpuArithmeticKernel for squared difference.
void configure(ITensor *input1, ITensor *input2, ITensor *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Initialise the kernel's inputs, output and conversion policy.
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration of cpu::kernels::CpuArithme...
void run() override
Run the kernels contained in the function.
Basic function to run cpu::kernels::CpuArithmeticKernel for power.
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 *input1, const ITensorInfo *input2, const ITensorInfo *output, ComparisonOperation op)
Static function to check if given info will lead to a valid configuration of cpu::kernels::CpuCompari...
static Status validate(const ITensorInfo *src0, const ITensorInfo *src1, const ITensorInfo *dst, ComparisonOperation op)
Static function to check if given info will lead to a valid configuration.
NEElementwiseMax & operator=(const NEElementwiseMax &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
NEElementwiseSquaredDiff & operator=(const NEElementwiseSquaredDiff &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
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.
NEElementwisePower & operator=(const NEElementwisePower &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration of cpu::kernels::CpuArithme...
void configure(ITensor *input1, ITensor *input2, ITensor *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Initialise the kernel's inputs, output and conversion policy.
NEElementwiseComparisonStatic()
Default Constructor.
static Status validate(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::CpuCompari...
void configure(ITensor *input1, ITensor *input2, ITensor *output, ComparisonOperation op)
Initialise the kernel's inputs, output and conversion policy.
Copyright (c) 2017-2023 Arm Limited.
Basic function to run cpu::kernels::CpuArithmeticKernel for division.
NEElementwiseComparison()
Default Constructor.
NEElementwiseDivision()
Default Constructor.
void configure(ITensor *input1, ITensor *input2, ITensor *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Initialise the kernel's inputs, output and conversion policy.
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration of cpu::kernels::CpuArithme...
~NEElementwiseComparisonStatic()
Default Destructor.
Store the tensor's metadata.
void run() override
Run the kernels contained in the function.
void run() override
Run the kernels contained in the function.
NEElementwiseComparisonStatic & operator=(const NEElementwiseComparisonStatic &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
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.
NEElementwiseDivision & operator=(const NEElementwiseDivision &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
NEElementwiseMax()
Default Constructor.
~NEElementwisePower()
Default Destructor.
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration of cpu::kernels::CpuArithme...
void configure(ITensor *input1, ITensor *input2, ITensor *output)
Initialise the kernel's inputs, output and conversion policy.
Basic function to run cpu::kernels::CpuArithmeticKernel for min.