ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 30 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 24 of file OperationIndexSet.cc.

24 : _set(list)
25{
26 // DO NOTHING
27}

Member Function Documentation

◆ begin() [1/2]

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

Definition at line 51 of file OperationIndexSet.h.

51{ return _set.begin(); }

◆ begin() [2/2]

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

Definition at line 53 of file OperationIndexSet.h.

53{ return _set.begin(); }

◆ clear()

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

Definition at line 38 of file OperationIndexSet.h.

38{ _set.clear(); }

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

◆ contains()

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

Definition at line 29 of file OperationIndexSet.cc.

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

◆ end() [1/2]

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

Definition at line 52 of file OperationIndexSet.h.

52{ return _set.end(); }

◆ end() [2/2]

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

Definition at line 54 of file OperationIndexSet.h.

54{ return _set.end(); }

◆ insert()

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

Definition at line 37 of file OperationIndexSet.h.

37{ _set.insert(index); }

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

◆ remove()

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

Definition at line 39 of file OperationIndexSet.h.

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

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

◆ size()

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

Definition at line 47 of file OperationIndexSet.h.

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

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