Compute Library
 21.11
CpuElementwisePower Class Reference

Basic function to run cpu::kernels::CpuArithmeticKernel for power. More...

#include <CpuElementwise.h>

Collaboration diagram for CpuElementwisePower:
[legend]

Public Member Functions

void configure (const ITensorInfo *src0, const ITensorInfo *src1, ITensorInfo *dst)
 Initialise the kernel's inputs, dst and conversion policy. More...
 
- Public Member Functions inherited from CpuElementwiseBase
void run (ITensorPack &tensors) override
 Run the kernels contained in the function. More...
 
- Public Member Functions inherited from INEOperator
 INEOperator (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 INEOperator (const INEOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 INEOperator (INEOperator &&)=default
 Default move constructor. More...
 
INEOperatoroperator= (const INEOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
INEOperatoroperator= (INEOperator &&)=default
 Default move assignment operator. More...
 
 ~INEOperator ()
 Default destructor. More...
 
void prepare (ITensorPack &constants) override
 Prepare the function for executing. More...
 
MemoryRequirements workspace () const override
 Return the memory requirements required by the workspace. More...
 
- Public Member Functions inherited from IOperator
virtual ~IOperator ()=default
 Destructor. More...
 

Static Public Member Functions

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. More...
 

Detailed Description

Basic function to run cpu::kernels::CpuArithmeticKernel for power.

Note
The tensor data type for the inputs must be F16/F32.
The function performs a elementwise power of in1 to in2 (i.e., out[i] = in1[i] ^ in2[i])
For an exponent that is a float, this function will only work with a positive base.

Definition at line 101 of file CpuElementwise.h.

Member Function Documentation

◆ configure()

void configure ( const ITensorInfo src0,
const ITensorInfo src1,
ITensorInfo dst 
)

Initialise the kernel's inputs, dst and conversion policy.

Parameters
[in,out]src0First tensor input info. Data types supported: F16/F32.
[in,out]src1Second tensor input info. Data types supported: Same as src0.
[out]dstOutput tensor info. Data types supported: Same as src0.

Definition at line 81 of file CpuElementwise.cpp.

References ARM_COMPUTE_LOG_PARAMS, and arm_compute::test::validation::k.

82 {
83  ARM_COMPUTE_LOG_PARAMS(src0, src1, dst);
84  auto k = std::make_unique<kernels::CpuPowerKernel>();
85  k->configure(src0, src1, dst);
86  _kernel = std::move(k);
87 }
#define ARM_COMPUTE_LOG_PARAMS(...)

◆ validate()

Status validate ( const ITensorInfo src0,
const ITensorInfo src1,
const ITensorInfo dst 
)
static

Static function to check if given info will lead to a valid configuration.

Similar to CpuElementwisePower::configure()

Returns
a status

Definition at line 89 of file CpuElementwise.cpp.

References CpuPowerKernel::validate().

Referenced by NEElementwisePower::validate().

90 {
91  return kernels::CpuPowerKernel::validate(src0, src1, dst);
92 }
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.

The documentation for this class was generated from the following files: