|
nndeploy C++ API
0.2.0
nndeploy C++ API
|
Classes | |
| class | Comment |
| class | CompositeNode |
| Composite node Composite node is a special type of node in nndeploy that enhances the capabilities of one or more existing nodes by wrapping them. This composite node executes in sequential mode by default internally. More... | |
| class | Condition |
| class | ConstNode |
| class | Edge |
| Edge class in DAG graph for connecting nodes and transferring data. More... | |
| class | EdgeTypeInfo |
| 输入输出类型信息 More... | |
| class | EdgeWrapper |
| class | Executor |
| class | FixedLoop |
| class | Graph |
| Directed Acyclic Graph Node. More... | |
| class | GraphRunner |
| GraphRunner类,用于运行图计算 More... | |
| struct | GraphRunnerResult |
| class | Loop |
| class | Node |
| Node base class. More... | |
| class | NodeCreator |
| Node creator base class. More... | |
| class | NodeDesc |
| Node description class. More... | |
| class | NodeFactory |
| Node factory class. More... | |
| class | NodeWrapper |
| class | RunningCondition |
| struct | RunStatus |
| class | TypeGraphRegister |
| class | TypeNodeCreator |
| Typed node creator. More... | |
Typedefs | |
| using | createGraphFunc = std::function< Graph *(const std::string &name, base::InferenceType inference_type, base::DeviceType device_type, Edge *input, Edge *output, base::ModelType model_type, bool is_path, std::vector< std::string > model_value)> |
| using | NodeFunc = std::function< base::Status(std::vector< Edge * > inputs, std::vector< Edge * > outputs, base::Param *param)> |
| Node function type definition. More... | |
Enumerations | |
| enum class | EdgeTypeFlag { kBuffer = 1 , kCvMat = 2 , kTensor = 4 , kParam = 8 , kAny = 1 << 30 , kNone = 1 << 31 } |
| enum class | IOType { kIOTypeNone = 0 , kIOTypeBool = 1 , kIOTypeNum = 2 , kIOTypeString = 3 , kIOTypeText = 10 , kIOTypeJson = 11 , kIOTypeXml = 12 , kIOTypeCsv = 13 , kIOTypeYaml = 14 , kIOTypeBinary = 15 , kIOTypeImage = 20 , kIOTypeVideo = 21 , kIOTypeAudio = 22 , kIOTypeCamera = 23 , kIOTypeMicrophone = 24 , kIOTypeModel = 30 , kIOTypeDir = 31 , kIOTypeAny = 100 } |
| enum class | NodeType { kNodeTypeInput = 1 , kNodeTypeOutput = 2 , kNodeTypeIntermediate = 3 } |
Functions | |
| bool | checkEdge (const std::vector< Edge * > &src_edges, const std::vector< Edge * > &dst_edges) |
| std::vector< EdgeWrapper * > | checkUnuseEdge (std::vector< NodeWrapper * > &node_repository, std::vector< EdgeWrapper * > &edge_repository) |
| std::vector< NodeWrapper * > | checkUnuseNode (std::vector< NodeWrapper * > &node_repository) |
| Graph * | createGraph (const std::string &name, base::InferenceType inference_type, base::DeviceType device_type, Edge *input, Edge *output, base::ModelType model_type, bool is_path, std::vector< std::string > model_value) |
| Node * | createNode (const std::string &node_key, const std::string &node_name) |
| Create node. More... | |
| Node * | 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 * | 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 > | createNodeSharedPtr (const std::string &node_key, const std::string &node_name) |
| Create node (shared pointer) More... | |
| std::shared_ptr< Node > | 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 > | createNodeSharedPtr (const std::string &node_key, const std::string &node_name, std::vector< Edge * > inputs, std::vector< Edge * > outputs) |
| Create node (shared pointer) More... | |
| Graph * | deserialize (const std::string &json_str) |
| Graph * | deserialize (rapidjson::Value &json) |
| base::Status | dumpDag (std::vector< EdgeWrapper * > &edge_repository, std::vector< NodeWrapper * > &node_repository, std::vector< Edge * > &graph_inputs, std::vector< Edge * > &graph_outputs, const std::string &name, std::ostream &oss) |
| void | findConsumerNode (EdgeWrapper *edge_wrapper, std::vector< Node * > &consumers) |
| EdgeWrapper * | findEdgeWrapper (std::vector< EdgeWrapper * > &edge_repository, const std::string &edge_name) |
| EdgeWrapper * | findEdgeWrapper (std::vector< EdgeWrapper * > &edge_repository, Edge *edge) |
| std::vector< EdgeWrapper * > | findEndEdges (std::vector< EdgeWrapper * > &edge_repository) |
| std::vector< NodeWrapper * > | findEndNodes (std::vector< NodeWrapper * > &node_repository) |
| NodeWrapper * | findNodeWrapper (std::vector< NodeWrapper * > &node_repository, const std::string &node_name) |
| NodeWrapper * | findNodeWrapper (std::vector< NodeWrapper * > &node_repository, Node *node) |
| void | findProducerNode (EdgeWrapper *edge_wrapper, std::vector< Node * > &producers) |
| std::vector< EdgeWrapper * > | findStartEdges (std::vector< EdgeWrapper * > &edge_repository) |
| std::vector< NodeWrapper * > | findStartNodes (std::vector< NodeWrapper * > &node_repository) |
| Edge * | getEdge (std::vector< EdgeWrapper * > &edge_repository, const std::string &edge_name) |
| std::map< std::string, createGraphFunc > & | getGlobalGraphCreatorMap () |
| NodeFactory * | getGlobalNodeFactory () |
| Get global node factory. More... | |
| Node * | getNode (std::vector< NodeWrapper * > &node_repository, const std::string &node_name) |
| std::set< std::string > | getNodeKeys () |
| Get all node keys. More... | |
| template<typename T > | |
| void | insertUnique (std::vector< T > &vec, const T &val) |
| 对vector插入不在vector中的元素,即类似集合的作用 More... | |
| std::string | ioTypeToString (IOType io_type) |
| Graph * | loadFile (const std::string &path) |
| std::string | nodeTypeToString (NodeType node_type) |
| std::string | removeNamespace (const std::string &type_name_with_namespace) |
| void | replaceGraphJsonObj (std::map< std::string, std::map< std::string, std::string >> node_value_map, rapidjson::Value &json, rapidjson::Document::AllocatorType &allocator) |
| std::string | replaceGraphJsonStr (std::map< std::string, std::map< std::string, std::string >> node_value_map, const std::string &json_str) |
| base::Status | saveFile (Graph *graph, const std::string &path) |
| std::string | serialize (Graph *graph) |
| base::Status | serialize (Graph *graph, rapidjson::Value &json, rapidjson::Document::AllocatorType &allocator) |
| base::Status | setColor (std::vector< NodeWrapper * > &node_repository, base::NodeColorType color) |
| IOType | stringToIoType (const std::string &io_type_str) |
| NodeType | stringToNodeType (const std::string &node_type_str) |
| base::Status | topoSort (std::vector< NodeWrapper * > &node_repository, base::TopoSortType topo_sort_type, std::vector< NodeWrapper * > &topo_sort_node) |
| base::Status | topoSortBFS (std::vector< NodeWrapper * > &node_repository, std::vector< NodeWrapper * > &topo_sort_node) |
| base::Status | topoSortDFS (std::vector< NodeWrapper * > &node_repository, std::vector< NodeWrapper * > &topo_sort_node) |
| template<typename T > | |
| std::string | typeName () |
| using nndeploy::dag::createGraphFunc = typedef std::function<Graph *( const std::string &name, base::InferenceType inference_type, base::DeviceType device_type, Edge *input, Edge *output, base::ModelType model_type, bool is_path, std::vector<std::string> model_value)> |
| using nndeploy::dag::NodeFunc = typedef std::function<base::Status(std::vector<Edge *> inputs, std::vector<Edge *> outputs, base::Param *param)> |
|
strong |
|
strong |
|
strong |
| bool nndeploy::dag::checkEdge | ( | const std::vector< Edge * > & | src_edges, |
| const std::vector< Edge * > & | dst_edges | ||
| ) |
| std::vector<EdgeWrapper *> nndeploy::dag::checkUnuseEdge | ( | std::vector< NodeWrapper * > & | node_repository, |
| std::vector< EdgeWrapper * > & | edge_repository | ||
| ) |
| std::vector<NodeWrapper *> nndeploy::dag::checkUnuseNode | ( | std::vector< NodeWrapper * > & | node_repository | ) |
| Graph* nndeploy::dag::createGraph | ( | const std::string & | name, |
| base::InferenceType | inference_type, | ||
| base::DeviceType | device_type, | ||
| Edge * | input, | ||
| Edge * | output, | ||
| base::ModelType | model_type, | ||
| bool | is_path, | ||
| std::vector< std::string > | model_value | ||
| ) |
| Node* nndeploy::dag::createNode | ( | const std::string & | node_key, |
| const std::string & | node_name | ||
| ) |
| std::shared_ptr<Node> nndeploy::dag::createNodeSharedPtr | ( | const std::string & | node_key, |
| const std::string & | node_name | ||
| ) |
| Graph* nndeploy::dag::deserialize | ( | const std::string & | json_str | ) |
| Graph* nndeploy::dag::deserialize | ( | rapidjson::Value & | json | ) |
| base::Status nndeploy::dag::dumpDag | ( | std::vector< EdgeWrapper * > & | edge_repository, |
| std::vector< NodeWrapper * > & | node_repository, | ||
| std::vector< Edge * > & | graph_inputs, | ||
| std::vector< Edge * > & | graph_outputs, | ||
| const std::string & | name, | ||
| std::ostream & | oss | ||
| ) |
| void nndeploy::dag::findConsumerNode | ( | EdgeWrapper * | edge_wrapper, |
| std::vector< Node * > & | consumers | ||
| ) |
| EdgeWrapper* nndeploy::dag::findEdgeWrapper | ( | std::vector< EdgeWrapper * > & | edge_repository, |
| const std::string & | edge_name | ||
| ) |
| EdgeWrapper* nndeploy::dag::findEdgeWrapper | ( | std::vector< EdgeWrapper * > & | edge_repository, |
| Edge * | edge | ||
| ) |
| std::vector<EdgeWrapper *> nndeploy::dag::findEndEdges | ( | std::vector< EdgeWrapper * > & | edge_repository | ) |
| std::vector<NodeWrapper *> nndeploy::dag::findEndNodes | ( | std::vector< NodeWrapper * > & | node_repository | ) |
| NodeWrapper* nndeploy::dag::findNodeWrapper | ( | std::vector< NodeWrapper * > & | node_repository, |
| const std::string & | node_name | ||
| ) |
| NodeWrapper* nndeploy::dag::findNodeWrapper | ( | std::vector< NodeWrapper * > & | node_repository, |
| Node * | node | ||
| ) |
| void nndeploy::dag::findProducerNode | ( | EdgeWrapper * | edge_wrapper, |
| std::vector< Node * > & | producers | ||
| ) |
| std::vector<EdgeWrapper *> nndeploy::dag::findStartEdges | ( | std::vector< EdgeWrapper * > & | edge_repository | ) |
| std::vector<NodeWrapper *> nndeploy::dag::findStartNodes | ( | std::vector< NodeWrapper * > & | node_repository | ) |
| Edge* nndeploy::dag::getEdge | ( | std::vector< EdgeWrapper * > & | edge_repository, |
| const std::string & | edge_name | ||
| ) |
| std::map<std::string, createGraphFunc>& nndeploy::dag::getGlobalGraphCreatorMap | ( | ) |
| NodeFactory* nndeploy::dag::getGlobalNodeFactory | ( | ) |
Get global node factory.
| Node* nndeploy::dag::getNode | ( | std::vector< NodeWrapper * > & | node_repository, |
| const std::string & | node_name | ||
| ) |
| std::set<std::string> nndeploy::dag::getNodeKeys | ( | ) |
Get all node keys.
| void nndeploy::dag::insertUnique | ( | std::vector< T > & | vec, |
| const T & | val | ||
| ) |
| std::string nndeploy::dag::ioTypeToString | ( | IOType | io_type | ) |
| Graph* nndeploy::dag::loadFile | ( | const std::string & | path | ) |
| std::string nndeploy::dag::nodeTypeToString | ( | NodeType | node_type | ) |
| std::string nndeploy::dag::removeNamespace | ( | const std::string & | type_name_with_namespace | ) |
| void nndeploy::dag::replaceGraphJsonObj | ( | std::map< std::string, std::map< std::string, std::string >> | node_value_map, |
| rapidjson::Value & | json, | ||
| rapidjson::Document::AllocatorType & | allocator | ||
| ) |
| std::string nndeploy::dag::replaceGraphJsonStr | ( | std::map< std::string, std::map< std::string, std::string >> | node_value_map, |
| const std::string & | json_str | ||
| ) |
| base::Status nndeploy::dag::saveFile | ( | Graph * | graph, |
| const std::string & | path | ||
| ) |
| std::string nndeploy::dag::serialize | ( | Graph * | graph | ) |
| base::Status nndeploy::dag::serialize | ( | Graph * | graph, |
| rapidjson::Value & | json, | ||
| rapidjson::Document::AllocatorType & | allocator | ||
| ) |
| base::Status nndeploy::dag::setColor | ( | std::vector< NodeWrapper * > & | node_repository, |
| base::NodeColorType | color | ||
| ) |
| IOType nndeploy::dag::stringToIoType | ( | const std::string & | io_type_str | ) |
| NodeType nndeploy::dag::stringToNodeType | ( | const std::string & | node_type_str | ) |
| base::Status nndeploy::dag::topoSort | ( | std::vector< NodeWrapper * > & | node_repository, |
| base::TopoSortType | topo_sort_type, | ||
| std::vector< NodeWrapper * > & | topo_sort_node | ||
| ) |
| base::Status nndeploy::dag::topoSortBFS | ( | std::vector< NodeWrapper * > & | node_repository, |
| std::vector< NodeWrapper * > & | topo_sort_node | ||
| ) |
| base::Status nndeploy::dag::topoSortDFS | ( | std::vector< NodeWrapper * > & | node_repository, |
| std::vector< NodeWrapper * > & | topo_sort_node | ||
| ) |