Home > Software engineering >  The openMP implementation Floyd - Warshall
The openMP implementation Floyd - Warshall

Time:10-10

For (int k=1; k<=nodesCount; + + k) {
For (int I=1; i<=nodesCount; + + I) {
If (short [I] [k].={NOT_CONNECTED)
For (int j=1; j<=nodesCount; + + j) {
If (short [k] [j].=NOT_CONNECTED & amp; & (short [I] [j]==NOT_CONNECTED | | short [I] [k] + short [k] [j] Short [I] [j]=short [I] [k] + short [k] [j];
}
}
}
}
}

CodePudding user response:

Seemingly for there are data dependent on how the parallel

CodePudding user response:

reference 1st floor u014713959 response:
seems to be for there are data dependent on how the parallel

Maybe can take block processing, and then parallel,

CodePudding user response:

refer to the second floor zhao4zhong1 response:
Quote: refer to 1st floor u014713959 response:

Seemingly there depends on how the parallel data for

Maybe can take block processing, and then parallel,


Can you write code directly?

CodePudding user response:

There is a problem, how to use double for loop will be more efficient, if the cycle there are if, how to deal with?

For example:
For () {
For () {i<100
If (j=23 & amp; & i<100)
A [I] [j]=c;
}
A [j] [j]=b;
}

CodePudding user response:

In the http://www.codeproject.com search "parallel"
  • Related