158
M. Nakao
Python
XMP/C
Initialize parameters
Cooling cycle ?
Generate next state
Compute energy
Transition
Cooling
Output figure
Create initial graph
Acceptance ?
Terminal ?
No
No
No
Fig. 8 Flow chart of an algorithm in Python and XMP/C
the node set in a block manner. In line 1, the “[:]” means that the template size is
not fixed at this point. In line 9, the template_fix directive determines the template
size vertices, which is the number of vertices. In lines 11–13, a diameter and ASPL
are calculated. The calculation is a state of the “Compute energy” shown in Fig. 8.
This calculation uses the top-down approach of the breadth-first search. In line 10,
the loop directive parallelizes the loop statement to calculate each shortest path in
parallel. In lines 14–15, the reduction directives aggregate a diameter and ASPL
stored at each node.
Précédent

- 165/265

Suivant