1 | /* DEFS: readonly CProxy_Main mainProxy; |
---|
2 | */ |
---|
3 | extern CProxy_Main mainProxy; |
---|
4 | #ifndef CK_TEMPLATES_ONLY |
---|
5 | extern "C" void __xlater_roPup_mainProxy(void *_impl_pup_er) { |
---|
6 | PUP::er &_impl_p=*(PUP::er *)_impl_pup_er; |
---|
7 | _impl_p|mainProxy; |
---|
8 | } |
---|
9 | #endif |
---|
10 | |
---|
11 | /* DEFS: mainchare Main: Chare{ |
---|
12 | Main(CkArgMsg* impl_msg); |
---|
13 | void done(void); |
---|
14 | }; |
---|
15 | */ |
---|
16 | #ifndef CK_TEMPLATES_ONLY |
---|
17 | int CkIndex_Main::__idx=0; |
---|
18 | #endif |
---|
19 | #ifndef CK_TEMPLATES_ONLY |
---|
20 | /* DEFS: Main(CkArgMsg* impl_msg); |
---|
21 | */ |
---|
22 | CkChareID CProxy_Main::ckNew(CkArgMsg* impl_msg, int impl_onPE) |
---|
23 | { |
---|
24 | CkChareID impl_ret; |
---|
25 | CkCreateChare(CkIndex_Main::__idx, CkIndex_Main::__idx_Main_CkArgMsg, impl_msg, &impl_ret, impl_onPE); |
---|
26 | return impl_ret; |
---|
27 | } |
---|
28 | void CProxy_Main::ckNew(CkArgMsg* impl_msg, CkChareID* pcid, int impl_onPE) |
---|
29 | { |
---|
30 | CkCreateChare(CkIndex_Main::__idx, CkIndex_Main::__idx_Main_CkArgMsg, impl_msg, pcid, impl_onPE); |
---|
31 | } |
---|
32 | CProxy_Main::CProxy_Main(CkArgMsg* impl_msg, int impl_onPE) |
---|
33 | { |
---|
34 | CkChareID impl_ret; |
---|
35 | CkCreateChare(CkIndex_Main::__idx, CkIndex_Main::__idx_Main_CkArgMsg, impl_msg, &impl_ret, impl_onPE); |
---|
36 | ckSetChareID(impl_ret); |
---|
37 | } |
---|
38 | int CkIndex_Main::__idx_Main_CkArgMsg=0; |
---|
39 | void CkIndex_Main::_call_Main_CkArgMsg(void* impl_msg,Main * impl_obj) |
---|
40 | { |
---|
41 | new (impl_obj) Main((CkArgMsg*)impl_msg); |
---|
42 | } |
---|
43 | |
---|
44 | /* DEFS: void done(void); |
---|
45 | */ |
---|
46 | void CProxy_Main::done(void) |
---|
47 | { |
---|
48 | ckCheck(); |
---|
49 | void *impl_msg = CkAllocSysMsg(); |
---|
50 | if (ckIsDelegated()) { |
---|
51 | int destPE=CkChareMsgPrep(CkIndex_Main::__idx_done_void, impl_msg, &ckGetChareID()); |
---|
52 | if (destPE!=-1) ckDelegatedTo()->ChareSend(ckDelegatedPtr(),CkIndex_Main::__idx_done_void, impl_msg, &ckGetChareID(),destPE); |
---|
53 | } |
---|
54 | else CkSendMsg(CkIndex_Main::__idx_done_void, impl_msg, &ckGetChareID(),0); |
---|
55 | } |
---|
56 | int CkIndex_Main::__idx_done_void=0; |
---|
57 | void CkIndex_Main::_call_done_void(void* impl_msg,Main * impl_obj) |
---|
58 | { |
---|
59 | CkFreeSysMsg(impl_msg); |
---|
60 | impl_obj->done(); |
---|
61 | } |
---|
62 | |
---|
63 | #endif /*CK_TEMPLATES_ONLY*/ |
---|
64 | #ifndef CK_TEMPLATES_ONLY |
---|
65 | void CkIndex_Main::__register(const char *s, size_t size) { |
---|
66 | __idx = CkRegisterChare(s, size, TypeMainChare); |
---|
67 | CkRegisterBase(__idx, CkIndex_Chare::__idx); |
---|
68 | // REG: Main(CkArgMsg* impl_msg); |
---|
69 | __idx_Main_CkArgMsg = CkRegisterEp("Main(CkArgMsg* impl_msg)", |
---|
70 | (CkCallFnPtr)_call_Main_CkArgMsg, CMessage_CkArgMsg::__idx, __idx, 0); |
---|
71 | CkRegisterMainChare(__idx, __idx_Main_CkArgMsg); |
---|
72 | |
---|
73 | // REG: void done(void); |
---|
74 | __idx_done_void = CkRegisterEp("done(void)", |
---|
75 | (CkCallFnPtr)_call_done_void, 0, __idx, 0); |
---|
76 | |
---|
77 | } |
---|
78 | #endif |
---|
79 | |
---|
80 | /* DEFS: array Hello: ArrayElement{ |
---|
81 | Hello(CkMigrateMessage* impl_msg); |
---|
82 | Hello(void); |
---|
83 | void work(void); |
---|
84 | }; |
---|
85 | */ |
---|
86 | #ifndef CK_TEMPLATES_ONLY |
---|
87 | int CkIndex_Hello::__idx=0; |
---|
88 | #endif |
---|
89 | #ifndef CK_TEMPLATES_ONLY |
---|
90 | /* DEFS: Hello(CkMigrateMessage* impl_msg); |
---|
91 | */ |
---|
92 | |
---|
93 | /* DEFS: Hello(void); |
---|
94 | */ |
---|
95 | void CProxyElement_Hello::insert(int onPE) |
---|
96 | { |
---|
97 | void *impl_msg = CkAllocSysMsg(); |
---|
98 | ckInsert((CkArrayMessage *)impl_msg,CkIndex_Hello::__idx_Hello_void,onPE); |
---|
99 | } |
---|
100 | |
---|
101 | /* DEFS: void work(void); |
---|
102 | */ |
---|
103 | void CProxyElement_Hello::work(void) |
---|
104 | { |
---|
105 | ckCheck(); |
---|
106 | void *impl_msg = CkAllocSysMsg(); |
---|
107 | CkArrayMessage *impl_amsg=(CkArrayMessage *)impl_msg; |
---|
108 | impl_amsg->array_setIfNotThere(CkArray_IfNotThere_buffer); |
---|
109 | ckSend(impl_amsg, CkIndex_Hello::__idx_work_void,0); |
---|
110 | } |
---|
111 | |
---|
112 | /* DEFS: Hello(CkMigrateMessage* impl_msg); |
---|
113 | */ |
---|
114 | int CkIndex_Hello::__idx_Hello_CkMigrateMessage=0; |
---|
115 | void CkIndex_Hello::_call_Hello_CkMigrateMessage(void* impl_msg,Hello * impl_obj) |
---|
116 | { |
---|
117 | new (impl_obj) Hello((CkMigrateMessage*)impl_msg); |
---|
118 | } |
---|
119 | |
---|
120 | /* DEFS: Hello(void); |
---|
121 | */ |
---|
122 | CkArrayID CProxy_Hello::ckNew(const CkArrayOptions &opts) |
---|
123 | { |
---|
124 | void *impl_msg = CkAllocSysMsg(); |
---|
125 | return ckCreateArray((CkArrayMessage *)impl_msg,CkIndex_Hello::__idx_Hello_void,opts); |
---|
126 | } |
---|
127 | CkArrayID CProxy_Hello::ckNew(const int s1) |
---|
128 | { |
---|
129 | void *impl_msg = CkAllocSysMsg(); |
---|
130 | return ckCreateArray((CkArrayMessage *)impl_msg,CkIndex_Hello::__idx_Hello_void,CkArrayOptions(s1)); |
---|
131 | } |
---|
132 | int CkIndex_Hello::__idx_Hello_void=0; |
---|
133 | void CkIndex_Hello::_call_Hello_void(void* impl_msg,Hello * impl_obj) |
---|
134 | { |
---|
135 | CkFreeSysMsg(impl_msg); |
---|
136 | new (impl_obj) Hello(); |
---|
137 | } |
---|
138 | |
---|
139 | /* DEFS: void work(void); |
---|
140 | */ |
---|
141 | void CProxy_Hello::work(void) |
---|
142 | { |
---|
143 | ckCheck(); |
---|
144 | void *impl_msg = CkAllocSysMsg(); |
---|
145 | CkArrayMessage *impl_amsg=(CkArrayMessage *)impl_msg; |
---|
146 | impl_amsg->array_setIfNotThere(CkArray_IfNotThere_buffer); |
---|
147 | ckBroadcast(impl_amsg, CkIndex_Hello::__idx_work_void,0); |
---|
148 | } |
---|
149 | int CkIndex_Hello::__idx_work_void=0; |
---|
150 | void CkIndex_Hello::_call_work_void(void* impl_msg,Hello * impl_obj) |
---|
151 | { |
---|
152 | CkFreeSysMsg(impl_msg); |
---|
153 | impl_obj->work(); |
---|
154 | } |
---|
155 | |
---|
156 | /* DEFS: Hello(CkMigrateMessage* impl_msg); |
---|
157 | */ |
---|
158 | |
---|
159 | /* DEFS: Hello(void); |
---|
160 | */ |
---|
161 | |
---|
162 | /* DEFS: void work(void); |
---|
163 | */ |
---|
164 | void CProxySection_Hello::work(void) |
---|
165 | { |
---|
166 | ckCheck(); |
---|
167 | void *impl_msg = CkAllocSysMsg(); |
---|
168 | CkArrayMessage *impl_amsg=(CkArrayMessage *)impl_msg; |
---|
169 | impl_amsg->array_setIfNotThere(CkArray_IfNotThere_buffer); |
---|
170 | ckSend(impl_amsg, CkIndex_Hello::__idx_work_void,0); |
---|
171 | } |
---|
172 | |
---|
173 | #endif /*CK_TEMPLATES_ONLY*/ |
---|
174 | #ifndef CK_TEMPLATES_ONLY |
---|
175 | void CkIndex_Hello::__register(const char *s, size_t size) { |
---|
176 | __idx = CkRegisterChare(s, size, TypeArray); |
---|
177 | CkRegisterBase(__idx, CkIndex_ArrayElement::__idx); |
---|
178 | // REG: Hello(CkMigrateMessage* impl_msg); |
---|
179 | __idx_Hello_CkMigrateMessage = CkRegisterEp("Hello(CkMigrateMessage* impl_msg)", |
---|
180 | (CkCallFnPtr)_call_Hello_CkMigrateMessage, 0, __idx, 0); |
---|
181 | CkRegisterMigCtor(__idx, __idx_Hello_CkMigrateMessage); |
---|
182 | |
---|
183 | // REG: Hello(void); |
---|
184 | __idx_Hello_void = CkRegisterEp("Hello(void)", |
---|
185 | (CkCallFnPtr)_call_Hello_void, 0, __idx, 0); |
---|
186 | CkRegisterDefaultCtor(__idx, __idx_Hello_void); |
---|
187 | |
---|
188 | // REG: void work(void); |
---|
189 | __idx_work_void = CkRegisterEp("work(void)", |
---|
190 | (CkCallFnPtr)_call_work_void, 0, __idx, 0); |
---|
191 | |
---|
192 | } |
---|
193 | #endif |
---|
194 | |
---|
195 | #ifndef CK_TEMPLATES_ONLY |
---|
196 | void _registerhello(void) |
---|
197 | { |
---|
198 | static int _done = 0; if(_done) return; _done = 1; |
---|
199 | CkRegisterReadonly("mainProxy","CProxy_Main",sizeof(mainProxy),(void *) &mainProxy,__xlater_roPup_mainProxy); |
---|
200 | |
---|
201 | /* REG: mainchare Main: Chare{ |
---|
202 | Main(CkArgMsg* impl_msg); |
---|
203 | void done(void); |
---|
204 | }; |
---|
205 | */ |
---|
206 | CkIndex_Main::__register("Main", sizeof(Main)); |
---|
207 | |
---|
208 | /* REG: array Hello: ArrayElement{ |
---|
209 | Hello(CkMigrateMessage* impl_msg); |
---|
210 | Hello(void); |
---|
211 | void work(void); |
---|
212 | }; |
---|
213 | */ |
---|
214 | CkIndex_Hello::__register("Hello", sizeof(Hello)); |
---|
215 | |
---|
216 | } |
---|
217 | extern "C" void CkRegisterMainModule(void) { |
---|
218 | _registerhello(); |
---|
219 | } |
---|
220 | #endif |
---|