26 #ifndef NVNEURAL_LAYERLISTITERATORS_H
27 #define NVNEURAL_LAYERLISTITERATORS_H
57 : m_pLayerList(pLayerList)
64 : m_pLayerList(pLayerList.get())
94 const bool samePointer = m_pLayerList == other.m_pLayerList;
95 const bool sameIndex = m_index == other.m_index;
96 return !(samePointer && sameIndex);
Fundamental NvNeural data types are declared here.
LayerListIterator end(const ILayerList *pLayerList) noexcept
Returns a LayerListIterator pointing to the end of pLayerList (one past the final element).
Definition: LayerListIterators.h:123
LayerListIterator begin(const ILayerList *pLayerList) noexcept
Returns a LayerListIterator pointing to the beginning of pLayerList.
Definition: LayerListIterators.h:108
ILayer is the base class for neural network layers.
Definition: LayerTypes.h:59
ILayerList represents an immutable collection of ILayer pointers.
Definition: CoreTypes.h:1060
virtual ILayer * getLayerByIndex(size_t layerIndex) const noexcept=0
Returns the Nth ILayer pointer in the collection.
Iterator class to enable range-based for loops and similar constructs across any ILayerList.
Definition: LayerListIterators.h:40
std::ptrdiff_t difference_type
This is not a bidirectional iterator, but providing a difference_type allows std::iterator_traits to ...
Definition: LayerListIterators.h:45
ILayer *const & reference
Type of a reference to an iterated-to element.
Definition: LayerListIterators.h:51
bool operator!=(const LayerListIterator &other) const noexcept
Inequality operator.
Definition: LayerListIterators.h:92
ILayer * operator*() const noexcept
Dereferences the iterator, returning the underlying ILayer pointer.
Definition: LayerListIterators.h:70
ILayer *const * pointer
Type of a pointer to an iterated-to element.
Definition: LayerListIterators.h:49
LayerListIterator & operator++() noexcept
Preincrement (++iter); returns the updated iterator.
Definition: LayerListIterators.h:76
std::forward_iterator_tag iterator_category
Tells the C++ standard library this is a forward-only iterator.
Definition: LayerListIterators.h:43
LayerListIterator(const ILayerList *pLayerList, size_t index)
Creates a LayerListIterator pointing to a ILayerList raw pointer.
Definition: LayerListIterators.h:56
LayerListIterator(RefPtr< ILayerList > &pLayerList, size_t index)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: LayerListIterators.h:63
Intrusive pointer using IRefObject's reference counting system.
Definition: RefPtr.h:46