Handbook
Glossary
augment-residual ( predecessors network -- amount )
Vocabulary
compiler
.
cfg
.
register-allocation
.
greedy
.
regions
Inputs
predecessors
an
object
network
an
object
Outputs
amount
an
object
Definition
USING:
accessors
arrays
assocs
kernel
math
math.order
;
IN:
compiler.cfg.register-allocation.greedy.regions
::
augment-residual
( predecessors network -- amount )
network
sink>>
:>
node! 1/0.
:>
amount!
[
node network
source>>
=
]
[
node predecessors
at
:>
from from node
2array
network
capacities>>
at
amount
min
amount! from node!
]
until
network
sink>>
node!
[
node network
source>>
=
]
[
node predecessors
at
:>
from from node
2array
:>
forward node from
2array
:>
reverse forward network
capacities>>
at
amount
-
forward network
capacities>>
set-at
reverse network
capacities>>
at
0
or
amount
+
reverse network
capacities>>
set-at
from node!
]
until
amount
;