nndeploy C++ API  0.2.0
nndeploy C++ API
Public Member Functions | Protected Attributes | List of all members
nndeploy::dag::Node Class Referenceabstract

Node base class. More...

#include <node.h>

Inheritance diagram for nndeploy::dag::Node:
[legend]
Collaboration diagram for nndeploy::dag::Node:
[legend]

Public Member Functions

base::Status addDropdownParam (const std::string &dropdown_param, const std::vector< std::string > &dropdown_values)
 Add dropdown parameter. More...
 
base::Status addIoParam (const std::string &io_param)
 Add IO parameter. More...
 
base::Status addRequiredParam (const std::string &required_param)
 Add required parameter. More...
 
virtual base::Status addResourceWithoutState (const std::string &key, const base::Any &value)
 Add stateless resource. More...
 
virtual base::Status addResourceWithState (const std::string &key, Edge *edge)
 Add stateful resource. More...
 
base::Status addUiParam (const std::string &ui_param)
 Add UI parameter. More...
 
bool checkInputs (std::vector< Edge * > &inputs)
 Check input edges. More...
 
virtual bool checkInterruptStatus ()
 Check interrupt status. More...
 
bool checkOutputs (std::vector< Edge * > &outputs)
 Check output edges. More...
 
bool checkOutputs (std::vector< std::string > &outputs_name)
 Check output edge names. More...
 
base::Status clearDropdownParams ()
 Clear dropdown parameters. More...
 
virtual void clearInterrupt ()
 Clear interrupt status. More...
 
base::Status clearIoParams ()
 Clear IO parameters. More...
 
base::Status clearRequiredParams ()
 Clear required parameters. More...
 
base::Status clearUiParams ()
 Clear UI parameters. More...
 
virtual EdgecreateInternalOutputEdge (const std::string &name)
 Create internal output edge. More...
 
virtual EdgecreateResourceWithState (const std::string &key)
 Create stateful resource. More...
 
virtual base::Status defaultParam ()
 Configure default parameters. More...
 
virtual base::Status deinit ()
 Deinitialize node. More...
 
virtual base::Status deserialize (const std::string &json_str)
 Deserialize from JSON string. More...
 
virtual base::Status deserialize (rapidjson::Value &json)
 Deserialize from JSON. More...
 
virtual std::vector< Edge * > forward ()
 Parameter-free forward propagation. More...
 
virtual std::vector< Edge * > forward (Edge *input)
 Single input forward propagation. More...
 
virtual std::vector< Edge * > forward (std::vector< Edge * > inputs)
 Node invocation interface. More...
 
std::vector< Edge * > getAllInput ()
 Get all input edges. More...
 
std::vector< Edge * > getAllOutput ()
 Get all output edges. More...
 
size_t getCompletedSize ()
 Get completed count. More...
 
CompositeNodegetCompositeNode ()
 Get parent composite node. More...
 
bool getConstructed ()
 Get whether it's constructed. More...
 
bool getDebugFlag ()
 Get debug flag. More...
 
std::string getDesc ()
 Get node description. More...
 
std::string getDeveloper ()
 Get developer information. More...
 
virtual base::DeviceType getDeviceType ()
 Get device type. More...
 
std::map< std::string, std::vector< std::string > > getDropdownParams ()
 Get dropdown parameters. More...
 
virtual std::shared_ptr< base::ParamgetExternalParam (const std::string &key)
 Get external parameter. More...
 
GraphgetGraph ()
 Get parent graph. More...
 
bool getGraphFlag ()
 Get graph flag. More...
 
bool getInitialized ()
 Get whether it's initialized. More...
 
EdgegetInput (int index=0)
 Get input edge. More...
 
int getInputCount ()
 Get input edge count. More...
 
template<typename T >
T * getInputData (int index=0)
 Get input data (template method) More...
 
int getInputIndex (const std::string &name)
 Get input edge index by name. More...
 
std::string getInputName (int index=0)
 Get input edge name at specified index. More...
 
std::vector< std::string > getInputNames ()
 Get all input edge names. More...
 
std::vector< std::shared_ptr< EdgeTypeInfo > > getInputTypeInfo ()
 Get input type information. More...
 
std::vector< std::string > getIoParams ()
 Get IO parameter list. More...
 
IOType getIoType ()
 Get IO type. More...
 
std::string getKey ()
 Get node key. More...
 
virtual int getLoopCount ()
 Get loop count. More...
 
virtual int64_t getMemorySize ()
 Get memory size. More...
 
std::string getName ()
 Get node name. More...
 
NodeType getNodeType ()
 Get node type. More...
 
EdgegetOutput (int index=0)
 Get output edge. More...
 
int getOutputCount ()
 Get output edge count. More...
 
int getOutputIndex (const std::string &name)
 Get output edge index by name. More...
 
std::string getOutputName (int index=0)
 Get output edge name at specified index. More...
 
std::vector< std::string > getOutputNames ()
 Get all output edge names. More...
 
std::vector< std::shared_ptr< EdgeTypeInfo > > getOutputTypeInfo ()
 Get output type information. More...
 
virtual base::ParallelType getParallelType ()
 Get parallel type. More...
 
virtual base::ParamgetParam ()
 Get parameter. More...
 
virtual base::Status getParam (const std::string &key, base::Any &any)
 Get parameter (Any type) More...
 
virtual std::shared_ptr< base::ParamgetParamSharedPtr ()
 Get parameter (shared pointer) More...
 
virtual std::vector< std::string > getRealOutputsName ()
 Get real output names. More...
 
std::vector< std::string > getRequiredParams ()
 Get required parameter list. More...
 
virtual base::Any & getResourceWithoutState (const std::string &key)
 Get stateless resource. More...
 
template<typename T >
getResourceWithoutState (const std::string &key)
 Get stateless resource (template method) More...
 
virtual EdgegetResourceWithState (const std::string &key)
 Get stateful resource. More...
 
template<typename T >
T * getResourceWithState (const std::string &key)
 Get stateful resource (template method) More...
 
size_t getRunSize ()
 Get run count. More...
 
virtual std::shared_ptr< RunStatusgetRunStatus ()
 Get run status. More...
 
std::string getSource ()
 Get source information. More...
 
device::StreamgetStream ()
 Get compute stream. More...
 
bool getTimeProfileFlag ()
 Get time profile flag. More...
 
bool getTraceFlag ()
 Get trace flag. More...
 
std::vector< std::string > getUiParams ()
 Get UI parameter list. More...
 
std::string getVersion ()
 Get version number. More...
 
virtual base::Status init ()
 Initialize node. More...
 
virtual bool interrupt ()
 Interrupt execution. More...
 
bool isDynamicInput ()
 Check if it's dynamic input. More...
 
bool isDynamicOutput ()
 Check if it's dynamic output. More...
 
bool isInputsChanged (std::vector< Edge * > inputs)
 Check if inputs changed. More...
 
bool isRunning ()
 Check if it's running. More...
 
virtual base::Status loadFile (const std::string &path)
 Load from file. More...
 
 Node (const std::string &name)
 Constructor. More...
 
 Node (const std::string &name, std::vector< Edge * > inputs, std::vector< Edge * > outputs)
 Constructor. More...
 
virtual std::vector< Edge * > operator() ()
 Parameter-free invocation operator overload. More...
 
virtual std::vector< Edge * > operator() (Edge *input)
 Single input invocation operator overload. More...
 
virtual std::vector< Edge * > operator() (std::vector< Edge * > inputs)
 Node invocation operator overload. More...
 
base::Status removeDropdownParam (const std::string &dropdown_param)
 Remove dropdown parameter. More...
 
base::Status removeIoParam (const std::string &io_param)
 Remove IO parameter. More...
 
base::Status removeRequiredParam (const std::string &required_param)
 Remove required parameter. More...
 
base::Status removeUiParam (const std::string &ui_param)
 Remove UI parameter. More...
 
virtual base::Status run ()=0
 Run node (pure virtual function) More...
 
virtual base::Status saveFile (const std::string &path)
 Save to file. More...
 
virtual std::string serialize ()
 Serialize to JSON string. More...
 
virtual base::Status serialize (rapidjson::Value &json, rapidjson::Document::AllocatorType &allocator)
 Serialize to JSON. More...
 
base::Status setCompositeNode (CompositeNode *composite_node)
 Set parent composite node. More...
 
void setDebugFlag (bool flag)
 Set debug flag. More...
 
void setDesc (const std::string &desc)
 Set node description. More...
 
void setDeveloper (const std::string &developer)
 Set developer information. More...
 
virtual base::Status setDeviceType (base::DeviceType device_type)
 Set device type. More...
 
base::Status setDropdownParams (const std::map< std::string, std::vector< std::string >> &dropdown_params)
 Set dropdown parameters. More...
 
void setDynamicInput (bool is_dynamic_input)
 Set whether it's dynamic input. More...
 
void setDynamicOutput (bool is_dynamic_output)
 Set whether it's dynamic output. More...
 
virtual base::Status setExternalParam (const std::string &key, std::shared_ptr< base::Param > external_param)
 Set external parameter. More...
 
base::Status setGraph (Graph *graph)
 Set parent graph. More...
 
void setGraphFlag (bool flag)
 Set graph flag. More...
 
void setInitializedFlag (bool flag)
 Set initialized flag. More...
 
void setInnerFlag (bool flag)
 Set inner flag. More...
 
virtual base::Status setInput (Edge *input, int index=-1)
 Set input edge. More...
 
virtual base::Status setInputName (const std::string &name, int index=0)
 Set input edge name. More...
 
virtual base::Status setInputNames (const std::vector< std::string > &names)
 Set all input edge names. More...
 
virtual base::Status setInputs (std::vector< Edge * > inputs)
 Set all input edges. More...
 
virtual base::Status setInputSharedPtr (std::shared_ptr< Edge > input, int index=-1)
 Set input edge (shared pointer) More...
 
virtual base::Status setInputsSharedPtr (std::vector< std::shared_ptr< Edge >> inputs)
 Set all input edges (shared pointer) More...
 
base::Status setInputTypeInfo (std::shared_ptr< EdgeTypeInfo > input_type_info, std::string desc="")
 Set input type information. More...
 
template<typename T >
base::Status setInputTypeInfo (std::string desc="")
 Set input type information (template method) More...
 
base::Status setIoParams (const std::vector< std::string > &io_params)
 Set IO parameter list. More...
 
void setIoType (IOType io_type)
 Set IO type. More...
 
virtual base::Status setIterInput (Edge *input, int index=-1)
 Set iteration input edge. More...
 
void setKey (const std::string &key)
 Set node key. More...
 
virtual void setLoopCount (int loop_count)
 Set loop count. More...
 
virtual base::Status setMemory (device::Buffer *buffer)
 Set memory buffer. More...
 
void setName (const std::string &name)
 Set node name. More...
 
void setNodeType (NodeType node_type)
 Set node type. More...
 
virtual base::Status setOutput (Edge *output, int index=-1)
 Set output edge. More...
 
template<typename T >
base::Status setOutputData (T *obj, int index=0, bool is_external=true)
 Set output data (template method) More...
 
virtual base::Status setOutputName (const std::string &name, int index=0)
 Set output edge name. More...
 
virtual base::Status setOutputNames (const std::vector< std::string > &names)
 Set all output edge names. More...
 
virtual base::Status setOutputs (std::vector< Edge * > outputs)
 Set all output edges. More...
 
virtual base::Status setOutputSharedPtr (std::shared_ptr< Edge > output, int index=-1)
 Set output edge (shared pointer) More...
 
virtual base::Status setOutputsSharedPtr (std::vector< std::shared_ptr< Edge >> outputs)
 Set all output edges (shared pointer) More...
 
base::Status setOutputTypeInfo (std::shared_ptr< EdgeTypeInfo > output_type_info, std::string desc="")
 Set output type information. More...
 
template<typename T >
base::Status setOutputTypeInfo (std::string desc="")
 Set output type information (template method) More...
 
virtual base::Status setParallelType (const base::ParallelType &paralle_type)
 Set parallel type. More...
 
virtual base::Status setParam (base::Param *param)
 Set parameter. More...
 
virtual base::Status setParam (const std::string &key, base::Any &any)
 Set parameter (Any type) More...
 
virtual base::Status setParam (const std::string &key, const std::string &value)
 Set parameter (string type) More...
 
virtual base::Status setParamSharedPtr (std::shared_ptr< base::Param > param)
 Set parameter (shared pointer) More...
 
base::Status setRequiredParams (const std::vector< std::string > &required_params)
 Set required parameter list. More...
 
template<typename T >
base::Status setResourceWithState (const std::string &key, T *value, bool is_external=true)
 Set stateful resource (template method) More...
 
void setRunningFlag (bool flag)
 Set running flag. More...
 
void setSource (const std::string &source)
 Set source information. More...
 
void setStream (device::Stream *stream)
 Set compute stream. More...
 
void setTimeProfileFlag (bool flag)
 Set time profile flag. More...
 
virtual void setTraceFlag (bool flag)
 Set trace flag. More...
 
base::Status setUiParams (const std::vector< std::string > &ui_params)
 Set UI parameter list. More...
 
base::Status setVersion (const std::string &version)
 Set version number. More...
 
virtual bool synchronize ()
 Synchronize execution. More...
 
virtual base::Status toStaticGraph ()
 Convert to static graph. More...
 
virtual base::EdgeUpdateFlag updateInput ()
 Update input. More...
 
virtual ~Node ()
 

Protected Attributes

size_t completed_size_ = 0
 Completed count. More...
 
CompositeNodecomposite_node_ = nullptr
 Parent composite node pointer. More...
 
bool constructed_ = false
 Whether constructed. More...
 
std::string desc_
 Node description. More...
 
std::string developer_
 Developer information. More...
 
base::DeviceType device_type_
 Device type. More...
 
std::map< std::string, std::vector< std::string > > dropdown_params_
 Dropdown parameter mapping. More...
 
std::map< std::string, std::shared_ptr< base::Param > > external_param_
 External parameter mapping. More...
 
Graphgraph_ = nullptr
 Parent graph pointer. More...
 
bool initialized_ = false
 Whether initialized. More...
 
std::vector< std::shared_ptr< EdgeTypeInfo > > input_type_info_
 Input type information. More...
 
std::vector< Edge * > inputs_
 Input edge list. More...
 
std::map< std::string, Edge * > internal_outputs_
 Internal output edge mapping. More...
 
std::vector< std::string > io_params_
 IO parameter list. More...
 
IOType io_type_ = IOType::kIOTypeNone
 IO type. More...
 
bool is_composite_node_ = false
 Whether it's composite node. More...
 
bool is_condition_ = false
 Whether it's condition node. More...
 
bool is_debug_ = false
 Whether debugging is enabled. More...
 
bool is_dynamic_input_ = false
 When node input/output is dynamic, cannot set input_type_info_ and output_type_info_. More...
 
bool is_dynamic_output_ = false
 Whether it's dynamic output. More...
 
bool is_external_stream_ = false
 Whether it's external stream. More...
 
bool is_graph_ = false
 Whether it's graph node. More...
 
bool is_inner_ = false
 Whether it's internal node in graph. More...
 
bool is_loop_ = false
 Whether it's loop node. More...
 
bool is_running_ = false
 Whether running. More...
 
bool is_time_profile_ = false
 Whether time profiling is enabled. More...
 
bool is_trace_ = false
 Whether tracing is enabled (when serialized to json, it must be static graph) More...
 
std::string key_
 Node key. More...
 
int loop_count_ = -1
 Loop count. More...
 
std::string name_
 Node name. More...
 
NodeType node_type_ = NodeType::kNodeTypeIntermediate
 Node type. More...
 
std::vector< std::shared_ptr< EdgeTypeInfo > > output_type_info_
 Output type information. More...
 
std::vector< Edge * > outputs_
 Output edge list. More...
 
base::ParallelType parallel_type_ = base::kParallelTypeNone
 Parallel type. More...
 
bool parallel_type_set_ = false
 Whether parallel type is set. More...
 
std::shared_ptr< base::Paramparam_
 Node parameters. More...
 
std::vector< std::string > required_params_
 Required parameter list. More...
 
size_t run_size_ = 0
 Run count. More...
 
std::string source_
 Source information. More...
 
std::atomic< bool > stop_ {false}
 Stop flag. More...
 
device::Streamstream_ = nullptr
 Compute stream pointer. More...
 
bool traced_ = false
 Whether traced. More...
 
std::vector< std::string > ui_params_
 UI parameter list. More...
 
std::string version_ = "1.0.0"
 Version number. More...
 

Detailed Description

Node base class.

Basic computational unit in DAG graph, each node is responsible for allocating memory for its output edges

Note
Each node is responsible for allocating memory for its output edges

Definition at line 171 of file node.h.

Constructor & Destructor Documentation

◆ Node() [1/2]

nndeploy::dag::Node::Node ( const std::string &  name)

Constructor.

Parameters
nameNode name

◆ Node() [2/2]

nndeploy::dag::Node::Node ( const std::string &  name,
std::vector< Edge * >  inputs,
std::vector< Edge * >  outputs 
)

Constructor.

Parameters
nameNode name
inputsInput edge list
outputsOutput edge list

◆ ~Node()

virtual nndeploy::dag::Node::~Node ( )
virtual

Member Function Documentation

◆ addDropdownParam()

base::Status nndeploy::dag::Node::addDropdownParam ( const std::string &  dropdown_param,
const std::vector< std::string > &  dropdown_values 
)

Add dropdown parameter.

Parameters
dropdown_paramDropdown parameter name
dropdown_valuesDropdown option value list
Returns
Operation status

◆ addIoParam()

base::Status nndeploy::dag::Node::addIoParam ( const std::string &  io_param)

Add IO parameter.

Parameters
io_paramIO parameter
Returns
Operation status

◆ addRequiredParam()

base::Status nndeploy::dag::Node::addRequiredParam ( const std::string &  required_param)

Add required parameter.

Parameters
required_paramRequired parameter
Returns
Operation status

◆ addResourceWithoutState()

virtual base::Status nndeploy::dag::Node::addResourceWithoutState ( const std::string &  key,
const base::Any &  value 
)
virtual

Add stateless resource.

Parameters
keyResource key
valueResource value
Returns
Operation status

Reimplemented in nndeploy::dag::Graph.

◆ addResourceWithState()

virtual base::Status nndeploy::dag::Node::addResourceWithState ( const std::string &  key,
Edge edge 
)
virtual

Add stateful resource.

Parameters
keyResource key
edgeEdge pointer
Returns
Operation status

Reimplemented in nndeploy::dag::Graph.

◆ addUiParam()

base::Status nndeploy::dag::Node::addUiParam ( const std::string &  ui_param)

Add UI parameter.

Parameters
ui_paramUI parameter
Returns
Operation status

◆ checkInputs()

bool nndeploy::dag::Node::checkInputs ( std::vector< Edge * > &  inputs)

Check input edges.

Parameters
inputsInput edge list
Returns
Whether valid

◆ checkInterruptStatus()

virtual bool nndeploy::dag::Node::checkInterruptStatus ( )
virtual

Check interrupt status.

Returns
Interrupt status

◆ checkOutputs() [1/2]

bool nndeploy::dag::Node::checkOutputs ( std::vector< Edge * > &  outputs)

Check output edges.

Parameters
outputsOutput edge list
Returns
Whether valid

◆ checkOutputs() [2/2]

bool nndeploy::dag::Node::checkOutputs ( std::vector< std::string > &  outputs_name)

Check output edge names.

Parameters
outputs_nameOutput edge name list
Returns
Whether valid

◆ clearDropdownParams()

base::Status nndeploy::dag::Node::clearDropdownParams ( )

Clear dropdown parameters.

Returns
Operation status

◆ clearInterrupt()

virtual void nndeploy::dag::Node::clearInterrupt ( )
virtual

Clear interrupt status.

◆ clearIoParams()

base::Status nndeploy::dag::Node::clearIoParams ( )

Clear IO parameters.

Returns
Operation status

◆ clearRequiredParams()

base::Status nndeploy::dag::Node::clearRequiredParams ( )

Clear required parameters.

Returns
Operation status

◆ clearUiParams()

base::Status nndeploy::dag::Node::clearUiParams ( )

Clear UI parameters.

Returns
Operation status

◆ createInternalOutputEdge()

virtual Edge* nndeploy::dag::Node::createInternalOutputEdge ( const std::string &  name)
virtual

Create internal output edge.

Parameters
nameEdge name
Returns
Edge pointer

◆ createResourceWithState()

virtual Edge* nndeploy::dag::Node::createResourceWithState ( const std::string &  key)
virtual

Create stateful resource.

Parameters
keyResource key
Returns
Edge pointer

◆ defaultParam()

virtual base::Status nndeploy::dag::Node::defaultParam ( )
virtual

◆ deinit()

virtual base::Status nndeploy::dag::Node::deinit ( )
virtual

◆ deserialize() [1/2]

virtual base::Status nndeploy::dag::Node::deserialize ( const std::string &  json_str)
virtual

Deserialize from JSON string.

Parameters
json_strJSON string
Returns
Operation status

Reimplemented in nndeploy::dag::Graph, and nndeploy::dag::CompositeNode.

◆ deserialize() [2/2]

virtual base::Status nndeploy::dag::Node::deserialize ( rapidjson::Value &  json)
virtual

◆ forward() [1/3]

virtual std::vector<Edge *> nndeploy::dag::Node::forward ( )
virtual

Parameter-free forward propagation.

Returns
Returned edges

Reimplemented in nndeploy::dag::Graph.

◆ forward() [2/3]

virtual std::vector<Edge *> nndeploy::dag::Node::forward ( Edge input)
virtual

Single input forward propagation.

Parameters
inputInput edge
Returns
Returned edges

Reimplemented in nndeploy::dag::Graph, nndeploy::llm::Prefill, and nndeploy::llm::Decode.

◆ forward() [3/3]

virtual std::vector<Edge *> nndeploy::dag::Node::forward ( std::vector< Edge * >  inputs)
virtual

Node invocation interface.

Node invocation interface for inter-node calls

Parameters
inputsInput edges
Returns
Returned edges
Note
  1. If graph exists, return values are managed by graph
  2. If graph doesn't exist, return values are managed by node

Reimplemented in nndeploy::dag::Graph.

◆ getAllInput()

std::vector<Edge *> nndeploy::dag::Node::getAllInput ( )

Get all input edges.

Returns
Input edge list

◆ getAllOutput()

std::vector<Edge *> nndeploy::dag::Node::getAllOutput ( )

Get all output edges.

Returns
Output edge list

◆ getCompletedSize()

size_t nndeploy::dag::Node::getCompletedSize ( )

Get completed count.

Returns
Completed count

◆ getCompositeNode()

CompositeNode* nndeploy::dag::Node::getCompositeNode ( )

Get parent composite node.

Returns
Composite node pointer

◆ getConstructed()

bool nndeploy::dag::Node::getConstructed ( )

Get whether it's constructed.

Returns
Whether it's constructed

◆ getDebugFlag()

bool nndeploy::dag::Node::getDebugFlag ( )

Get debug flag.

Returns
Debug flag

◆ getDesc()

std::string nndeploy::dag::Node::getDesc ( )

Get node description.

Returns
Node description

◆ getDeveloper()

std::string nndeploy::dag::Node::getDeveloper ( )

Get developer information.

Returns
Developer name

◆ getDeviceType()

virtual base::DeviceType nndeploy::dag::Node::getDeviceType ( )
virtual

Get device type.

Returns
Device type

◆ getDropdownParams()

std::map<std::string, std::vector<std::string> > nndeploy::dag::Node::getDropdownParams ( )

Get dropdown parameters.

Returns
Dropdown parameter mapping

◆ getExternalParam()

virtual std::shared_ptr<base::Param> nndeploy::dag::Node::getExternalParam ( const std::string &  key)
virtual

Get external parameter.

Parameters
keyParameter key
Returns
External parameter shared pointer

Reimplemented in nndeploy::dag::Graph.

◆ getGraph()

Graph* nndeploy::dag::Node::getGraph ( )

Get parent graph.

Returns
Graph pointer

◆ getGraphFlag()

bool nndeploy::dag::Node::getGraphFlag ( )

Get graph flag.

Returns
Graph flag

◆ getInitialized()

bool nndeploy::dag::Node::getInitialized ( )

Get whether it's initialized.

Returns
Whether it's initialized

◆ getInput()

Edge* nndeploy::dag::Node::getInput ( int  index = 0)

Get input edge.

Parameters
indexInput edge index, default is 0
Returns
Input edge pointer

◆ getInputCount()

int nndeploy::dag::Node::getInputCount ( )

Get input edge count.

Returns
Input edge count

◆ getInputData()

template<typename T >
T* nndeploy::dag::Node::getInputData ( int  index = 0)
inline

Get input data (template method)

Template Parameters
TData type
Parameters
indexInput edge index, default is 0
Returns
Data pointer

Definition at line 809 of file node.h.

Here is the call graph for this function:

◆ getInputIndex()

int nndeploy::dag::Node::getInputIndex ( const std::string &  name)

Get input edge index by name.

Parameters
nameInput edge name
Returns
Input edge index

◆ getInputName()

std::string nndeploy::dag::Node::getInputName ( int  index = 0)

Get input edge name at specified index.

Parameters
indexInput edge index, default is 0
Returns
Input edge name

◆ getInputNames()

std::vector<std::string> nndeploy::dag::Node::getInputNames ( )

Get all input edge names.

Returns
Input edge name list

◆ getInputTypeInfo()

std::vector<std::shared_ptr<EdgeTypeInfo> > nndeploy::dag::Node::getInputTypeInfo ( )

Get input type information.

Returns
Input type information list

◆ getIoParams()

std::vector<std::string> nndeploy::dag::Node::getIoParams ( )

Get IO parameter list.

Returns
IO parameter list

◆ getIoType()

IOType nndeploy::dag::Node::getIoType ( )

Get IO type.

Returns
IO type

◆ getKey()

std::string nndeploy::dag::Node::getKey ( )

Get node key.

Returns
Node key

◆ getLoopCount()

virtual int nndeploy::dag::Node::getLoopCount ( )
virtual

Get loop count.

Returns
Loop count

Reimplemented in nndeploy::dag::Graph.

◆ getMemorySize()

virtual int64_t nndeploy::dag::Node::getMemorySize ( )
virtual

Get memory size.

Returns
Memory size (bytes)

Reimplemented in nndeploy::infer::Infer.

◆ getName()

std::string nndeploy::dag::Node::getName ( )

Get node name.

Returns
Node name

◆ getNodeType()

NodeType nndeploy::dag::Node::getNodeType ( )

Get node type.

Returns
Node type

◆ getOutput()

Edge* nndeploy::dag::Node::getOutput ( int  index = 0)

Get output edge.

Parameters
indexOutput edge index, default is 0
Returns
Output edge pointer

◆ getOutputCount()

int nndeploy::dag::Node::getOutputCount ( )

Get output edge count.

Returns
Output edge count

◆ getOutputIndex()

int nndeploy::dag::Node::getOutputIndex ( const std::string &  name)

Get output edge index by name.

Parameters
nameOutput edge name
Returns
Output edge index

◆ getOutputName()

std::string nndeploy::dag::Node::getOutputName ( int  index = 0)

Get output edge name at specified index.

Parameters
indexOutput edge index, default is 0
Returns
Output edge name

◆ getOutputNames()

std::vector<std::string> nndeploy::dag::Node::getOutputNames ( )

Get all output edge names.

Returns
Output edge name list

◆ getOutputTypeInfo()

std::vector<std::shared_ptr<EdgeTypeInfo> > nndeploy::dag::Node::getOutputTypeInfo ( )

Get output type information.

Returns
Output type information list

◆ getParallelType()

virtual base::ParallelType nndeploy::dag::Node::getParallelType ( )
virtual

Get parallel type.

Returns
Parallel type

◆ getParam() [1/2]

virtual base::Param* nndeploy::dag::Node::getParam ( )
virtual

Get parameter.

Returns
Parameter pointer

Reimplemented in nndeploy::preprocess::BatchPreprocess, and nndeploy::infer::Infer.

◆ getParam() [2/2]

virtual base::Status nndeploy::dag::Node::getParam ( const std::string &  key,
base::Any &  any 
)
virtual

Get parameter (Any type)

Parameters
keyParameter key
anyAny type parameter reference
Returns
Operation status

◆ getParamSharedPtr()

virtual std::shared_ptr<base::Param> nndeploy::dag::Node::getParamSharedPtr ( )
virtual

Get parameter (shared pointer)

Returns
Parameter shared pointer

Reimplemented in nndeploy::preprocess::BatchPreprocess, and nndeploy::infer::Infer.

◆ getRealOutputsName()

virtual std::vector<std::string> nndeploy::dag::Node::getRealOutputsName ( )
virtual

Get real output names.

Returns
Output name list

◆ getRequiredParams()

std::vector<std::string> nndeploy::dag::Node::getRequiredParams ( )

Get required parameter list.

Returns
Required parameter list

◆ getResourceWithoutState() [1/2]

virtual base::Any& nndeploy::dag::Node::getResourceWithoutState ( const std::string &  key)
virtual

Get stateless resource.

Parameters
keyResource key
Returns
Resource reference

Reimplemented in nndeploy::dag::Graph.

◆ getResourceWithoutState() [2/2]

template<typename T >
T nndeploy::dag::Node::getResourceWithoutState ( const std::string &  key)
inline

Get stateless resource (template method)

Template Parameters
TResource type
Parameters
keyResource key
Returns
Resource object

Definition at line 492 of file node.h.

◆ getResourceWithState() [1/2]

virtual Edge* nndeploy::dag::Node::getResourceWithState ( const std::string &  key)
virtual

Get stateful resource.

Parameters
keyResource key
Returns
Edge pointer

Reimplemented in nndeploy::dag::Graph.

◆ getResourceWithState() [2/2]

template<typename T >
T* nndeploy::dag::Node::getResourceWithState ( const std::string &  key)
inline

Get stateful resource (template method)

Template Parameters
TResource type
Parameters
keyResource key
Returns
Resource pointer

Definition at line 550 of file node.h.

Here is the call graph for this function:

◆ getRunSize()

size_t nndeploy::dag::Node::getRunSize ( )

Get run count.

Returns
Run count

◆ getRunStatus()

virtual std::shared_ptr<RunStatus> nndeploy::dag::Node::getRunStatus ( )
virtual

Get run status.

Returns
Run status shared pointer

◆ getSource()

std::string nndeploy::dag::Node::getSource ( )

Get source information.

Returns
Source information

◆ getStream()

device::Stream* nndeploy::dag::Node::getStream ( )

Get compute stream.

Returns
Compute stream pointer

◆ getTimeProfileFlag()

bool nndeploy::dag::Node::getTimeProfileFlag ( )

Get time profile flag.

Returns
Time profile flag

◆ getTraceFlag()

bool nndeploy::dag::Node::getTraceFlag ( )

Get trace flag.

Returns
Trace flag

◆ getUiParams()

std::vector<std::string> nndeploy::dag::Node::getUiParams ( )

Get UI parameter list.

Returns
UI parameter list

◆ getVersion()

std::string nndeploy::dag::Node::getVersion ( )

Get version number.

Returns
Version number

◆ init()

virtual base::Status nndeploy::dag::Node::init ( )
virtual

◆ interrupt()

virtual bool nndeploy::dag::Node::interrupt ( )
virtual

Interrupt execution.

Returns
Whether interruption succeeded

Reimplemented in nndeploy::dag::Graph.

◆ isDynamicInput()

bool nndeploy::dag::Node::isDynamicInput ( )

Check if it's dynamic input.

Returns
Whether it's dynamic input

◆ isDynamicOutput()

bool nndeploy::dag::Node::isDynamicOutput ( )

Check if it's dynamic output.

Returns
Whether it's dynamic output

◆ isInputsChanged()

bool nndeploy::dag::Node::isInputsChanged ( std::vector< Edge * >  inputs)

Check if inputs changed.

Parameters
inputsInput edge list
Returns
Whether changed

◆ isRunning()

bool nndeploy::dag::Node::isRunning ( )

Check if it's running.

Returns
Whether it's running

◆ loadFile()

virtual base::Status nndeploy::dag::Node::loadFile ( const std::string &  path)
virtual

Load from file.

Parameters
pathFile path
Returns
Operation status

◆ operator()() [1/3]

virtual std::vector<Edge *> nndeploy::dag::Node::operator() ( )
virtual

Parameter-free invocation operator overload.

Returns
Returned edges

Reimplemented in nndeploy::dag::Graph.

◆ operator()() [2/3]

virtual std::vector<Edge *> nndeploy::dag::Node::operator() ( Edge input)
virtual

Single input invocation operator overload.

Parameters
inputInput edge
Returns
Returned edges

Reimplemented in nndeploy::dag::Graph.

◆ operator()() [3/3]

virtual std::vector<Edge *> nndeploy::dag::Node::operator() ( std::vector< Edge * >  inputs)
virtual

Node invocation operator overload.

Parameters
inputsInput edges
Returns
Returned edges

Reimplemented in nndeploy::dag::Graph.

◆ removeDropdownParam()

base::Status nndeploy::dag::Node::removeDropdownParam ( const std::string &  dropdown_param)

Remove dropdown parameter.

Parameters
dropdown_paramDropdown parameter name
Returns
Operation status

◆ removeIoParam()

base::Status nndeploy::dag::Node::removeIoParam ( const std::string &  io_param)

Remove IO parameter.

Parameters
io_paramIO parameter
Returns
Operation status

◆ removeRequiredParam()

base::Status nndeploy::dag::Node::removeRequiredParam ( const std::string &  required_param)

Remove required parameter.

Parameters
required_paramRequired parameter
Returns
Operation status

◆ removeUiParam()

base::Status nndeploy::dag::Node::removeUiParam ( const std::string &  ui_param)

Remove UI parameter.

Parameters
ui_paramUI parameter
Returns
Operation status

◆ run()

virtual base::Status nndeploy::dag::Node::run ( )
pure virtual

Run node (pure virtual function)

Returns
Run status code

Implemented in nndeploy::tokenizer::TokenizerDecode, nndeploy::tokenizer::TokenizerEncode, nndeploy::llm::AbstractLlmInfer, nndeploy::codec::Encode, nndeploy::codec::Decode, nndeploy::dag::ConstNode, nndeploy::dag::CompositeNode, nndeploy::llm::StreamOut, nndeploy::track::VisMOT, nndeploy::super_resolution::SuperResolutionPostProcess, nndeploy::segment::DrawMask, nndeploy::qwen::QwenDecode, nndeploy::qwen::QwenPrefill, nndeploy::qwen::PrintNode, nndeploy::qwen::PromptNode, nndeploy::qwen::DecodeSampleNode, nndeploy::qwen::PrefillSampleNode, nndeploy::qwen::DecodeEmbeddingNode, nndeploy::qwen::PrefillEmbeddingNode, nndeploy::preprocess::WarpAffineCvtNormTrans, nndeploy::preprocess::CvtResizePadNormTrans, nndeploy::preprocess::CvtResizeNormTrans, nndeploy::preprocess::CvtResizeCropNormTrans, nndeploy::preprocess::CvtNormTrans, nndeploy::preprocess::ConvertTo, nndeploy::preprocess::BatchPreprocess, nndeploy::ocr::RecognizerPostProcess, nndeploy::ocr::RecognizerPreProcess, nndeploy::ocr::PrintOcrNode, nndeploy::ocr::RotateImage180, nndeploy::ocr::RotateCropImage, nndeploy::ocr::DrawDetectorBox, nndeploy::ocr::DetectorPostProcess, nndeploy::ocr::DetectorPreProcess, nndeploy::ocr::ClassifierPostProcess, nndeploy::ocr::ClassifierPreProcess, nndeploy::matting::VisMatting, nndeploy::llm::Sampler, nndeploy::llm::Prompt, nndeploy::llm::LlmOut, nndeploy::llm::LlmInfer, nndeploy::llm::Embedding, nndeploy::llm::DefaultLlmInfer, nndeploy::infer::Infer, nndeploy::detect::YoloMultiConvDrawBox, nndeploy::detect::DrawBox, nndeploy::classification::DrawLable, nndeploy::classification::ClassificationPostProcess, nndeploy::dag::Loop, nndeploy::dag::Graph, nndeploy::dag::Condition, and nndeploy::dag::Comment.

◆ saveFile()

virtual base::Status nndeploy::dag::Node::saveFile ( const std::string &  path)
virtual

Save to file.

Parameters
pathFile path
Returns
Operation status

◆ serialize() [1/2]

virtual std::string nndeploy::dag::Node::serialize ( )
virtual

Serialize to JSON string.

Returns
JSON string

Reimplemented in nndeploy::dag::Condition, nndeploy::dag::Graph, nndeploy::dag::Condition, and nndeploy::dag::CompositeNode.

◆ serialize() [2/2]

virtual base::Status nndeploy::dag::Node::serialize ( rapidjson::Value &  json,
rapidjson::Document::AllocatorType &  allocator 
)
virtual

◆ setCompositeNode()

base::Status nndeploy::dag::Node::setCompositeNode ( CompositeNode composite_node)

Set parent composite node.

Parameters
composite_nodeComposite node pointer
Returns
Operation status

◆ setDebugFlag()

void nndeploy::dag::Node::setDebugFlag ( bool  flag)

Set debug flag.

Parameters
flagFlag value

◆ setDesc()

void nndeploy::dag::Node::setDesc ( const std::string &  desc)

Set node description.

Parameters
descNode description

◆ setDeveloper()

void nndeploy::dag::Node::setDeveloper ( const std::string &  developer)

Set developer information.

Parameters
developerDeveloper name

◆ setDeviceType()

virtual base::Status nndeploy::dag::Node::setDeviceType ( base::DeviceType  device_type)
virtual

Set device type.

Parameters
device_typeDevice type
Returns
Operation status

◆ setDropdownParams()

base::Status nndeploy::dag::Node::setDropdownParams ( const std::map< std::string, std::vector< std::string >> &  dropdown_params)

Set dropdown parameters.

Parameters
dropdown_paramsDropdown parameter mapping
Returns
Operation status

◆ setDynamicInput()

void nndeploy::dag::Node::setDynamicInput ( bool  is_dynamic_input)

Set whether it's dynamic input.

Parameters
is_dynamic_inputWhether it's dynamic input

◆ setDynamicOutput()

void nndeploy::dag::Node::setDynamicOutput ( bool  is_dynamic_output)

Set whether it's dynamic output.

Parameters
is_dynamic_outputWhether it's dynamic output

◆ setExternalParam()

virtual base::Status nndeploy::dag::Node::setExternalParam ( const std::string &  key,
std::shared_ptr< base::Param external_param 
)
virtual

Set external parameter.

Parameters
keyParameter key
external_paramExternal parameter shared pointer
Returns
Operation status

Reimplemented in nndeploy::dag::Graph.

◆ setGraph()

base::Status nndeploy::dag::Node::setGraph ( Graph graph)

Set parent graph.

Parameters
graphGraph pointer
Returns
Operation status

◆ setGraphFlag()

void nndeploy::dag::Node::setGraphFlag ( bool  flag)

Set graph flag.

Parameters
flagFlag value

◆ setInitializedFlag()

void nndeploy::dag::Node::setInitializedFlag ( bool  flag)

Set initialized flag.

Parameters
flagFlag value

◆ setInnerFlag()

void nndeploy::dag::Node::setInnerFlag ( bool  flag)

Set inner flag.

Parameters
flagFlag value

◆ setInput()

virtual base::Status nndeploy::dag::Node::setInput ( Edge input,
int  index = -1 
)
virtual

Set input edge.

Parameters
inputInput edge pointer
indexInput edge index, default is -1 (auto assign)
Returns
Operation status

Reimplemented in nndeploy::dag::Graph, and nndeploy::dag::CompositeNode.

◆ setInputName()

virtual base::Status nndeploy::dag::Node::setInputName ( const std::string &  name,
int  index = 0 
)
virtual

Set input edge name.

Parameters
nameInput edge name
indexInput edge index, default is 0
Returns
Operation status

Reimplemented in nndeploy::infer::Infer.

◆ setInputNames()

virtual base::Status nndeploy::dag::Node::setInputNames ( const std::vector< std::string > &  names)
virtual

Set all input edge names.

Parameters
namesInput edge name list
Returns
Operation status

Reimplemented in nndeploy::infer::Infer.

◆ setInputs()

virtual base::Status nndeploy::dag::Node::setInputs ( std::vector< Edge * >  inputs)
virtual

Set all input edges.

Parameters
inputsInput edge list
Returns
Operation status

Reimplemented in nndeploy::dag::Graph, and nndeploy::dag::CompositeNode.

◆ setInputSharedPtr()

virtual base::Status nndeploy::dag::Node::setInputSharedPtr ( std::shared_ptr< Edge input,
int  index = -1 
)
virtual

Set input edge (shared pointer)

Parameters
inputInput edge shared pointer
indexInput edge index, default is -1 (auto assign)
Returns
Operation status

Reimplemented in nndeploy::dag::Graph, and nndeploy::dag::CompositeNode.

◆ setInputsSharedPtr()

virtual base::Status nndeploy::dag::Node::setInputsSharedPtr ( std::vector< std::shared_ptr< Edge >>  inputs)
virtual

Set all input edges (shared pointer)

Parameters
inputsInput edge shared pointer list
Returns
Operation status

Reimplemented in nndeploy::dag::Graph, and nndeploy::dag::CompositeNode.

◆ setInputTypeInfo() [1/2]

base::Status nndeploy::dag::Node::setInputTypeInfo ( std::shared_ptr< EdgeTypeInfo input_type_info,
std::string  desc = "" 
)

Set input type information.

Parameters
input_type_infoInput type information shared pointer
descDescription information, default is empty
Returns
Operation status

◆ setInputTypeInfo() [2/2]

template<typename T >
base::Status nndeploy::dag::Node::setInputTypeInfo ( std::string  desc = "")
inline

Set input type information (template method)

Template Parameters
TData type
Parameters
descDescription information, default is empty
Returns
Operation status

Definition at line 1030 of file node.h.

Here is the call graph for this function:

◆ setIoParams()

base::Status nndeploy::dag::Node::setIoParams ( const std::vector< std::string > &  io_params)

Set IO parameter list.

Parameters
io_paramsIO parameter list
Returns
Operation status

◆ setIoType()

void nndeploy::dag::Node::setIoType ( IOType  io_type)

Set IO type.

Parameters
io_typeIO type

◆ setIterInput()

virtual base::Status nndeploy::dag::Node::setIterInput ( Edge input,
int  index = -1 
)
virtual

Set iteration input edge.

Parameters
inputInput edge pointer
indexInput edge index, default is -1 (auto assign)
Returns
Operation status

Reimplemented in nndeploy::llm::LlmInfer, and nndeploy::llm::DefaultLlmInfer.

◆ setKey()

void nndeploy::dag::Node::setKey ( const std::string &  key)

Set node key.

Parameters
keyNode key

◆ setLoopCount()

virtual void nndeploy::dag::Node::setLoopCount ( int  loop_count)
virtual

Set loop count.

Parameters
loop_countLoop count

Reimplemented in nndeploy::codec::Decode, and nndeploy::dag::Graph.

◆ setMemory()

virtual base::Status nndeploy::dag::Node::setMemory ( device::Buffer buffer)
virtual

Set memory buffer.

Parameters
bufferMemory buffer pointer
Returns
Operation status

Reimplemented in nndeploy::infer::Infer.

◆ setName()

void nndeploy::dag::Node::setName ( const std::string &  name)

Set node name.

Parameters
nameNode name

◆ setNodeType()

void nndeploy::dag::Node::setNodeType ( NodeType  node_type)

Set node type.

Parameters
node_typeNode type

◆ setOutput()

virtual base::Status nndeploy::dag::Node::setOutput ( Edge output,
int  index = -1 
)
virtual

Set output edge.

Parameters
outputOutput edge pointer
indexOutput edge index, default is -1 (auto assign)
Returns
Operation status

Reimplemented in nndeploy::dag::Graph, and nndeploy::dag::CompositeNode.

◆ setOutputData()

template<typename T >
base::Status nndeploy::dag::Node::setOutputData ( T *  obj,
int  index = 0,
bool  is_external = true 
)
inline

Set output data (template method)

Template Parameters
TData type
Parameters
objData object pointer
indexOutput edge index, default is 0
is_externalWhether it's external data, default is true
Returns
Operation status

Definition at line 826 of file node.h.

Here is the call graph for this function:

◆ setOutputName()

virtual base::Status nndeploy::dag::Node::setOutputName ( const std::string &  name,
int  index = 0 
)
virtual

Set output edge name.

Parameters
nameOutput edge name
indexOutput edge index, default is 0
Returns
Operation status

Reimplemented in nndeploy::infer::Infer.

◆ setOutputNames()

virtual base::Status nndeploy::dag::Node::setOutputNames ( const std::vector< std::string > &  names)
virtual

Set all output edge names.

Parameters
namesOutput edge name list
Returns
Operation status

Reimplemented in nndeploy::infer::Infer.

◆ setOutputs()

virtual base::Status nndeploy::dag::Node::setOutputs ( std::vector< Edge * >  outputs)
virtual

Set all output edges.

Parameters
outputsOutput edge list
Returns
Operation status

Reimplemented in nndeploy::dag::Graph, and nndeploy::dag::CompositeNode.

◆ setOutputSharedPtr()

virtual base::Status nndeploy::dag::Node::setOutputSharedPtr ( std::shared_ptr< Edge output,
int  index = -1 
)
virtual

Set output edge (shared pointer)

Parameters
outputOutput edge shared pointer
indexOutput edge index, default is -1 (auto assign)
Returns
Operation status

Reimplemented in nndeploy::dag::Graph, and nndeploy::dag::CompositeNode.

◆ setOutputsSharedPtr()

virtual base::Status nndeploy::dag::Node::setOutputsSharedPtr ( std::vector< std::shared_ptr< Edge >>  outputs)
virtual

Set all output edges (shared pointer)

Parameters
outputsOutput edge shared pointer list
Returns
Operation status

Reimplemented in nndeploy::dag::Graph, and nndeploy::dag::CompositeNode.

◆ setOutputTypeInfo() [1/2]

base::Status nndeploy::dag::Node::setOutputTypeInfo ( std::shared_ptr< EdgeTypeInfo output_type_info,
std::string  desc = "" 
)

Set output type information.

Parameters
output_type_infoOutput type information shared pointer
descDescription information, default is empty
Returns
Operation status

◆ setOutputTypeInfo() [2/2]

template<typename T >
base::Status nndeploy::dag::Node::setOutputTypeInfo ( std::string  desc = "")
inline

Set output type information (template method)

Template Parameters
TData type
Parameters
descDescription information, default is empty
Returns
Operation status

Definition at line 1061 of file node.h.

Here is the call graph for this function:

◆ setParallelType()

virtual base::Status nndeploy::dag::Node::setParallelType ( const base::ParallelType paralle_type)
virtual

Set parallel type.

Parameters
paralle_typeParallel type
Returns
Operation status

◆ setParam() [1/3]

virtual base::Status nndeploy::dag::Node::setParam ( base::Param param)
virtual

Set parameter.

Parameters
paramParameter pointer
Returns
Operation status

Reimplemented in nndeploy::preprocess::BatchPreprocess, and nndeploy::infer::Infer.

◆ setParam() [2/3]

virtual base::Status nndeploy::dag::Node::setParam ( const std::string &  key,
base::Any &  any 
)
virtual

Set parameter (Any type)

Parameters
keyParameter key
anyAny type parameter
Returns
Operation status

◆ setParam() [3/3]

virtual base::Status nndeploy::dag::Node::setParam ( const std::string &  key,
const std::string &  value 
)
virtual

Set parameter (string type)

Parameters
keyParameter key
valueParameter value
Returns
Operation status

◆ setParamSharedPtr()

virtual base::Status nndeploy::dag::Node::setParamSharedPtr ( std::shared_ptr< base::Param param)
virtual

Set parameter (shared pointer)

Parameters
paramParameter shared pointer
Returns
Operation status

Reimplemented in nndeploy::preprocess::BatchPreprocess, and nndeploy::infer::Infer.

◆ setRequiredParams()

base::Status nndeploy::dag::Node::setRequiredParams ( const std::vector< std::string > &  required_params)

Set required parameter list.

Parameters
required_paramsRequired parameter list
Returns
Operation status

◆ setResourceWithState()

template<typename T >
base::Status nndeploy::dag::Node::setResourceWithState ( const std::string &  key,
T *  value,
bool  is_external = true 
)
inline

Set stateful resource (template method)

Template Parameters
TResource type
Parameters
keyResource key
valueResource value pointer
is_externalWhether it's external resource, default is true
Returns
Operation status

Definition at line 533 of file node.h.

Here is the call graph for this function:

◆ setRunningFlag()

void nndeploy::dag::Node::setRunningFlag ( bool  flag)

Set running flag.

Parameters
flagFlag value

◆ setSource()

void nndeploy::dag::Node::setSource ( const std::string &  source)

Set source information.

Parameters
sourceSource information

◆ setStream()

void nndeploy::dag::Node::setStream ( device::Stream stream)

Set compute stream.

Parameters
streamCompute stream pointer

◆ setTimeProfileFlag()

void nndeploy::dag::Node::setTimeProfileFlag ( bool  flag)

Set time profile flag.

Parameters
flagFlag value

◆ setTraceFlag()

virtual void nndeploy::dag::Node::setTraceFlag ( bool  flag)
virtual

Set trace flag.

Parameters
flagFlag value

Reimplemented in nndeploy::dag::Graph.

◆ setUiParams()

base::Status nndeploy::dag::Node::setUiParams ( const std::vector< std::string > &  ui_params)

Set UI parameter list.

Parameters
ui_paramsUI parameter list
Returns
Operation status

◆ setVersion()

base::Status nndeploy::dag::Node::setVersion ( const std::string &  version)

Set version number.

Parameters
versionVersion number
Returns
Operation status

◆ synchronize()

virtual bool nndeploy::dag::Node::synchronize ( )
virtual

Synchronize execution.

Returns
Whether synchronization succeeded

Reimplemented in nndeploy::dag::Graph.

◆ toStaticGraph()

virtual base::Status nndeploy::dag::Node::toStaticGraph ( )
virtual

Convert to static graph.

Returns
Operation status

Reimplemented in nndeploy::dag::Graph.

◆ updateInput()

virtual base::EdgeUpdateFlag nndeploy::dag::Node::updateInput ( )
virtual

Member Data Documentation

◆ completed_size_

size_t nndeploy::dag::Node::completed_size_ = 0
protected

Completed count.

Definition at line 1332 of file node.h.

◆ composite_node_

CompositeNode* nndeploy::dag::Node::composite_node_ = nullptr
protected

Parent composite node pointer.

Definition at line 1322 of file node.h.

◆ constructed_

bool nndeploy::dag::Node::constructed_ = false
protected

Whether constructed.

Definition at line 1325 of file node.h.

◆ desc_

std::string nndeploy::dag::Node::desc_
protected

Node description.

Definition at line 1294 of file node.h.

◆ developer_

std::string nndeploy::dag::Node::developer_
protected

Developer information.

Definition at line 1292 of file node.h.

◆ device_type_

base::DeviceType nndeploy::dag::Node::device_type_
protected

Device type.

Definition at line 1295 of file node.h.

◆ dropdown_params_

std::map<std::string, std::vector<std::string> > nndeploy::dag::Node::dropdown_params_
protected

Dropdown parameter mapping.

Definition at line 1352 of file node.h.

◆ external_param_

std::map<std::string, std::shared_ptr<base::Param> > nndeploy::dag::Node::external_param_
protected

External parameter mapping.

Definition at line 1305 of file node.h.

◆ graph_

Graph* nndeploy::dag::Node::graph_ = nullptr
protected

Parent graph pointer.

Definition at line 1321 of file node.h.

◆ initialized_

bool nndeploy::dag::Node::initialized_ = false
protected

Whether initialized.

Definition at line 1329 of file node.h.

◆ input_type_info_

std::vector<std::shared_ptr<EdgeTypeInfo> > nndeploy::dag::Node::input_type_info_
protected

Input type information.

Definition at line 1315 of file node.h.

◆ inputs_

std::vector<Edge *> nndeploy::dag::Node::inputs_
protected

Input edge list.

Definition at line 1317 of file node.h.

◆ internal_outputs_

std::map<std::string, Edge *> nndeploy::dag::Node::internal_outputs_
protected

Internal output edge mapping.

Definition at line 1319 of file node.h.

◆ io_params_

std::vector<std::string> nndeploy::dag::Node::io_params_
protected

IO parameter list.

Definition at line 1351 of file node.h.

◆ io_type_

IOType nndeploy::dag::Node::io_type_ = IOType::kIOTypeNone
protected

IO type.

Definition at line 1343 of file node.h.

◆ is_composite_node_

bool nndeploy::dag::Node::is_composite_node_ = false
protected

Whether it's composite node.

Definition at line 1340 of file node.h.

◆ is_condition_

bool nndeploy::dag::Node::is_condition_ = false
protected

Whether it's condition node.

Definition at line 1339 of file node.h.

◆ is_debug_

bool nndeploy::dag::Node::is_debug_ = false
protected

Whether debugging is enabled.

Definition at line 1334 of file node.h.

◆ is_dynamic_input_

bool nndeploy::dag::Node::is_dynamic_input_ = false
protected

When node input/output is dynamic, cannot set input_type_info_ and output_type_info_.

  1. Type is uncertain
  2. Count is uncertain Whether it's dynamic input

Definition at line 1312 of file node.h.

◆ is_dynamic_output_

bool nndeploy::dag::Node::is_dynamic_output_ = false
protected

Whether it's dynamic output.

Definition at line 1313 of file node.h.

◆ is_external_stream_

bool nndeploy::dag::Node::is_external_stream_ = false
protected

Whether it's external stream.

Indicates whether the compute stream is provided externally

Definition at line 1301 of file node.h.

◆ is_graph_

bool nndeploy::dag::Node::is_graph_ = false
protected

Whether it's graph node.

Definition at line 1337 of file node.h.

◆ is_inner_

bool nndeploy::dag::Node::is_inner_ = false
protected

Whether it's internal node in graph.

Definition at line 1326 of file node.h.

◆ is_loop_

bool nndeploy::dag::Node::is_loop_ = false
protected

Whether it's loop node.

Definition at line 1338 of file node.h.

◆ is_running_

bool nndeploy::dag::Node::is_running_ = false
protected

Whether running.

Definition at line 1330 of file node.h.

◆ is_time_profile_

bool nndeploy::dag::Node::is_time_profile_ = false
protected

Whether time profiling is enabled.

Definition at line 1333 of file node.h.

◆ is_trace_

bool nndeploy::dag::Node::is_trace_ = false
protected

Whether tracing is enabled (when serialized to json, it must be static graph)

Definition at line 1335 of file node.h.

◆ key_

std::string nndeploy::dag::Node::key_
protected

Node key.

Node key used for node registration and creation, full type name like nndeploy::dag::Node, must be specified in constructor

Definition at line 1290 of file node.h.

◆ loop_count_

int nndeploy::dag::Node::loop_count_ = -1
protected

Loop count.

Definition at line 1345 of file node.h.

◆ name_

std::string nndeploy::dag::Node::name_
protected

Node name.

Definition at line 1291 of file node.h.

◆ node_type_

NodeType nndeploy::dag::Node::node_type_ = NodeType::kNodeTypeIntermediate
protected

Node type.

Definition at line 1342 of file node.h.

◆ output_type_info_

std::vector<std::shared_ptr<EdgeTypeInfo> > nndeploy::dag::Node::output_type_info_
protected

Output type information.

Definition at line 1316 of file node.h.

◆ outputs_

std::vector<Edge *> nndeploy::dag::Node::outputs_
protected

Output edge list.

Definition at line 1318 of file node.h.

◆ parallel_type_

base::ParallelType nndeploy::dag::Node::parallel_type_ = base::kParallelTypeNone
protected

Parallel type.

Definition at line 1328 of file node.h.

◆ parallel_type_set_

bool nndeploy::dag::Node::parallel_type_set_ = false
protected

Whether parallel type is set.

Definition at line 1327 of file node.h.

◆ param_

std::shared_ptr<base::Param> nndeploy::dag::Node::param_
protected

Node parameters.

Definition at line 1304 of file node.h.

◆ required_params_

std::vector<std::string> nndeploy::dag::Node::required_params_
protected

Required parameter list.

Definition at line 1349 of file node.h.

◆ run_size_

size_t nndeploy::dag::Node::run_size_ = 0
protected

Run count.

Definition at line 1331 of file node.h.

◆ source_

std::string nndeploy::dag::Node::source_
protected

Source information.

Definition at line 1293 of file node.h.

◆ stop_

std::atomic<bool> nndeploy::dag::Node::stop_ {false}
protected

Stop flag.

Definition at line 1346 of file node.h.

◆ stream_

device::Stream* nndeploy::dag::Node::stream_ = nullptr
protected

Compute stream pointer.

Definition at line 1302 of file node.h.

◆ traced_

bool nndeploy::dag::Node::traced_ = false
protected

Whether traced.

Definition at line 1336 of file node.h.

◆ ui_params_

std::vector<std::string> nndeploy::dag::Node::ui_params_
protected

UI parameter list.

Definition at line 1350 of file node.h.

◆ version_

std::string nndeploy::dag::Node::version_ = "1.0.0"
protected

Version number.

Definition at line 1348 of file node.h.


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