Compute Library
 19.08
CLElementwiseSquaredDiff Class Reference

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

#include <CLElementwiseOperations.h>

Collaboration diagram for CLElementwiseSquaredDiff:
[legend]

Public Member Functions

void configure (ICLTensor *input1, ICLTensor *input2, ICLTensor *output)
 Initialise the kernel's inputs, output and conversion policy. More...
 
- Public Member Functions inherited from ICLSimpleFunction
 ICLSimpleFunction ()
 Default 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 CLArithmeticOperationKernel for squared difference. More...
 

Detailed Description

Basic function to run CLArithmeticOperationKernel for squared difference.

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

Definition at line 183 of file CLElementwiseOperations.h.

Member Function Documentation

◆ configure()

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

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

Parameters
[in,out]input1First tensor input. Data types supported: U8/QASYMM8/S16/QSYMM16/F16/F32. The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0.
[in,out]input2Second tensor input. Data types supported: U8, QASYMM8 (only if input1 is QASYMM8), S16, QSYMM16 (only if input1 is QSYMM16), F16/F32. The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0.
[out]outputOutput tensor. Data types supported: U8 (Only if both inputs are U8), QASYMM8 (only if both inputs are QASYMM8), S16, QSYMM16 (only if both inputs are QSYMM16), F16/F32.

Definition at line 116 of file CLElementwiseOperations.cpp.

117 {
118  auto k = arm_compute::support::cpp14::make_unique<CLArithmeticOperationKernel>();
119  k->configure(ArithmeticOperation::SQUARED_DIFF, input1, input2, output);
120  _kernel = std::move(k);
121  configure_border_handler(_border_handler, _kernel->border_size(), input1, input2, output);
122 }

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 CLArithmeticOperationKernel for squared difference.

Parameters
[in]input1First tensor input info. Data types supported: U8/QASYMM8/S16/QSYMM16/F16/F32.
[in]input2Second tensor input info. Data types supported: U8, QASYMM8 (only if input1 is QASYMM8), S16, QSYMM16 (only if input1 is QSYMM16), F16/F32.
[in]outputOutput tensor info. Data types supported: U8 (Only if both inputs are U8), QASYMM8 ( only if both inputs are QASYMM8), S16, QSYMM16 (only if both inputs are QSYMM16), F16/F32.
Returns
a status

Definition at line 124 of file CLElementwiseOperations.cpp.

125 {
127 }
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 CLArithmeticOperationKer...

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


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