ONE - On-device Neural Engine
Loading...
Searching...
No Matches
moco::onnx::GraphBuilderRegistry Class Reference

Class to return graph builder for passed onnx Operator. More...

#include <GraphBuilderRegistry.h>

Public Member Functions

const GraphBuilderlookup (const std::string &op) const
 Returns registered GraphBuilder pointer for operator or nullptr if not registered.
 
void add (const std::string op, std::unique_ptr< GraphBuilder > &&builder)
 

Static Public Member Functions

static GraphBuilderRegistryget ()
 

Detailed Description

Class to return graph builder for passed onnx Operator.

Definition at line 32 of file GraphBuilderRegistry.h.

Member Function Documentation

◆ add()

void moco::onnx::GraphBuilderRegistry::add ( const std::string  op,
std::unique_ptr< GraphBuilder > &&  builder 
)
inline

Definition at line 54 of file GraphBuilderRegistry.h.

55 {
56 _builder_map[op] = std::move(builder);
57 }

◆ get()

static GraphBuilderRegistry & moco::onnx::GraphBuilderRegistry::get ( )
inlinestatic

Definition at line 47 of file GraphBuilderRegistry.h.

48 {
49 static GraphBuilderRegistry me;
50 return me;
51 }

◆ lookup()

const GraphBuilder * moco::onnx::GraphBuilderRegistry::lookup ( const std::string &  op) const
inline

Returns registered GraphBuilder pointer for operator or nullptr if not registered.

Definition at line 39 of file GraphBuilderRegistry.h.

40 {
41 if (_builder_map.find(op) == _builder_map.end())
42 return nullptr;
43
44 return _builder_map.at(op).get();
45 }

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