nndeploy C++ API  0.2.0
nndeploy C++ API
Classes | Namespaces | Macros | Typedefs | Functions
node.h File Reference
#include "nndeploy/base/any.h"
#include "nndeploy/base/common.h"
#include "nndeploy/base/glic_stl_include.h"
#include "nndeploy/base/log.h"
#include "nndeploy/base/macro.h"
#include "nndeploy/base/object.h"
#include "nndeploy/base/status.h"
#include "nndeploy/base/string.h"
#include "nndeploy/base/time_profiler.h"
#include "nndeploy/dag/base.h"
#include "nndeploy/dag/edge.h"
#include "nndeploy/device/buffer.h"
#include "nndeploy/device/device.h"
#include "nndeploy/device/memory_pool.h"
#include "nndeploy/device/tensor.h"
#include "rapidjson/document.h"
#include "rapidjson/stringbuffer.h"
#include "rapidjson/writer.h"
Include dependency graph for node.h:

Go to the source code of this file.

Classes

class  nndeploy::dag::Node
 Node base class. More...
 
class  nndeploy::dag::NodeCreator
 Node creator base class. More...
 
class  nndeploy::dag::NodeDesc
 Node description class. More...
 
class  nndeploy::dag::NodeFactory
 Node factory class. More...
 
class  nndeploy::dag::TypeNodeCreator< T >
 Typed node creator. More...
 

Namespaces

 nndeploy
 
 nndeploy::dag
 

Macros

#define REGISTER_NODE(node_key, node_class)
 Node registration macro. More...
 

Typedefs

using nndeploy::dag::NodeFunc = std::function< base::Status(std::vector< Edge * > inputs, std::vector< Edge * > outputs, base::Param *param)>
 Node function type definition. More...
 

Functions

Node * nndeploy::dag::createNode (const std::string &node_key, const std::string &node_name)
 Create node. More...
 
Node * nndeploy::dag::createNode (const std::string &node_key, const std::string &node_name, std::initializer_list< Edge * > inputs, std::initializer_list< Edge * > outputs)
 Create node. More...
 
Node * nndeploy::dag::createNode (const std::string &node_key, const std::string &node_name, std::vector< Edge * > inputs, std::vector< Edge * > outputs)
 Create node. More...
 
std::shared_ptr< Node > nndeploy::dag::createNodeSharedPtr (const std::string &node_key, const std::string &node_name)
 Create node (shared pointer) More...
 
std::shared_ptr< Node > nndeploy::dag::createNodeSharedPtr (const std::string &node_key, const std::string &node_name, std::initializer_list< Edge * > inputs, std::initializer_list< Edge * > outputs)
 Create node (shared pointer) More...
 
std::shared_ptr< Node > nndeploy::dag::createNodeSharedPtr (const std::string &node_key, const std::string &node_name, std::vector< Edge * > inputs, std::vector< Edge * > outputs)
 Create node (shared pointer) More...
 
NodeFactory * nndeploy::dag::getGlobalNodeFactory ()
 Get global node factory. More...
 
std::set< std::string > nndeploy::dag::getNodeKeys ()
 Get all node keys. More...
 

Macro Definition Documentation

◆ REGISTER_NODE

#define REGISTER_NODE (   node_key,
  node_class 
)
Value:
namespace { \
struct NodeRegister_##node_class { \
NodeRegister_##node_class() { \
node_key, \
} \
}; \
static NodeRegister_##node_class g_node_register_##node_class; \
}
void registerNode(const std::string &node_key, std::shared_ptr< NodeCreator > creator)
Register node.
Definition: node.h:1441
Typed node creator.
Definition: node.h:1392
NodeFactory * getGlobalNodeFactory()
Get global node factory.

Node registration macro.

Parameters
node_keyNode key
node_classNode class name

Used for automatically registering node types to factory

Definition at line 1501 of file node.h.