Line | |
---|
1 | #include "charm++.h" |
---|
2 | #include "pgm.h" |
---|
3 | |
---|
4 | CProxy_HelloMain mainProxy; |
---|
5 | |
---|
6 | HelloMain :: HelloMain(CkArgMsg *msg) { |
---|
7 | delete msg; |
---|
8 | count = 0; |
---|
9 | mainProxy = thishandle; |
---|
10 | CProxy_HelloGroup :: ckNew(); // create a new HelloGroup |
---|
11 | } |
---|
12 | |
---|
13 | void HelloMain :: PrintDone(void) { |
---|
14 | count++; |
---|
15 | if (count == CkNumPes()) { |
---|
16 | CkExit(); |
---|
17 | } |
---|
18 | } |
---|
19 | |
---|
20 | HelloGroup :: HelloGroup(void) { |
---|
21 | ckout << "Hello world from processor " << CkMyPe() << endl; |
---|
22 | mainProxy.PrintDone(); |
---|
23 | } |
---|
24 | |
---|
25 | #include "Hello.def.h" |
---|
Note: See
TracBrowser
for help on using the repository browser.