ArmNN
 25.02
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  }
#define ARMNN_THROW_INVALIDARG_MSG_IF_FALSE(_cond, _str)
Definition: Exceptions.hpp:210

References ARMNN_THROW_INVALIDARG_MSG_IF_FALSE, and TypedIterator< T, Base >::m_Iterator.

◆ 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  }

References ARMNN_THROW_INVALIDARG_MSG_IF_FALSE, and TypedIterator< T, Base >::m_Iterator.

◆ 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  }

References ARMNN_THROW_INVALIDARG_MSG_IF_FALSE, and TypedIterator< T, Base >::m_Iterator.

◆ 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  }

References ARMNN_THROW_INVALIDARG_MSG_IF_FALSE, TypedIterator< T, Base >::m_Iterator, and TypedIterator< T, Base >::m_Start.

◆ Reset()

void Reset ( void *  data)
inlineoverride

Definition at line 72 of file BaseIterator.hpp.

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

References TypedIterator< T, Base >::m_Iterator, and TypedIterator< T, Base >::m_Start.

Member Data Documentation

◆ m_Iterator

◆ m_Start

T* m_Start
protected

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