Skip to content
Snippets Groups Projects
Commit e8192f3f authored by Maxence Naud's avatar Maxence Naud
Browse files

Merge remote-tracking branch 'origin/main' into tiling

parents c8d3a3e4 ec236310
No related branches found
No related tags found
1 merge request!54horizontal tiling
Pipeline #35117 failed
......@@ -163,13 +163,6 @@ public:
return std::pair<NodePtr, IOIndex_t>(mParents[inID], mIdOutParents[inID]);
}
/**
* @brief Set fix value for the specified input by creating a Producer wrapping the given Tensor.
*
* @param idx Input index.
* @param tensor Constant Tensor to add as parent for specified index.
*/
// void setInput(const IOIndex_t idx, const std::shared_ptr<Tensor> tensor);
/**
* @brief Get the lowest index in the InputData Parent list equal to the
......
......@@ -42,7 +42,7 @@ void FsmEdge::reSetDestNode(const std::shared_ptr<FsmNode>& newDest){
}
void FsmEdge::propagateRelativePos(void){
std::set<int> myRelativeID;
std::set<std::size_t> myRelativeID;
for (const auto& kvp : mRelativePos) {
myRelativeID.insert(kvp.first);
}
......@@ -56,31 +56,31 @@ void FsmEdge::propagateRelativePos(void){
}
std::set<int> nextRelativeID;
std::set<std::size_t> nextRelativeID;
for (const auto& kvp : nextEdge->getRelative()) {
nextRelativeID.insert(kvp.first);
}
// Find elements in myRelativeID but not in nextRelativeID
std::set<int> idxsToPush;
std::set<std::size_t> idxsToPush;
std::set_difference(myRelativeID.begin(), myRelativeID.end(),
nextRelativeID.begin(), nextRelativeID.end(),
std::inserter(idxsToPush, idxsToPush.begin()));
// Find elements in nextRelativeID but not in myRelativeID
std::set<int> idxsToGet;
std::set<std::size_t> idxsToGet;
std::set_difference(nextRelativeID.begin(), nextRelativeID.end(),
myRelativeID.begin(), myRelativeID.end(),
std::inserter(idxsToGet, idxsToGet.begin()));
// test for integrity we look if 2 edge refert to the samme
// test for integrity we look if 2 edge refer to the same
// ref and are link the ref dif is one
// not working for common node
// we can go deeper by find the all pass to a ref and see if the delta is good
// Find elements present in both myRelativeID and nextRelativeID
std::set<int> idxsTotest;
for (int idx : nextRelativeID){
std::set<std::size_t> idxsTotest;
for (auto idx : nextRelativeID){
if (myRelativeID.find(idx) != myRelativeID.end()){
if (std::abs(getRelative().at(idx) - nextEdge->getRelative().at(idx)) != 1) {
throw std::runtime_error("Bad relative");
......@@ -90,10 +90,10 @@ void FsmEdge::propagateRelativePos(void){
// this egde have more relative info than the next
// this edge have more relative info than the next
std::map<size_t,int> tmpRelative;
// we push this info to the next
for( auto idxToPush :idxsToPush ){
for(auto idxToPush :idxsToPush ){
tmpRelative.insert( std::make_pair(idxToPush, getRelative().at(idxToPush) +1));
}
if(tmpRelative.size() != 0){
......@@ -104,7 +104,7 @@ void FsmEdge::propagateRelativePos(void){
// the next node have more info than me i need to get it
for( auto idxToGet :idxsToGet ){
for(auto idxToGet :idxsToGet ){
tmpRelative.insert( std::make_pair(idxToGet, nextEdge->getRelative().at(idxToGet) -1));
}
if(tmpRelative.size() != 0){
......
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