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

#include <OperationIndexSet.h>

Public Member Functions

 OperationIndexSet (void)=default
 
 OperationIndexSet (std::initializer_list< OperationIndex > list)
 
void insert (const OperationIndex &index)
 
void clear (void)
 
void remove (const OperationIndex &index)
 
uint32_t size () const
 
bool contains (const OperationIndex &index) const
 
std::unordered_set< OperationIndex >::iterator begin (void)
 
std::unordered_set< OperationIndex >::iterator end (void)
 
std::unordered_set< OperationIndex >::const_iterator begin (void) const
 
std::unordered_set< OperationIndex >::const_iterator end (void) const
 

Detailed Description

Definition at line 32 of file OperationIndexSet.h.

Constructor & Destructor Documentation

◆ OperationIndexSet() [1/2]

onert::ir::OperationIndexSet::OperationIndexSet ( void  )
default

◆ OperationIndexSet() [2/2]

onert::ir::OperationIndexSet::OperationIndexSet ( std::initializer_list< OperationIndex list)

Definition at line 26 of file OperationIndexSet.cc.

26 : _set(list)
27{
28 // DO NOTHING
29}

Member Function Documentation

◆ begin() [1/2]

std::unordered_set< OperationIndex >::iterator onert::ir::OperationIndexSet::begin ( void  )
inline

Definition at line 53 of file OperationIndexSet.h.

53{ return _set.begin(); }

◆ begin() [2/2]

std::unordered_set< OperationIndex >::const_iterator onert::ir::OperationIndexSet::begin ( void  ) const
inline

Definition at line 55 of file OperationIndexSet.h.

55{ return _set.begin(); }

◆ clear()

void onert::ir::OperationIndexSet::clear ( void  )
inline

Definition at line 40 of file OperationIndexSet.h.

40{ _set.clear(); }

Referenced by onert::ir::Operand::clearDefUse().

◆ contains()

bool onert::ir::OperationIndexSet::contains ( const OperationIndex index) const

Definition at line 31 of file OperationIndexSet.cc.

32{
33 return std::find(_set.begin(), _set.end(), index) != _set.end();
34}

◆ end() [1/2]

std::unordered_set< OperationIndex >::iterator onert::ir::OperationIndexSet::end ( void  )
inline

Definition at line 54 of file OperationIndexSet.h.

54{ return _set.end(); }

◆ end() [2/2]

std::unordered_set< OperationIndex >::const_iterator onert::ir::OperationIndexSet::end ( void  ) const
inline

Definition at line 56 of file OperationIndexSet.h.

56{ return _set.end(); }

◆ insert()

void onert::ir::OperationIndexSet::insert ( const OperationIndex index)
inline

Definition at line 39 of file OperationIndexSet.h.

39{ _set.insert(index); }

Referenced by onert::ir::Operand::insertUse().

◆ remove()

void onert::ir::OperationIndexSet::remove ( const OperationIndex index)
inline

Definition at line 41 of file OperationIndexSet.h.

42 {
43 auto itr = std::find(_set.begin(), _set.end(), index);
44 assert(itr != _set.end());
45 _set.erase(itr);
46 }

Referenced by onert::ir::Operand::removeUse().

◆ size()

uint32_t onert::ir::OperationIndexSet::size ( ) const
inline

Definition at line 49 of file OperationIndexSet.h.

49{ return static_cast<uint32_t>(_set.size()); }

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