Compute Library
 22.05
ClElementwisePower Class Reference

Basic function to run opencl::kernels::ClArithmeticKernel for power. More...

#include <ClElementwiseOperations.h>

Collaboration diagram for ClElementwisePower:
[legend]

Public Member Functions

void configure (const ClCompileContext &compile_context, ITensorInfo *src1, ITensorInfo *src2, ITensorInfo *dst, const ActivationLayerInfo &act_info=ActivationLayerInfo())
 Configure function for a given list of arguments. More...
 
- Public Member Functions inherited from ICLOperator
 ICLOperator (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 ICLOperator (const ICLOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 ICLOperator (ICLOperator &&)=default
 Default move constructor. More...
 
ICLOperatoroperator= (const ICLOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
ICLOperatoroperator= (ICLOperator &&)=default
 Default move assignment operator. More...
 
void run (ITensorPack &tensors) override
 Run the kernels contained in the function. 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 *src1, const ITensorInfo *src2, const ITensorInfo *dst, const ActivationLayerInfo &act_info=ActivationLayerInfo())
 Static function to check if given info will lead to a valid configuration. More...
 

Detailed Description

Basic function to run opencl::kernels::ClArithmeticKernel for power.

Note
The tensor data type for the inputs must be F16/F32.
The function performs an elementwise power of in1 to in2 (i.e., out[i] = in1[i] ^ in2[i])

Definition at line 143 of file ClElementwiseOperations.h.

Member Function Documentation

◆ configure()

void configure ( const ClCompileContext compile_context,
ITensorInfo src1,
ITensorInfo src2,
ITensorInfo dst,
const ActivationLayerInfo act_info = ActivationLayerInfo() 
)

Configure function for a given list of arguments.

Parameters
[in]compile_contextThe compile context to be used.
[in]src1First source tensor info. Data types supported: F16/F32.
[in]src2Second source tensor info. Data types supported: F16/F32.
[out]dstDestination tensor info. Data types supported:F16/F32.
[in]act_info(Optional) Activation layer information in case of a fused activation.

Definition at line 86 of file ClElementwiseOperations.cpp.

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

87 {
88  ARM_COMPUTE_LOG_PARAMS(src1, src2, dst, act_info);
89  auto k = std::make_unique<kernels::ClArithmeticKernel>();
90  k->configure(compile_context, ArithmeticOperation::POWER, src1, src2, dst, act_info);
91  _kernel = std::move(k);
92 }
#define ARM_COMPUTE_LOG_PARAMS(...)

◆ validate()

Status validate ( const ITensorInfo src1,
const ITensorInfo src2,
const ITensorInfo dst,
const ActivationLayerInfo act_info = ActivationLayerInfo() 
)
static

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

Similar to ClElementwisePower::configure()

Returns
a status

Definition at line 94 of file ClElementwiseOperations.cpp.

References arm_compute::POWER, and ClArithmeticKernel::validate().

Referenced by CLElementwisePower::validate().

95 {
97 }
static Status validate(ArithmeticOperation op, const ITensorInfo *src1, const ITensorInfo *src2, const ITensorInfo *dst, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration.

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