ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::ir::train::UseDefChain Class Reference

#include <UseDefChain.h>

Public Member Functions

 UseDefChain (const Operand &operand)
 
 UseDefChain (const UseDefChain &other)
 
 UseDefChain (UseDefChain &&other)
 
 ~UseDefChain ()=default
 
UseDefChainoperator= (const UseDefChain &other)=delete
 
UseDefChainoperator= (UseDefChain &&other)=delete
 
bool operator== (const UseDefChain &other) const
 
const std::set< TrainingOperationIndex > & getTrainingUses () const
 
const std::set< TrainingOperationIndex > & getTrainingDefs () const
 
void insertTrainingUse (const TrainingOperationIndex &idx)
 
void removeTrainingUse (const TrainingOperationIndex &idx)
 
void insertTrainingDef (const TrainingOperationIndex &idx)
 
void removeTrainingDef (const TrainingOperationIndex &idx)
 
void clearTrainingUseDefs ()
 
const Operandoperand () const
 

Detailed Description

Definition at line 32 of file UseDefChain.h.

Constructor & Destructor Documentation

◆ UseDefChain() [1/3]

onert::ir::train::UseDefChain::UseDefChain ( const Operand operand)
inlineexplicit

Definition at line 35 of file UseDefChain.h.

35 : _operand{operand}
36 {
37 // DO NOTHING
38 }
const Operand & operand() const
Definition UseDefChain.h:68

◆ UseDefChain() [2/3]

onert::ir::train::UseDefChain::UseDefChain ( const UseDefChain other)
inlineexplicit

Definition at line 39 of file UseDefChain.h.

40 : _operand{other._operand}, _uses{other._uses}, _defs{other._defs}
41 {
42 // DO NOTHING
43 }

◆ UseDefChain() [3/3]

onert::ir::train::UseDefChain::UseDefChain ( UseDefChain &&  other)
inline

Definition at line 44 of file UseDefChain.h.

45 : _operand{other._operand}, _uses{std::move(other._uses)}, _defs{std::move(other._defs)}
46 {
47 // DO NOTHING
48 }

◆ ~UseDefChain()

onert::ir::train::UseDefChain::~UseDefChain ( )
default

Member Function Documentation

◆ clearTrainingUseDefs()

void onert::ir::train::UseDefChain::clearTrainingUseDefs ( )

Definition at line 39 of file UseDefChain.cc.

40{
41 _uses.clear();
42 _defs.clear();
43}

◆ getTrainingDefs()

const std::set< TrainingOperationIndex > & onert::ir::train::UseDefChain::getTrainingDefs ( ) const
inline

Definition at line 60 of file UseDefChain.h.

60{ return _defs; }

◆ getTrainingUses()

const std::set< TrainingOperationIndex > & onert::ir::train::UseDefChain::getTrainingUses ( ) const
inline

Definition at line 59 of file UseDefChain.h.

59{ return _uses; }

◆ insertTrainingDef()

void onert::ir::train::UseDefChain::insertTrainingDef ( const TrainingOperationIndex idx)

Definition at line 30 of file UseDefChain.cc.

31{
32 // defs must be valid
33 assert(idx.valid());
34 _defs.insert(idx);
35}

References onert::ir::train::TrainingIndex< T >::valid().

◆ insertTrainingUse()

void onert::ir::train::UseDefChain::insertTrainingUse ( const TrainingOperationIndex idx)

Definition at line 26 of file UseDefChain.cc.

26{ _uses.insert(idx); }

◆ operand()

const Operand & onert::ir::train::UseDefChain::operand ( ) const
inline

Definition at line 68 of file UseDefChain.h.

68{ return _operand; };

◆ operator=() [1/2]

UseDefChain & onert::ir::train::UseDefChain::operator= ( const UseDefChain other)
delete

◆ operator=() [2/2]

UseDefChain & onert::ir::train::UseDefChain::operator= ( UseDefChain &&  other)
delete

◆ operator==()

bool onert::ir::train::UseDefChain::operator== ( const UseDefChain other) const

Definition at line 45 of file UseDefChain.cc.

46{
47 return &_operand == &other._operand && _uses == other._uses && _defs == other._defs;
48}

◆ removeTrainingDef()

void onert::ir::train::UseDefChain::removeTrainingDef ( const TrainingOperationIndex idx)

Definition at line 37 of file UseDefChain.cc.

37{ _defs.erase(idx); }

◆ removeTrainingUse()

void onert::ir::train::UseDefChain::removeTrainingUse ( const TrainingOperationIndex idx)

Definition at line 28 of file UseDefChain.cc.

28{ _uses.erase(idx); }

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