Compute Library
 22.08
CpuComplexMul Class Reference

Basic function to run kernels::CpuComplexMulKernel. More...

#include <CpuMul.h>

Collaboration diagram for CpuComplexMul:
[legend]

Public Member Functions

void configure (ITensorInfo *src1, ITensorInfo *src2, ITensorInfo *dst, const ActivationLayerInfo &act_info=ActivationLayerInfo())
 Initialise the kernel's inputs, dst. More...
 
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 *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 kernels::CpuComplexMulKernel.

Definition at line 79 of file CpuMul.h.

Member Function Documentation

◆ configure()

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

Initialise the kernel's inputs, dst.

Parameters
[in,out]src1First input tensor. Data types supported: F32. Number of channels supported: 2 (complex tensor). The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0.
[in,out]src2Second input tensor. Data types supported: same as src1. Number of channels supported: same as src1. The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0.
[out]dstThe dst tensor. Data types supported: same as src1. Number of channels: same as src1.
[in]act_info(Optional) Activation layer information in case of a fused activation. Currently not supported.

Definition at line 66 of file CpuMul.cpp.

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

67 {
68  ARM_COMPUTE_UNUSED(act_info);
69  ARM_COMPUTE_LOG_PARAMS(src1, src2, dst, act_info);
70 
71  auto k = std::make_unique<kernels::CpuComplexMulKernel>();
72  k->configure(src1, src2, dst);
73  _kernel = std::move(k);
74 }
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Definition: Error.h:152
#define ARM_COMPUTE_LOG_PARAMS(...)

◆ run()

void run ( ITensorPack tensors)
overridevirtual

Run the kernels contained in the function.

Parameters
[in]tensorsVector that contains the tensors to operate on.

Reimplemented from INEOperator.

Definition at line 76 of file CpuMul.cpp.

References ARM_COMPUTE_ERROR_ON_MSG, Window::DimY, ITensorPack::empty(), Scheduler::get(), and IScheduler::schedule_op().

77 {
78  ARM_COMPUTE_ERROR_ON_MSG(tensors.empty(), "No inputs provided");
79  NEScheduler::get().schedule_op(_kernel.get(), Window::DimY, _kernel->window(), tensors);
80 }
virtual void schedule_op(ICPPKernel *kernel, const Hints &hints, const Window &window, ITensorPack &tensors)=0
Runs the kernel in the same thread as the caller synchronously.
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
Definition: Error.h:456
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
Definition: Window.h:45
static IScheduler & get()
Access the scheduler singleton.
Definition: Scheduler.cpp:94

◆ 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 CpuComplexMul::configure()

Returns
a status

Definition at line 60 of file CpuMul.cpp.

References ARM_COMPUTE_RETURN_ERROR_ON, ActivationLayerInfo::enabled(), and CpuComplexMulKernel::validate().

Referenced by NEComplexPixelWiseMultiplication::validate().

61 {
62  ARM_COMPUTE_RETURN_ERROR_ON(act_info.enabled());
63  return kernels::CpuComplexMulKernel::validate(src1, src2, dst);
64 }
static Status validate(const ITensorInfo *src1, const ITensorInfo *src2, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
Definition: Error.h:296

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