ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnc::ArtifactBinaryExpr Class Reference

Represents different types of binary expressions. More...

#include <ArtifactModel.h>

Collaboration diagram for nnc::ArtifactBinaryExpr:

Public Member Functions

 ArtifactBinaryExpr (ArtifactBinOp op, std::shared_ptr< ArtifactExpr > left, std::shared_ptr< ArtifactExpr > right)
 
void accept (IArtifactGenerator *g) const override
 This is the core function of each artifact entity and is implemented by all concrete classes in the hierarchy.
 
ArtifactBinOp getOp () const
 
std::shared_ptr< ArtifactExprgetLeft () const
 
std::shared_ptr< ArtifactExprgetRight () const
 
- Public Member Functions inherited from nnc::ArtifactEntity
virtual ~ArtifactEntity ()=default
 
virtual bool isBlock () const
 If this entity represents something containing a block of instructions.
 

Additional Inherited Members

- Protected Member Functions inherited from nnc::ArtifactEntity
 ArtifactEntity ()=default
 

Detailed Description

Represents different types of binary expressions.

Definition at line 246 of file ArtifactModel.h.

Constructor & Destructor Documentation

◆ ArtifactBinaryExpr()

nnc::ArtifactBinaryExpr::ArtifactBinaryExpr ( ArtifactBinOp  op,
std::shared_ptr< ArtifactExpr left,
std::shared_ptr< ArtifactExpr right 
)
inline

Definition at line 249 of file ArtifactModel.h.

251 : _op(op), _left(std::move(left)), _right(std::move(right))
252 {
253 }

Member Function Documentation

◆ accept()

void nnc::ArtifactBinaryExpr::accept ( IArtifactGenerator g) const
inlineoverridevirtual

This is the core function of each artifact entity and is implemented by all concrete classes in the hierarchy.

Implements nnc::ArtifactEntity.

Definition at line 255 of file ArtifactModel.h.

255{ g->visit(this); }

◆ getLeft()

std::shared_ptr< ArtifactExpr > nnc::ArtifactBinaryExpr::getLeft ( ) const
inline

Definition at line 258 of file ArtifactModel.h.

258{ return _left; }

Referenced by nnc::ArtifactGeneratorCppCode::visit().

◆ getOp()

ArtifactBinOp nnc::ArtifactBinaryExpr::getOp ( ) const
inline

Definition at line 257 of file ArtifactModel.h.

257{ return _op; }

Referenced by nnc::ArtifactGeneratorCppCode::visit().

◆ getRight()

std::shared_ptr< ArtifactExpr > nnc::ArtifactBinaryExpr::getRight ( ) const
inline

Definition at line 259 of file ArtifactModel.h.

259{ return _right; }

Referenced by nnc::ArtifactGeneratorCppCode::visit().


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