ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GraphBuilder Class Referencefinal

#include <GraphBuilder.h>

Data Structures

class  Context
 
class  Stack
 

Public Member Functions

 GraphBuilder (loco::Graph *graph)
 
template<typename Layer , typename... Args>
auto push (Args &&...args) -> decltype(static_cast< Layer * >(nullptr) ->operator()(static_cast< Context * >(nullptr)))
 
loco::Nodepop (void)
 

Detailed Description

Definition at line 38 of file GraphBuilder.h.

Constructor & Destructor Documentation

◆ GraphBuilder()

GraphBuilder::GraphBuilder ( loco::Graph graph)
inline

Definition at line 82 of file GraphBuilder.h.

82 : _context{graph}
83 {
84 // DO NOTHING
85 }

Member Function Documentation

◆ pop()

loco::Node * GraphBuilder::pop ( void  )
inline

Definition at line 98 of file GraphBuilder.h.

98{ return ctx()->stack()->pop(); }
Stack * stack(void)
loco::Node * pop(void)

References GraphBuilder::Stack::pop(), and GraphBuilder::Context::stack().

◆ push()

template<typename Layer , typename... Args>
auto GraphBuilder::push ( Args &&...  args) -> decltype(static_cast<Layer *>(nullptr)->operator()(static_cast<Context *>(nullptr)))
inline

Definition at line 90 of file GraphBuilder.h.

92 {
93 Layer layer{std::forward<Args>(args)...};
94 return layer(ctx());
95 }

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