HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
onnxruntime::ValidNodes< TNodesContainer > Class Template Reference

#include <graph_nodes.h>

Classes

class  NodeIterator
 

Public Types

using NodeFilterFunc = std::function< bool(NodeIndex)>
 
using ConstNodeIterator = NodeIterator< typename TNodesContainer::const_iterator >
 
using MutableNodeIterator = NodeIterator< typename TNodesContainer::iterator >
 
using ConstReverseNodeIterator = NodeIterator< typename TNodesContainer::const_reverse_iterator >
 

Public Member Functions

 ValidNodes (TNodesContainer &nodes) noexcept
 
 ValidNodes (TNodesContainer &nodes, NodeFilterFunc &&filter_node_fn) noexcept
 
ConstNodeIterator cbegin () const noexcept
 
ConstNodeIterator cend () const noexcept
 
ConstNodeIterator begin () const noexcept
 
ConstNodeIterator end () const noexcept
 
ConstReverseNodeIterator rbegin () const noexcept
 
ConstReverseNodeIterator rend () const noexcept
 
template<typename T2 = TNodesContainer>
std::enable_if<!std::is_const
< T2 >::value,
MutableNodeIterator >::type 
begin () noexcept
 
template<typename T2 = TNodesContainer>
std::enable_if<!std::is_const
< T2 >::value,
MutableNodeIterator >::type 
end () noexcept
 
bool empty () const noexcept
 

Detailed Description

template<typename TNodesContainer>
class onnxruntime::ValidNodes< TNodesContainer >

Class to filter out null entries from either a vector of unique_ptr<Node> or a vector of [const] Node* and provide an iterator interface that returns [const] Node& for the valid entries.

Definition at line 19 of file graph_nodes.h.

Member Typedef Documentation

template<typename TNodesContainer>
using onnxruntime::ValidNodes< TNodesContainer >::ConstNodeIterator = NodeIterator<typename TNodesContainer::const_iterator>

Definition at line 36 of file graph_nodes.h.

template<typename TNodesContainer>
using onnxruntime::ValidNodes< TNodesContainer >::ConstReverseNodeIterator = NodeIterator<typename TNodesContainer::const_reverse_iterator>

Definition at line 38 of file graph_nodes.h.

template<typename TNodesContainer>
using onnxruntime::ValidNodes< TNodesContainer >::MutableNodeIterator = NodeIterator<typename TNodesContainer::iterator>

Definition at line 37 of file graph_nodes.h.

template<typename TNodesContainer>
using onnxruntime::ValidNodes< TNodesContainer >::NodeFilterFunc = std::function<bool(NodeIndex)>

Definition at line 25 of file graph_nodes.h.

Constructor & Destructor Documentation

template<typename TNodesContainer>
onnxruntime::ValidNodes< TNodesContainer >::ValidNodes ( TNodesContainer &  nodes)
inlineexplicitnoexcept

Construct a ValidNodes instance to provide iteration over all valid nodes in the TNodesCollection

Parameters
[in]nodesNodes to iterate, skipping invalid entries.

Definition at line 31 of file graph_nodes.h.

template<typename TNodesContainer>
onnxruntime::ValidNodes< TNodesContainer >::ValidNodes ( TNodesContainer &  nodes,
NodeFilterFunc &&  filter_node_fn 
)
inlineexplicitnoexcept

Definition at line 33 of file graph_nodes.h.

Member Function Documentation

template<typename TNodesContainer>
ConstNodeIterator onnxruntime::ValidNodes< TNodesContainer >::begin ( void  ) const
inlinenoexcept

Definition at line 48 of file graph_nodes.h.

template<typename TNodesContainer>
template<typename T2 = TNodesContainer>
std::enable_if<!std::is_const<T2>::value, MutableNodeIterator>::type onnxruntime::ValidNodes< TNodesContainer >::begin ( void  )
inlinenoexcept

Definition at line 67 of file graph_nodes.h.

template<typename TNodesContainer>
ConstNodeIterator onnxruntime::ValidNodes< TNodesContainer >::cbegin ( ) const
inlinenoexcept

Definition at line 40 of file graph_nodes.h.

template<typename TNodesContainer>
ConstNodeIterator onnxruntime::ValidNodes< TNodesContainer >::cend ( ) const
inlinenoexcept

Definition at line 44 of file graph_nodes.h.

template<typename TNodesContainer>
bool onnxruntime::ValidNodes< TNodesContainer >::empty ( void  ) const
inlinenoexcept

Definition at line 78 of file graph_nodes.h.

template<typename TNodesContainer>
ConstNodeIterator onnxruntime::ValidNodes< TNodesContainer >::end ( void  ) const
inlinenoexcept

Definition at line 52 of file graph_nodes.h.

template<typename TNodesContainer>
template<typename T2 = TNodesContainer>
std::enable_if<!std::is_const<T2>::value, MutableNodeIterator>::type onnxruntime::ValidNodes< TNodesContainer >::end ( void  )
inlinenoexcept

Definition at line 73 of file graph_nodes.h.

template<typename TNodesContainer>
ConstReverseNodeIterator onnxruntime::ValidNodes< TNodesContainer >::rbegin ( ) const
inlinenoexcept

Definition at line 56 of file graph_nodes.h.

template<typename TNodesContainer>
ConstReverseNodeIterator onnxruntime::ValidNodes< TNodesContainer >::rend ( ) const
inlinenoexcept

Definition at line 60 of file graph_nodes.h.


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