ONE - On-device Neural Engine
Loading...
Searching...
No Matches
mir::ops::EqualOp Class Reference

#include <EqualOp.h>

Collaboration diagram for mir::ops::EqualOp:

Public Member Functions

 EqualOp (Output *arg1, Output *arg2)
 
OperationcopyWithInputs (const std::vector< Output * > &inputs) override
 
- Public Member Functions inherited from mir::Operation
virtual ~Operation ()=default
 
Type getType () const
 
std::size_t getId () const
 
void setId (std::size_t id)
 
std::size_t getNumInputs () const
 
std::size_t getNumOutputs () const
 
std::deque< Output * > & getInputs ()
 
const std::deque< Output * > & getInputs () const
 
std::deque< Output > & getOutputs ()
 
const std::deque< Output > & getOutputs () const
 
OutputgetInput (std::size_t index)
 
const OutputgetInput (std::size_t index) const
 
OutputgetOutput (std::size_t index)
 
const OutputgetOutput (std::size_t index) const
 
const ShapegetInputShape (std::size_t index) const
 
const ShapegetOutputShape (std::size_t index) const
 
void accept (IVisitor *v)
 

Additional Inherited Members

- Public Types inherited from mir::Operation
enum class  Type { HANDLE_OP }
 
- Protected Member Functions inherited from mir::ops::BinaryElementwiseOp
 BinaryElementwiseOp (Type type, Output *lhs, Output *rhs)
 
- Protected Member Functions inherited from mir::Operation
 Operation (Type type, const std::vector< Output * > &inputs, std::size_t num_outputs=1)
 
void setOutputType (std::size_t index, const TensorType &type)
 

Detailed Description

Definition at line 27 of file EqualOp.h.

Constructor & Destructor Documentation

◆ EqualOp()

mir::ops::EqualOp::EqualOp ( Output arg1,
Output arg2 
)
inline

Definition at line 30 of file EqualOp.h.

30 : BinaryElementwiseOp(Type::equal, arg1, arg2)
31 {
32 setOutputType(0, {DataType::UINT8, getInputShape(0)});
33 }
const Shape & getInputShape(std::size_t index) const
Definition Operation.h:161
void setOutputType(std::size_t index, const TensorType &type)
Definition Operation.h:172
BinaryElementwiseOp(Type type, Output *lhs, Output *rhs)

References mir::Operation::getInputShape(), and mir::Operation::setOutputType().

Member Function Documentation

◆ copyWithInputs()

Operation * mir::ops::EqualOp::copyWithInputs ( const std::vector< Output * > &  inputs)
inlineoverridevirtual

Implements mir::Operation.

Definition at line 35 of file EqualOp.h.

36 {
37 return new EqualOp(inputs[0], inputs[1]);
38 }
EqualOp(Output *arg1, Output *arg2)
Definition EqualOp.h:30

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