Begin
 Find all paths
 Calculate
 Find Cp
 Compute
 Generate all partitions
For all    do
    Find
    if ( Cp then
   
    else
    (new) (all) // (new) is the set of the new latency of each path
    For all   do
    Compute ; // the new latency of the path = ;
    end for
    update (new)
    
    end if
    Compute function
End for
// choose the best partitions//
TDP the dark power
For all    do
For all    do
   if and then
  if < TDP then
  
  end if
  end for
For all   do
  Compute function
End for
number of partition
For   from 1 to   do
  
End for
End.
Algorithm 3: Our proposed algorithm.