NVIDIA NvNeural SDK  2022.2
GPU inference framework for NVIDIA Nsight Deep Learning Designer
nvneural::LayerListIterator Class Reference

Iterator class to enable range-based for loops and similar constructs across any ILayerList. More...

#include <LayerListIterators.h>

Public Types

using difference_type = std::ptrdiff_t
 This is not a bidirectional iterator, but providing a difference_type allows std::iterator_traits to function.
 
using iterator_category = std::forward_iterator_tag
 Tells the C++ standard library this is a forward-only iterator.
 
using pointer = ILayer *const *
 Type of a pointer to an iterated-to element.
 
using reference = ILayer *const &
 Type of a reference to an iterated-to element.
 
using value_type = ILayer *
 Type of the dereferenced iterator.
 

Public Member Functions

 LayerListIterator (const ILayerList *pLayerList, size_t index)
 Creates a LayerListIterator pointing to a ILayerList raw pointer. More...
 
 LayerListIterator (RefPtr< ILayerList > &pLayerList, size_t index)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
bool operator!= (const LayerListIterator &other) const noexcept
 Inequality operator. More...
 
ILayeroperator* () const noexcept
 Dereferences the iterator, returning the underlying ILayer pointer.
 
LayerListIteratoroperator++ () noexcept
 Preincrement (++iter); returns the updated iterator.
 
LayerListIterator operator++ (int) noexcept
 Postincrement (iter++); returns the previous iterator state.
 

Detailed Description

Iterator class to enable range-based for loops and similar constructs across any ILayerList.

Does not take a reference to its contents. Provides member typedefs to unblock use of std::iterator_traits

Constructor & Destructor Documentation

◆ LayerListIterator()

nvneural::LayerListIterator::LayerListIterator ( const ILayerList pLayerList,
size_t  index 
)
inline

Creates a LayerListIterator pointing to a ILayerList raw pointer.

Parameters
pLayerListILayerList to iterate through
indexStarting index of the iteration

Member Function Documentation

◆ operator!=()

bool nvneural::LayerListIterator::operator!= ( const LayerListIterator other) const
inlinenoexcept

Inequality operator.

Parameters
otherIterator to compare against

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