ArmNN
 24.08
TypedIterator< T, Base > Class Template Reference

#include <BaseIterator.hpp>

Inheritance diagram for TypedIterator< T, Base >:
[legend]
Collaboration diagram for TypedIterator< T, Base >:
[legend]

Public Member Functions

 TypedIterator (T *data=nullptr)
 
void Reset (void *data) override
 
TypedIteratoroperator++ () override
 
TypedIteratoroperator+= (const unsigned int increment) override
 
TypedIteratoroperator-= (const unsigned int increment) override
 
TypedIteratoroperator[] (const unsigned int index) override
 

Protected Attributes

T * m_Iterator
 
T * m_Start
 

Detailed Description

template<typename T, typename Base>
class armnn::TypedIterator< T, Base >

Definition at line 65 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ TypedIterator()

TypedIterator ( T *  data = nullptr)
inline

Definition at line 68 of file BaseIterator.hpp.

69  : m_Iterator(data), m_Start(data)
70  {}

Member Function Documentation

◆ operator++()

TypedIterator& operator++ ( )
inlineoverride

Definition at line 78 of file BaseIterator.hpp.

79  {
80  ARMNN_THROW_INVALIDARG_MSG_IF_FALSE(m_Iterator, "TypedIterator: m_Iterator is null!");
81  ++m_Iterator;
82  return *this;
83  }

◆ operator+=()

TypedIterator& operator+= ( const unsigned int  increment)
inlineoverride

Definition at line 85 of file BaseIterator.hpp.

86  {
87  ARMNN_THROW_INVALIDARG_MSG_IF_FALSE(m_Iterator, "TypedIterator: m_Iterator is null!");
88  m_Iterator += increment;
89  return *this;
90  }

◆ operator-=()

TypedIterator& operator-= ( const unsigned int  increment)
inlineoverride

Definition at line 92 of file BaseIterator.hpp.

93  {
94  ARMNN_THROW_INVALIDARG_MSG_IF_FALSE(m_Iterator, "TypedIterator: m_Iterator is null!");
95  m_Iterator -= increment;
96  return *this;
97  }

◆ operator[]()

TypedIterator& operator[] ( const unsigned int  index)
inlineoverride

Definition at line 99 of file BaseIterator.hpp.

100  {
101  ARMNN_THROW_INVALIDARG_MSG_IF_FALSE(m_Iterator, "TypedIterator: m_Iterator is null!");
102  m_Iterator = m_Start + index;
103  return *this;
104  }

◆ Reset()

void Reset ( void *  data)
inlineoverride

Definition at line 72 of file BaseIterator.hpp.

73  {
74  m_Iterator = reinterpret_cast<T*>(data);
76  }

Member Data Documentation

◆ m_Iterator

◆ m_Start


The documentation for this class was generated from the following file:
armnn::TypedIterator::m_Iterator
T * m_Iterator
Definition: BaseIterator.hpp:107
armnn::TypedIterator::m_Start
T * m_Start
Definition: BaseIterator.hpp:108
ARMNN_THROW_INVALIDARG_MSG_IF_FALSE
#define ARMNN_THROW_INVALIDARG_MSG_IF_FALSE(_cond, _str)
Definition: Exceptions.hpp:210