Intelligent Computing / 2022 / Article / Alg 2

Research Article

Fractal Parallel Computing

Algorithm 2

FPM virtualization.
Require: The programmed with a different number of children
Ensure: The same behavior as , but utilizes all child processors even when
1: function Virtualize
2:  while is not empty do
3:   if there are multiple of leaf vertices in then  Schedule fracops to child
4:    for leaf vertices in do
5:     remove from
6:     fracop Virtualize
7:    end for
8:    return fracop Virtualize    Tail recursion to start a new fracop
9:   else  Simulate on the current processor to generate more sub fracops to schedule
10:     select a leaf vertice from
11:    ifthen                    New fracop
12:     repeat
13:      single-stepping simulate Fracop in memory
14:     until all generated in the simulation
15:     for alldo
16:      add into
17:      add edge from to
18:      add edge from to for all , where depends on
19:      end for
20:     else              Simulated fracop, waiting for reduction
21:      simulate Fracop in memory until halting
22:      remove from
23:    end if
24:   end if
25:  end while
26: end function