Compute Library
 19.08
NEElementwiseSquaredDiff Class Reference

Basic function to run NEArithmeticOperationKernel for squared difference. More...

#include <NEElementwiseOperations.h>

Collaboration diagram for NEElementwiseSquaredDiff:
[legend]

Public Member Functions

void configure (ITensor *input1, ITensor *input2, ITensor *output)
 Initialise the kernel's inputs, output and conversion policy. More...
 
- Public Member Functions inherited from INESimpleFunction
 INESimpleFunction ()
 Constructor. More...
 
void run () override final
 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)
 Static function to check if given info will lead to a valid configuration of NEArithmeticOperationKernel for squared difference. More...
 

Detailed Description

Basic function to run NEArithmeticOperationKernel for squared difference.

Note
The tensor data type for the inputs must be QASYMM8/S16/F16/S32/F32.
The function performs a squared different operation between two tensors (i.e., out[i] = (in1[i] - in2[i])^2

Definition at line 91 of file NEElementwiseOperations.h.

Member Function Documentation

◆ configure()

void configure ( ITensor input1,
ITensor input2,
ITensor output 
)

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

Parameters
[in,out]input1First tensor input. Data types supported: QASYMM8/S16/F16/S32/F32.
[in,out]input2Second tensor input. Data types supported: Same as input1.
[out]outputOutput tensor. Data types supported: Same as input1.

Definition at line 58 of file NEElementwiseOperators.cpp.

59 {
60  auto k = arm_compute::support::cpp14::make_unique<NEArithmeticOperationKernel>();
61  k->configure(ArithmeticOperation::SQUARED_DIFF, input1, input2, output);
62  _kernel = std::move(k);
63 }

References arm_compute::SQUARED_DIFF.

◆ validate()

Status validate ( const ITensorInfo input1,
const ITensorInfo input2,
const ITensorInfo output 
)
static

Static function to check if given info will lead to a valid configuration of NEArithmeticOperationKernel for squared difference.

Parameters
[in]input1First tensor input info. Data types supported: QASYMM8/S16/F16/S32/F32.
[in]input2Second tensor input info. Data types supported: Same as input1.
[in]outputOutput tensor info. Data types supported: Same as input1.
Returns
a status

Definition at line 65 of file NEElementwiseOperators.cpp.

66 {
68 }
static Status validate(ArithmeticOperation op, const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of NEArithmeticOperationKer...

References arm_compute::SQUARED_DIFF, and NEArithmeticOperationKernel::validate().


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