Compute Library
 22.11
CpuElementwiseComparison Class Reference

Basic function to run cpu::kernels::CpuComparisonKernel. More...

#include <CpuElementwise.h>

Collaboration diagram for CpuElementwiseComparison:
[legend]

Public Member Functions

void configure (const ITensorInfo *src0, const ITensorInfo *src1, ITensorInfo *dst, ComparisonOperation op)
 Initialise the kernel's inputs, dst and conversion policy. More...
 
- Public Member Functions inherited from CpuElementwiseBase
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 *src0, const ITensorInfo *src1, const ITensorInfo *dst, ComparisonOperation op)
 Static function to check if given info will lead to a valid configuration. More...
 

Detailed Description

Basic function to run cpu::kernels::CpuComparisonKernel.

Note
The tensor data type for the inputs must be QASYMM8/QASYMM8_SIGNED/S16/F16/S32/F32.
The function performs a comparison operation between two tensors.

Definition at line 125 of file CpuElementwise.h.

Member Function Documentation

◆ configure()

void configure ( const ITensorInfo src0,
const ITensorInfo src1,
ITensorInfo dst,
ComparisonOperation  op 
)

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

Parameters
[in,out]src0First tensor input info. Data types supported: QASYMM8/QASYMM8_SIGNED/S16/F16/S32/F32.
[in,out]src1Second tensor input info. Data types supported: Same as src0.
[out]dstOutput tensor info. Data types supported: U16/U32.
[in]opComparison Operation to be performed.

Definition at line 109 of file CpuElementwise.cpp.

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

110 {
111  ARM_COMPUTE_LOG_PARAMS(src0, src1, dst);
112  auto k = std::make_unique<kernels::CpuComparisonKernel>();
113  k->configure(op, src0, src1, dst);
114  _kernel = std::move(k);
115 }
#define ARM_COMPUTE_LOG_PARAMS(...)

◆ validate()

Status validate ( const ITensorInfo src0,
const ITensorInfo src1,
const ITensorInfo dst,
ComparisonOperation  op 
)
static

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

Similar to CpuElementwiseComparison::configure()

Returns
a status

Definition at line 117 of file CpuElementwise.cpp.

References CpuComparisonKernel::validate().

Referenced by NEElementwiseComparison::validate().

118 {
119  return kernels::CpuComparisonKernel::validate(op, src0, src1, dst);
120 }
static Status validate(ComparisonOperation op, const ITensorInfo *src0, const ITensorInfo *src1, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.

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