SCM Repository
[diderot] Annotation of /branches/cuda/doc/implementation/life-of-a-strand.md
Annotation of /branches/cuda/doc/implementation/life-of-a-strand.md
Parent Directory
|
Revision Log
Revision 5597 -
(view)
(download)
1 : |
jhr |
5597 |
## Life of a strand
|
2 : |
|
|
|
3 : |
|
|
This note documents the various stages in the life of a strand and, specifically,
|
4 : |
|
|
when they occur with respect to the super-steps.
|
5 : |
|
|
|
6 : |
|
|
The important events in the life of a strand are:
|
7 : |
|
|
|
8 : |
|
|
1. allocation
|
9 : |
|
|
|
10 : |
|
|
2. initialization -- the strand initialization method is invoked when the strand
|
11 : |
|
|
is created; either by a ``create_grid`` or ``create_collection`` operation
|
12 : |
|
|
at the start of the program, or by a ``new`` operation.
|
13 : |
|
|
A strand created by ``new`` is visible to the program starting with the global
|
14 : |
|
|
update phase of the superstep in which it was created.
|
15 : |
|
|
|
16 : |
|
|
3. start method (optional) --
|
17 : |
|
|
the start method is run during the strand-update phase prior to the strand's
|
18 : |
|
|
first update. Any state changes caused by the start method are **not** visible
|
19 : |
|
|
to other strands until the next super-step.
|
20 : |
|
|
|
21 : |
|
|
4. updates --
|
22 : |
|
|
the strand update method is invoked each super-step as long as the strand is
|
23 : |
|
|
active and the program is running.
|
24 : |
|
|
|
25 : |
|
|
5. termination
|
26 : |
|
|
* stabilize
|
27 : |
|
|
* die
|
28 : |
|
|
* global stabilize
|
29 : |
|
|
* global die
|