Compute Library
 20.11
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 115 of file NEPixelWiseMultiplication.cpp.

116  : _impl(support::cpp14::make_unique<Impl>())
117 {
118 }

◆ ~NEComplexPixelWiseMultiplication()

Default Destructor.

◆ 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 128 of file NEPixelWiseMultiplication.cpp.

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

References ITensor::info().

Referenced by NEFFTConvolutionLayer::configure().

◆ operator=() [1/2]

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

◆ 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 137 of file NEPixelWiseMultiplication.cpp.

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

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

Referenced by NEFFTConvolutionLayer::run().

◆ 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 123 of file NEPixelWiseMultiplication.cpp.

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

References NEComplexPixelWiseMultiplication::validate().


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