Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • eclipse/aidge/aidge_core
  • hrouis/aidge_core
  • mszczep/aidge_core
  • oantoni/aidge_core
  • cguillon/aidge_core
  • jeromeh/aidge_core
  • axelfarr/aidge_core
  • cmoineau/aidge_core
  • noamzerah/aidge_core
  • lrakotoarivony/aidge_core
  • silvanosky/aidge_core
  • maab05/aidge_core
  • mick94/aidge_core
  • lucaslopez/aidge_core_ll
  • wboussella/aidge_core
  • farnez/aidge_core
  • mnewson/aidge_core
  • gallasko/aidge_core
  • fsperotto/aidge_core
  • rumman157/aidge_core
  • rboumbar/aidge-core-benchmark
21 results
Show changes
Commits on Source (1)
......@@ -252,10 +252,10 @@ public:
if ((inputCategory(i) == InputCategory::Data || inputCategory(i) == InputCategory::OptionalData)
&& input(i).second == gk_IODefaultIndex)
{
break;
return i;
}
}
return (i < nbInputs()) ? i : gk_IODefaultIndex;
return gk_IODefaultIndex;
}
......
......@@ -147,7 +147,9 @@ bool Aidge::Node::valid() const {
Aidge::IOIndex_t Aidge::Node::getNbFreeDataInputs() const {
IOIndex_t nbFreeDataIn = 0;
for (IOIndex_t i = 0; i < nbInputs(); ++i) {
if (input(i).second == gk_IODefaultIndex) {
if ((inputCategory(i) == InputCategory::Data
|| inputCategory(i) == InputCategory::OptionalData)
&& input(i).second == gk_IODefaultIndex) {
++nbFreeDataIn;
}
}
......@@ -387,10 +389,17 @@ void Aidge::Node::addChild(const std::shared_ptr<Node>& otherNode, const IOIndex
void Aidge::Node::addChild(std::shared_ptr<GraphView> otherView, const IOIndex_t outId,
std::pair<std::shared_ptr<Node>, IOIndex_t> otherInId) {
if (!otherInId.first) {
AIDGE_ASSERT(otherView->inputNodes().size() == 1U,
AIDGE_ASSERT(otherView->getNbFreeDataInputs() == 1U,
"Input node of GraphView {} need to be specified, because it has more than one input ({} inputs), when trying to add it as a child of node {} (of type {})",
otherView->name(), otherView->inputNodes().size(), name(), type());
otherInId.first = *(otherView->inputNodes().begin());
otherInId.first = *(std::find_if(
otherView->inputNodes().begin(),
otherView->inputNodes().end(),
[](const auto &node) {
return node->getFirstFreeDataInput() != gk_IODefaultIndex;
}
));
}
otherInId.second = (otherInId.second != gk_IODefaultIndex)
? otherInId.second
......