1 | #ifndef _DECL_hello_H_ |
---|
2 | #define _DECL_hello_H_ |
---|
3 | #include "charm++.h" |
---|
4 | /* DECLS: readonly CProxy_Main mainProxy; |
---|
5 | */ |
---|
6 | |
---|
7 | /* DECLS: mainchare Main: Chare{ |
---|
8 | Main(CkArgMsg* impl_msg); |
---|
9 | void done(void); |
---|
10 | }; |
---|
11 | */ |
---|
12 | class Main; |
---|
13 | class CkIndex_Main; |
---|
14 | class CProxy_Main; |
---|
15 | /* --------------- index object ------------------ */ |
---|
16 | class CkIndex_Main:public CProxy_Chare{ |
---|
17 | public: |
---|
18 | typedef Main local_t; |
---|
19 | typedef CkIndex_Main index_t; |
---|
20 | typedef CProxy_Main proxy_t; |
---|
21 | typedef CProxy_Main element_t; |
---|
22 | |
---|
23 | static int __idx; |
---|
24 | static void __register(const char *s, size_t size); |
---|
25 | /* DECLS: Main(CkArgMsg* impl_msg); |
---|
26 | */ |
---|
27 | static int __idx_Main_CkArgMsg; |
---|
28 | static int ckNew(CkArgMsg* impl_msg) { return __idx_Main_CkArgMsg; } |
---|
29 | static void _call_Main_CkArgMsg(void* impl_msg,Main* impl_obj); |
---|
30 | |
---|
31 | /* DECLS: void done(void); |
---|
32 | */ |
---|
33 | static int __idx_done_void; |
---|
34 | static int done(void) { return __idx_done_void; } |
---|
35 | static void _call_done_void(void* impl_msg,Main* impl_obj); |
---|
36 | |
---|
37 | }; |
---|
38 | /* --------------- element proxy ------------------ */ |
---|
39 | class CProxy_Main:public CProxy_Chare{ |
---|
40 | public: |
---|
41 | typedef Main local_t; |
---|
42 | typedef CkIndex_Main index_t; |
---|
43 | typedef CProxy_Main proxy_t; |
---|
44 | typedef CProxy_Main element_t; |
---|
45 | |
---|
46 | CProxy_Main(void) {}; |
---|
47 | CProxy_Main(CkChareID __cid) : CProxy_Chare(__cid){ } |
---|
48 | CProxy_Main(const Chare *c) : CProxy_Chare(c){ } |
---|
49 | CK_DISAMBIG_CHARE(CProxy_Chare) |
---|
50 | void ckDelegate(CkDelegateMgr *dTo,CkDelegateData *dPtr=NULL) { |
---|
51 | CProxy_Chare::ckDelegate(dTo,dPtr); |
---|
52 | } |
---|
53 | void ckUndelegate(void) { |
---|
54 | CProxy_Chare::ckUndelegate(); |
---|
55 | } |
---|
56 | void pup(PUP::er &p) { |
---|
57 | CProxy_Chare::pup(p); |
---|
58 | } |
---|
59 | void ckSetChareID(const CkChareID &c) { |
---|
60 | CProxy_Chare::ckSetChareID(c); |
---|
61 | } |
---|
62 | Main *ckLocal(void) const |
---|
63 | { return (Main *)CkLocalChare(&ckGetChareID()); } |
---|
64 | /* DECLS: Main(CkArgMsg* impl_msg); |
---|
65 | */ |
---|
66 | static CkChareID ckNew(CkArgMsg* impl_msg, int onPE=CK_PE_ANY); |
---|
67 | static void ckNew(CkArgMsg* impl_msg, CkChareID* pcid, int onPE=CK_PE_ANY); |
---|
68 | CProxy_Main(CkArgMsg* impl_msg, int onPE=CK_PE_ANY); |
---|
69 | |
---|
70 | /* DECLS: void done(void); |
---|
71 | */ |
---|
72 | void done(void); |
---|
73 | |
---|
74 | }; |
---|
75 | PUPmarshall(CProxy_Main) |
---|
76 | typedef CBaseT<Chare,CProxy_Main> CBase_Main; |
---|
77 | |
---|
78 | /* DECLS: array Hello: ArrayElement{ |
---|
79 | Hello(CkMigrateMessage* impl_msg); |
---|
80 | Hello(void); |
---|
81 | void work(void); |
---|
82 | }; |
---|
83 | */ |
---|
84 | class Hello; |
---|
85 | class CkIndex_Hello; |
---|
86 | class CProxy_Hello; |
---|
87 | class CProxyElement_Hello; |
---|
88 | class CProxySection_Hello; |
---|
89 | /* --------------- index object ------------------ */ |
---|
90 | class CkIndex_Hello:public CProxyElement_ArrayElement{ |
---|
91 | public: |
---|
92 | typedef Hello local_t; |
---|
93 | typedef CkIndex_Hello index_t; |
---|
94 | typedef CProxy_Hello proxy_t; |
---|
95 | typedef CProxyElement_Hello element_t; |
---|
96 | typedef CProxySection_Hello section_t; |
---|
97 | |
---|
98 | static int __idx; |
---|
99 | static void __register(const char *s, size_t size); |
---|
100 | /* DECLS: Hello(CkMigrateMessage* impl_msg); |
---|
101 | */ |
---|
102 | static int __idx_Hello_CkMigrateMessage; |
---|
103 | static int ckNew(CkMigrateMessage* impl_msg) { return __idx_Hello_CkMigrateMessage; } |
---|
104 | static void _call_Hello_CkMigrateMessage(void* impl_msg,Hello* impl_obj); |
---|
105 | |
---|
106 | /* DECLS: Hello(void); |
---|
107 | */ |
---|
108 | static int __idx_Hello_void; |
---|
109 | static int ckNew(void) { return __idx_Hello_void; } |
---|
110 | static void _call_Hello_void(void* impl_msg,Hello* impl_obj); |
---|
111 | |
---|
112 | /* DECLS: void work(void); |
---|
113 | */ |
---|
114 | static int __idx_work_void; |
---|
115 | static int work(void) { return __idx_work_void; } |
---|
116 | static void _call_work_void(void* impl_msg,Hello* impl_obj); |
---|
117 | |
---|
118 | }; |
---|
119 | /* --------------- element proxy ------------------ */ |
---|
120 | class CProxyElement_Hello : public CProxyElement_ArrayElement{ |
---|
121 | public: |
---|
122 | typedef Hello local_t; |
---|
123 | typedef CkIndex_Hello index_t; |
---|
124 | typedef CProxy_Hello proxy_t; |
---|
125 | typedef CProxyElement_Hello element_t; |
---|
126 | typedef CProxySection_Hello section_t; |
---|
127 | |
---|
128 | CProxyElement_Hello(void) {} |
---|
129 | CProxyElement_Hello(const ArrayElement *e) : CProxyElement_ArrayElement(e){ } |
---|
130 | void ckDelegate(CkDelegateMgr *dTo,CkDelegateData *dPtr=NULL) { |
---|
131 | CProxyElement_ArrayElement::ckDelegate(dTo,dPtr); |
---|
132 | } |
---|
133 | void ckUndelegate(void) { |
---|
134 | CProxyElement_ArrayElement::ckUndelegate(); |
---|
135 | } |
---|
136 | void pup(PUP::er &p) { |
---|
137 | CProxyElement_ArrayElement::pup(p); |
---|
138 | } |
---|
139 | CK_DISAMBIG_ARRAY_ELEMENT(CProxyElement_ArrayElement) |
---|
140 | Hello *ckLocal(void) const |
---|
141 | { return (Hello *)CProxyElement_ArrayElement::ckLocal(); } |
---|
142 | CProxyElement_Hello(const CkArrayID &aid,const CkArrayIndex1D &idx,CK_DELCTOR_PARAM) |
---|
143 | :CProxyElement_ArrayElement(aid,idx,CK_DELCTOR_ARGS) {} |
---|
144 | CProxyElement_Hello(const CkArrayID &aid,const CkArrayIndex1D &idx) |
---|
145 | :CProxyElement_ArrayElement(aid,idx) {} |
---|
146 | /* DECLS: Hello(CkMigrateMessage* impl_msg); |
---|
147 | */ |
---|
148 | |
---|
149 | /* DECLS: Hello(void); |
---|
150 | */ |
---|
151 | void insert(int onPE=-1); |
---|
152 | /* DECLS: void work(void); |
---|
153 | */ |
---|
154 | void work(void) ; |
---|
155 | |
---|
156 | }; |
---|
157 | PUPmarshall(CProxyElement_Hello) |
---|
158 | /* ---------------- collective proxy -------------- */ |
---|
159 | class CProxy_Hello : public CProxy_ArrayElement{ |
---|
160 | public: |
---|
161 | typedef Hello local_t; |
---|
162 | typedef CkIndex_Hello index_t; |
---|
163 | typedef CProxy_Hello proxy_t; |
---|
164 | typedef CProxyElement_Hello element_t; |
---|
165 | typedef CProxySection_Hello section_t; |
---|
166 | |
---|
167 | CProxy_Hello(void) {} |
---|
168 | CProxy_Hello(const ArrayElement *e) : CProxy_ArrayElement(e){ } |
---|
169 | void ckDelegate(CkDelegateMgr *dTo,CkDelegateData *dPtr=NULL) { |
---|
170 | CProxy_ArrayElement::ckDelegate(dTo,dPtr); |
---|
171 | } |
---|
172 | void ckUndelegate(void) { |
---|
173 | CProxy_ArrayElement::ckUndelegate(); |
---|
174 | } |
---|
175 | void pup(PUP::er &p) { |
---|
176 | CProxy_ArrayElement::pup(p); |
---|
177 | } |
---|
178 | CK_DISAMBIG_ARRAY(CProxy_ArrayElement) |
---|
179 | static CkArrayID ckNew(void) {return ckCreateEmptyArray();} |
---|
180 | //Generalized array indexing: |
---|
181 | CProxyElement_Hello operator [] (const CkArrayIndex1D &idx) const |
---|
182 | {return CProxyElement_Hello(ckGetArrayID(), idx, CK_DELCTOR_CALL);} |
---|
183 | CProxyElement_Hello operator() (const CkArrayIndex1D &idx) const |
---|
184 | {return CProxyElement_Hello(ckGetArrayID(), idx, CK_DELCTOR_CALL);} |
---|
185 | CProxyElement_Hello operator [] (int idx) const |
---|
186 | {return CProxyElement_Hello(ckGetArrayID(), CkArrayIndex1D(idx), CK_DELCTOR_CALL);} |
---|
187 | CProxyElement_Hello operator () (int idx) const |
---|
188 | {return CProxyElement_Hello(ckGetArrayID(), CkArrayIndex1D(idx), CK_DELCTOR_CALL);} |
---|
189 | CProxy_Hello(const CkArrayID &aid,CK_DELCTOR_PARAM) |
---|
190 | :CProxy_ArrayElement(aid,CK_DELCTOR_ARGS) {} |
---|
191 | CProxy_Hello(const CkArrayID &aid) |
---|
192 | :CProxy_ArrayElement(aid) {} |
---|
193 | /* DECLS: Hello(CkMigrateMessage* impl_msg); |
---|
194 | */ |
---|
195 | |
---|
196 | /* DECLS: Hello(void); |
---|
197 | */ |
---|
198 | static CkArrayID ckNew(const CkArrayOptions &opts); |
---|
199 | static CkArrayID ckNew(const int s1); |
---|
200 | |
---|
201 | /* DECLS: void work(void); |
---|
202 | */ |
---|
203 | void work(void) ; |
---|
204 | |
---|
205 | }; |
---|
206 | PUPmarshall(CProxy_Hello) |
---|
207 | /* ---------------- section proxy -------------- */ |
---|
208 | class CProxySection_Hello : public CProxySection_ArrayElement{ |
---|
209 | public: |
---|
210 | typedef Hello local_t; |
---|
211 | typedef CkIndex_Hello index_t; |
---|
212 | typedef CProxy_Hello proxy_t; |
---|
213 | typedef CProxyElement_Hello element_t; |
---|
214 | typedef CProxySection_Hello section_t; |
---|
215 | |
---|
216 | CProxySection_Hello(void) {} |
---|
217 | void ckDelegate(CkDelegateMgr *dTo,CkDelegateData *dPtr=NULL) { |
---|
218 | CProxySection_ArrayElement::ckDelegate(dTo,dPtr); |
---|
219 | } |
---|
220 | void ckUndelegate(void) { |
---|
221 | CProxySection_ArrayElement::ckUndelegate(); |
---|
222 | } |
---|
223 | void pup(PUP::er &p) { |
---|
224 | CProxySection_ArrayElement::pup(p); |
---|
225 | } |
---|
226 | CK_DISAMBIG_ARRAY_SECTION(CProxySection_ArrayElement) |
---|
227 | //Generalized array indexing: |
---|
228 | CProxyElement_Hello operator [] (const CkArrayIndex1D &idx) const |
---|
229 | {return CProxyElement_Hello(ckGetArrayID(), idx, CK_DELCTOR_CALL);} |
---|
230 | CProxyElement_Hello operator() (const CkArrayIndex1D &idx) const |
---|
231 | {return CProxyElement_Hello(ckGetArrayID(), idx, CK_DELCTOR_CALL);} |
---|
232 | CProxyElement_Hello operator [] (int idx) const |
---|
233 | {return CProxyElement_Hello(ckGetArrayID(), *(CkArrayIndex1D*)&ckGetArrayElements()[idx], CK_DELCTOR_CALL);} |
---|
234 | CProxyElement_Hello operator () (int idx) const |
---|
235 | {return CProxyElement_Hello(ckGetArrayID(), *(CkArrayIndex1D*)&ckGetArrayElements()[idx], CK_DELCTOR_CALL);} |
---|
236 | static CkSectionID ckNew(const CkArrayID &aid, CkArrayIndex1D *elems, int nElems) { |
---|
237 | return CkSectionID(aid, elems, nElems); |
---|
238 | } |
---|
239 | static CkSectionID ckNew(const CkArrayID &aid, int l, int u, int s) { |
---|
240 | CkVec<CkArrayIndex1D> al; |
---|
241 | for (int i=l; i<=u; i+=s) al.push_back(CkArrayIndex1D(i)); |
---|
242 | return CkSectionID(aid, al.getVec(), al.size()); |
---|
243 | } |
---|
244 | CProxySection_Hello(const CkArrayID &aid, CkArrayIndexMax *elems, int nElems, CK_DELCTOR_PARAM) |
---|
245 | :CProxySection_ArrayElement(aid,elems,nElems,CK_DELCTOR_ARGS) {} |
---|
246 | CProxySection_Hello(const CkArrayID &aid, CkArrayIndexMax *elems, int nElems) |
---|
247 | :CProxySection_ArrayElement(aid,elems,nElems) {} |
---|
248 | CProxySection_Hello(const CkSectionID &sid) :CProxySection_ArrayElement(sid) {} |
---|
249 | CProxySection_Hello(int n, const CkArrayID *aid, const CkArrayIndexMax **elems, const int *nElems, CK_DELCTOR_PARAM) |
---|
250 | :CProxySection_ArrayElement(n,aid,elems,nElems,CK_DELCTOR_ARGS) {} |
---|
251 | CProxySection_Hello(int n, const CkArrayID *aid, const CkArrayIndexMax **elems, const int *nElems) |
---|
252 | :CProxySection_ArrayElement(n,aid,elems,nElems) {} |
---|
253 | static CkSectionID ckNew(const CkArrayID &aid, CkArrayIndexMax *elems, int nElems) { |
---|
254 | return CkSectionID(aid, elems, nElems); |
---|
255 | } |
---|
256 | /* DECLS: Hello(CkMigrateMessage* impl_msg); |
---|
257 | */ |
---|
258 | |
---|
259 | /* DECLS: Hello(void); |
---|
260 | */ |
---|
261 | |
---|
262 | /* DECLS: void work(void); |
---|
263 | */ |
---|
264 | void work(void) ; |
---|
265 | |
---|
266 | }; |
---|
267 | PUPmarshall(CProxySection_Hello) |
---|
268 | typedef CBaseT<ArrayElementT<CkIndex1D>,CProxy_Hello> CBase_Hello; |
---|
269 | |
---|
270 | extern void _registerhello(void); |
---|
271 | extern "C" void CkRegisterMainModule(void); |
---|
272 | #endif |
---|