Compute Library
 21.02
NEComplexPixelWiseMultiplication Class Reference

Basic function to run NEComplexPixelWiseMultiplicationKernel. More...

#include <NEPixelWiseMultiplication.h>

Collaboration diagram for NEComplexPixelWiseMultiplication:
[legend]

Public Member Functions

 NEComplexPixelWiseMultiplication ()
 Default Constructor. More...
 
 ~NEComplexPixelWiseMultiplication ()
 Default Destructor. More...
 
 NEComplexPixelWiseMultiplication (const NEComplexPixelWiseMultiplication &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 NEComplexPixelWiseMultiplication (NEComplexPixelWiseMultiplication &&)
 Default move constructor. More...
 
NEComplexPixelWiseMultiplicationoperator= (const NEComplexPixelWiseMultiplication &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
NEComplexPixelWiseMultiplicationoperator= (NEComplexPixelWiseMultiplication &&)
 Default move assignment operator. More...
 
void configure (ITensor *input1, ITensor *input2, ITensor *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
 Initialise the kernel's inputs, output. More...
 
void run () override
 Run the kernels contained in the function. More...
 
- Public Member Functions inherited from IFunction
virtual ~IFunction ()=default
 Destructor. More...
 
virtual void prepare ()
 Prepare the function for executing. More...
 

Static Public Member Functions

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

Detailed Description

Basic function to run NEComplexPixelWiseMultiplicationKernel.

Definition at line 215 of file NEPixelWiseMultiplication.h.

Constructor & Destructor Documentation

◆ NEComplexPixelWiseMultiplication() [1/3]

Default Constructor.

Definition at line 114 of file NEPixelWiseMultiplication.cpp.

References NEComplexPixelWiseMultiplication::operator=(), and NEComplexPixelWiseMultiplication::~NEComplexPixelWiseMultiplication().

115  : _impl(std::make_unique<Impl>())
116 {
117 }

◆ ~NEComplexPixelWiseMultiplication()

◆ NEComplexPixelWiseMultiplication() [2/3]

Prevent instances of this class from being copied (As this class contains pointers)

◆ NEComplexPixelWiseMultiplication() [3/3]

Default move constructor.

Member Function Documentation

◆ configure()

void configure ( ITensor input1,
ITensor input2,
ITensor output,
const ActivationLayerInfo act_info = ActivationLayerInfo() 
)

Initialise the kernel's inputs, output.

Parameters
[in,out]input1An 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]input2An input tensor. Data types supported: same as input1. Number of channels supported: same as input1. The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0.
[out]outputThe output tensor. Data types supported: same as input1. Number of channels: same as input1.
[in]act_info(Optional) Activation layer information in case of a fused activation. Currently not supported.

Definition at line 127 of file NEPixelWiseMultiplication.cpp.

References ITensor::info().

Referenced by NEFFTConvolutionLayer::configure().

128 {
129  _impl->src_0 = input1;
130  _impl->src_1 = input2;
131  _impl->dst = output;
132  _impl->op = std::make_unique<experimental::NEComplexPixelWiseMultiplication>();
133  _impl->op->configure(input1->info(), input2->info(), output->info(), act_info);
134 }

◆ operator=() [1/2]

Prevent instances of this class from being copied (As this class contains pointers)

Referenced by NEComplexPixelWiseMultiplication::NEComplexPixelWiseMultiplication().

◆ operator=() [2/2]

Default move assignment operator.

◆ run()

void run ( )
overridevirtual

Run the kernels contained in the function.

For Neon kernels:

  • Multi-threading is used for the kernels which are parallelisable.
  • By default std::thread::hardware_concurrency() threads are used.
Note
CPPScheduler::set_num_threads() can be used to manually set the number of threads

For OpenCL kernels:

  • All the kernels are enqueued on the queue associated with CLScheduler.
  • The queue is then flushed.
Note
The function will not block until the kernels are executed. It is the user's responsibility to wait.
Will call prepare() on first run if hasn't been done

Implements IFunction.

Definition at line 136 of file NEPixelWiseMultiplication.cpp.

References arm_compute::ACL_DST, arm_compute::ACL_SRC_0, arm_compute::ACL_SRC_1, and ITensorPack::add_tensor().

Referenced by NEFFTConvolutionLayer::run().

137 {
138  ITensorPack pack;
139  pack.add_tensor(TensorType::ACL_SRC_0, _impl->src_0);
140  pack.add_tensor(TensorType::ACL_SRC_1, _impl->src_1);
141  pack.add_tensor(TensorType::ACL_DST, _impl->dst);
142  _impl->op->run(pack);
143 }

◆ validate()

Status validate ( const ITensorInfo input1,
const ITensorInfo input2,
const ITensorInfo output,
const ActivationLayerInfo act_info = ActivationLayerInfo() 
)
static

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

Parameters
[in]input1An input tensor info. Data types supported: F32. Number of channels supported: 2 (complex tensor).
[in]input2An input tensor info. Data types supported: same as input1. Number of channels supported: same as input1.
[in]outputThe output tensor info. Data types supported: same as input1. Number of channels supported: same as input1.
[in]act_info(Optional) Activation layer information in case of a fused activation. Currently not supported.

Definition at line 122 of file NEPixelWiseMultiplication.cpp.

References NEComplexPixelWiseMultiplication::validate().

123 {
124  return experimental::NEComplexPixelWiseMultiplication::validate(input1, input2, output, act_info);
125 }
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 NEComplexPixelWiseMultip...

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