Skip to content
Snippets Groups Projects
Commit a1e2eb2a authored by Octave Perrin's avatar Octave Perrin
Browse files

continuation

parent 44b51b82
No related branches found
No related tags found
No related merge requests found
......@@ -445,16 +445,14 @@ public:
bool includeLearnableParam = true);
/**
//@todo here i am
* @brief Include a Node in the current GraphView and link it to another
* already contained Node.
* already contained Node as its child.
*
* @param toOtherNode Pointer to the Node to add.
* @param fromOutNode Pointer to the already included Node the new Node will
* be linked to (it will become a parent of the new Node). If the GraphView
* only has one output Node, then default to this Node.
* @param fromTensor Ouput Tensor ID of the already included Node. Default to
* 0.
* @param fromTensor Ouput Tensor ID of the already included Node. Default to 0.
* @param toTensor Input Tensor ID of the new Node. Default to gk_IODefaultIndex, meaning
* first available data input for the Node.
*/
......@@ -464,15 +462,14 @@ public:
/**
* @brief Include a Node in the current GraphView and link it to another
* already contained Node.
* already contained Node as its child.
*
* @param toOtherNode Pointer to the Node to add.
* @param fromOutNodeName Name of the already included Node the new Node will
* be linked to (it will become a parent of the new Node). As a name is
* optional, ensure such Node is in the GraphView or it will send back an
* error message.
* @param fromTensor Ouput Tensor ID of the already included Node. Default to
* 0.
* @param fromTensor Ouput Tensor ID of the already included Node. Default to 0.
* @param toTensor Input Tensor ID of the new Node. Default to gk_IODefaultIndex, meaning
* first available data input for the Node.
*/
......@@ -483,6 +480,10 @@ public:
addChild(toOtherNode, mNodeRegistry.at(fromOutNodeName), fromTensor, toTensor);
}
/**
//todo only updates registery with pair (newName, node) but does not ensure node's name is indeed newName
* @brief
*/
inline void updateNodeName(const std::shared_ptr<Node>& node, const std::string& newName){
if (!newName.empty()) {
auto itNew = mNodeRegistry.insert(std::make_pair(newName, node));
......@@ -518,6 +519,7 @@ public:
std::pair<NodePtr, IOIndex_t>(nullptr, gk_IODefaultIndex));
/**
//@todo not implemented
* @brief Swap two Node instances if possible.
* @param node
* @param otherNode
......@@ -526,10 +528,13 @@ public:
*/
bool swap(Node &node, Node &otherNode);
//@todo not implemented
void link(const std::string& name1_inID, const std::string& name2_outID);
/**
* @brief Insert a node (newParentNode) as a parent of the passed node (childNode).
//@todo why some functions have separate inputs for Node and TensorID (such as here) while other put them in a pair (consistency would be nice)
* @brief Insert a node (newParentNode) as a parent of the passed node (childNode)
* and as a child of the current parent of the Node.
*
* @param childNode Node that gets a new parent.
* @param newParentNode Inserted Node.
......@@ -544,6 +549,7 @@ public:
IOIndex_t newParentOutputTensorIdx);
/**
//@todo seems messed up, imma skip it for now
* @brief Replace a set of Nodes in every available GraphView with a new set of Nodes if possible.
* Both sets should include all the necessary Producers.
* @details There are 3 cases of replacement:
......@@ -569,6 +575,7 @@ public:
* @brief Clone the GraphView with shared Operators. It is a new GraphView, with cloned Nodes, but the new Nodes refer to the same Operators as the original ones.
* @return std::shared_ptr<GraphView>
*/
//@todo here i am
inline std::shared_ptr<GraphView> cloneSharedOperators() const {
return cloneCallback(&Node::cloneSharedOperators);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment