Compute Library
 21.11
CpuElementwiseComparisonStatic< op > Class Template Reference

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

#include <CpuElementwise.h>

Collaboration diagram for CpuElementwiseComparisonStatic< op >:
[legend]

Public Member Functions

void configure (const ITensorInfo *src0, const ITensorInfo *src1, ITensorInfo *dst)
 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)
 Static function to check if given info will lead to a valid configuration. More...
 

Detailed Description

template<ComparisonOperation op>
class arm_compute::cpu::CpuElementwiseComparisonStatic< op >

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 151 of file CpuElementwise.h.

Member Function Documentation

◆ configure()

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

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.

Definition at line 95 of file CpuElementwise.cpp.

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

96 {
97  ARM_COMPUTE_LOG_PARAMS(src0, src1, dst);
98  auto k = std::make_unique<kernels::CpuComparisonKernel>();
99  k->configure(COP, src0, src1, dst);
100  _kernel = std::move(k);
101 }
#define ARM_COMPUTE_LOG_PARAMS(...)

◆ validate()

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

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

Similar to CpuElementwiseComparisonStatic::configure()

Returns
a status

Definition at line 104 of file CpuElementwise.cpp.

References CpuComparisonKernel::validate().

Referenced by NEElementwiseComparisonStatic< op >::validate().

105 {
106  return kernels::CpuComparisonKernel::validate(COP, src0, src1, dst);
107 }
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: