ONE - On-device Neural Engine
Loading...
Searching...
No Matches
GraphBuilderRegistry.h File Reference
#include "GraphBuilder.h"
#include <map>
#include <memory>

Go to the source code of this file.

Data Structures

class  moco::onnx::GraphBuilderRegistry
 Class to return graph builder for passed onnx Operator. More...
 

Namespaces

namespace  moco
 
namespace  moco::onnx
 

Macros

#define REGISTER_OP_BUILDER(NAME, BUILDER)
 

Macro Definition Documentation

◆ REGISTER_OP_BUILDER

#define REGISTER_OP_BUILDER (   NAME,
  BUILDER 
)
Value:
namespace \
{ \
__attribute__((constructor)) void reg_op(void) \
{ \
std::unique_ptr<moco::onnx::BUILDER> builder = std::make_unique<moco::onnx::BUILDER>(); \
moco::onnx::GraphBuilderRegistry::get().add(#NAME, std::move(builder)); \
} \
}

Definition at line 68 of file GraphBuilderRegistry.h.

70 { \
71 __attribute__((constructor)) void reg_op(void) \
72 { \
73 std::unique_ptr<moco::onnx::BUILDER> builder = std::make_unique<moco::onnx::BUILDER>(); \
74 moco::onnx::GraphBuilderRegistry::get().add(#NAME, std::move(builder)); \
75 } \
76 }