nndeploy C++ API  0.2.0
nndeploy C++ API
Public Member Functions | Protected Member Functions | List of all members
nndeploy::dag::GraphRunner Class Reference

GraphRunner类,用于运行图计算 More...

#include <graph_runner.h>

Public Member Functions

 GraphRunner ()
 
std::shared_ptr< GraphRunnerResultrun (const std::string &graph_json_str, const std::string &name="graph_runner", const std::string &task_id="task_id")
 运行图计算 More...
 
void set_debug (bool is_debug)
 
void set_dump (bool is_dump)
 
void set_json_file (bool is_json_file)
 
void set_loop_max_flag (bool is_loop_max_flag)
 
void set_node_value (const std::string &node_name, const std::string &key, const std::string &value)
 
void set_node_value (std::map< std::string, std::map< std::string, std::string >> node_value_map)
 
void set_parallel_type (base::ParallelType parallel_type)
 
void set_time_profile (bool is_time_profile)
 
virtual ~GraphRunner ()
 

Protected Member Functions

base::Status buildGraph (const std::string &graph_json_str, const std::string &name)
 构建图对象 More...
 

Detailed Description

GraphRunner类,用于运行图计算

这个类提供了构建和运行图的功能,包括性能分析和调试支持

Definition at line 28 of file graph_runner.h.

Constructor & Destructor Documentation

◆ GraphRunner()

nndeploy::dag::GraphRunner::GraphRunner ( )

◆ ~GraphRunner()

virtual nndeploy::dag::GraphRunner::~GraphRunner ( )
virtual

Member Function Documentation

◆ buildGraph()

base::Status nndeploy::dag::GraphRunner::buildGraph ( const std::string &  graph_json_str,
const std::string &  name 
)
protected

构建图对象

Parameters
graph_json_str图的JSON字符串
name图的名称
Returns
std::shared_ptr<Graph> 构建的图对象

◆ run()

std::shared_ptr<GraphRunnerResult> nndeploy::dag::GraphRunner::run ( const std::string &  graph_json_str,
const std::string &  name = "graph_runner",
const std::string &  task_id = "task_id" 
)

运行图计算

Parameters
graph_json_str图的JSON
name图的名称
task_id任务ID
time_profiler_map输出的性能分析结果
results输出的计算结果
Returns
base::Status 执行状态

◆ set_debug()

void nndeploy::dag::GraphRunner::set_debug ( bool  is_debug)

◆ set_dump()

void nndeploy::dag::GraphRunner::set_dump ( bool  is_dump)

◆ set_json_file()

void nndeploy::dag::GraphRunner::set_json_file ( bool  is_json_file)

◆ set_loop_max_flag()

void nndeploy::dag::GraphRunner::set_loop_max_flag ( bool  is_loop_max_flag)

◆ set_node_value() [1/2]

void nndeploy::dag::GraphRunner::set_node_value ( const std::string &  node_name,
const std::string &  key,
const std::string &  value 
)

◆ set_node_value() [2/2]

void nndeploy::dag::GraphRunner::set_node_value ( std::map< std::string, std::map< std::string, std::string >>  node_value_map)

◆ set_parallel_type()

void nndeploy::dag::GraphRunner::set_parallel_type ( base::ParallelType  parallel_type)

◆ set_time_profile()

void nndeploy::dag::GraphRunner::set_time_profile ( bool  is_time_profile)

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