#ifndef _DECL_hello_H_ #define _DECL_hello_H_ #include "charm++.h" /* DECLS: readonly CProxy_Main mainProxy; */ /* DECLS: mainchare Main: Chare{ Main(CkArgMsg* impl_msg); void done(void); }; */ class Main; class CkIndex_Main; class CProxy_Main; /* --------------- index object ------------------ */ class CkIndex_Main:public CProxy_Chare{ public: typedef Main local_t; typedef CkIndex_Main index_t; typedef CProxy_Main proxy_t; typedef CProxy_Main element_t; static int __idx; static void __register(const char *s, size_t size); /* DECLS: Main(CkArgMsg* impl_msg); */ static int __idx_Main_CkArgMsg; static int ckNew(CkArgMsg* impl_msg) { return __idx_Main_CkArgMsg; } static void _call_Main_CkArgMsg(void* impl_msg,Main* impl_obj); /* DECLS: void done(void); */ static int __idx_done_void; static int done(void) { return __idx_done_void; } static void _call_done_void(void* impl_msg,Main* impl_obj); }; /* --------------- element proxy ------------------ */ class CProxy_Main:public CProxy_Chare{ public: typedef Main local_t; typedef CkIndex_Main index_t; typedef CProxy_Main proxy_t; typedef CProxy_Main element_t; CProxy_Main(void) {}; CProxy_Main(CkChareID __cid) : CProxy_Chare(__cid){ } CProxy_Main(const Chare *c) : CProxy_Chare(c){ } CK_DISAMBIG_CHARE(CProxy_Chare) void ckDelegate(CkDelegateMgr *dTo,CkDelegateData *dPtr=NULL) { CProxy_Chare::ckDelegate(dTo,dPtr); } void ckUndelegate(void) { CProxy_Chare::ckUndelegate(); } void pup(PUP::er &p) { CProxy_Chare::pup(p); } void ckSetChareID(const CkChareID &c) { CProxy_Chare::ckSetChareID(c); } Main *ckLocal(void) const { return (Main *)CkLocalChare(&ckGetChareID()); } /* DECLS: Main(CkArgMsg* impl_msg); */ static CkChareID ckNew(CkArgMsg* impl_msg, int onPE=CK_PE_ANY); static void ckNew(CkArgMsg* impl_msg, CkChareID* pcid, int onPE=CK_PE_ANY); CProxy_Main(CkArgMsg* impl_msg, int onPE=CK_PE_ANY); /* DECLS: void done(void); */ void done(void); }; PUPmarshall(CProxy_Main) typedef CBaseT CBase_Main; /* DECLS: array Hello: ArrayElement{ Hello(CkMigrateMessage* impl_msg); Hello(void); void work(void); }; */ class Hello; class CkIndex_Hello; class CProxy_Hello; class CProxyElement_Hello; class CProxySection_Hello; /* --------------- index object ------------------ */ class CkIndex_Hello:public CProxyElement_ArrayElement{ public: typedef Hello local_t; typedef CkIndex_Hello index_t; typedef CProxy_Hello proxy_t; typedef CProxyElement_Hello element_t; typedef CProxySection_Hello section_t; static int __idx; static void __register(const char *s, size_t size); /* DECLS: Hello(CkMigrateMessage* impl_msg); */ static int __idx_Hello_CkMigrateMessage; static int ckNew(CkMigrateMessage* impl_msg) { return __idx_Hello_CkMigrateMessage; } static void _call_Hello_CkMigrateMessage(void* impl_msg,Hello* impl_obj); /* DECLS: Hello(void); */ static int __idx_Hello_void; static int ckNew(void) { return __idx_Hello_void; } static void _call_Hello_void(void* impl_msg,Hello* impl_obj); /* DECLS: void work(void); */ static int __idx_work_void; static int work(void) { return __idx_work_void; } static void _call_work_void(void* impl_msg,Hello* impl_obj); }; /* --------------- element proxy ------------------ */ class CProxyElement_Hello : public CProxyElement_ArrayElement{ public: typedef Hello local_t; typedef CkIndex_Hello index_t; typedef CProxy_Hello proxy_t; typedef CProxyElement_Hello element_t; typedef CProxySection_Hello section_t; CProxyElement_Hello(void) {} CProxyElement_Hello(const ArrayElement *e) : CProxyElement_ArrayElement(e){ } void ckDelegate(CkDelegateMgr *dTo,CkDelegateData *dPtr=NULL) { CProxyElement_ArrayElement::ckDelegate(dTo,dPtr); } void ckUndelegate(void) { CProxyElement_ArrayElement::ckUndelegate(); } void pup(PUP::er &p) { CProxyElement_ArrayElement::pup(p); } CK_DISAMBIG_ARRAY_ELEMENT(CProxyElement_ArrayElement) Hello *ckLocal(void) const { return (Hello *)CProxyElement_ArrayElement::ckLocal(); } CProxyElement_Hello(const CkArrayID &aid,const CkArrayIndex1D &idx,CK_DELCTOR_PARAM) :CProxyElement_ArrayElement(aid,idx,CK_DELCTOR_ARGS) {} CProxyElement_Hello(const CkArrayID &aid,const CkArrayIndex1D &idx) :CProxyElement_ArrayElement(aid,idx) {} /* DECLS: Hello(CkMigrateMessage* impl_msg); */ /* DECLS: Hello(void); */ void insert(int onPE=-1); /* DECLS: void work(void); */ void work(void) ; }; PUPmarshall(CProxyElement_Hello) /* ---------------- collective proxy -------------- */ class CProxy_Hello : public CProxy_ArrayElement{ public: typedef Hello local_t; typedef CkIndex_Hello index_t; typedef CProxy_Hello proxy_t; typedef CProxyElement_Hello element_t; typedef CProxySection_Hello section_t; CProxy_Hello(void) {} CProxy_Hello(const ArrayElement *e) : CProxy_ArrayElement(e){ } void ckDelegate(CkDelegateMgr *dTo,CkDelegateData *dPtr=NULL) { CProxy_ArrayElement::ckDelegate(dTo,dPtr); } void ckUndelegate(void) { CProxy_ArrayElement::ckUndelegate(); } void pup(PUP::er &p) { CProxy_ArrayElement::pup(p); } CK_DISAMBIG_ARRAY(CProxy_ArrayElement) static CkArrayID ckNew(void) {return ckCreateEmptyArray();} //Generalized array indexing: CProxyElement_Hello operator [] (const CkArrayIndex1D &idx) const {return CProxyElement_Hello(ckGetArrayID(), idx, CK_DELCTOR_CALL);} CProxyElement_Hello operator() (const CkArrayIndex1D &idx) const {return CProxyElement_Hello(ckGetArrayID(), idx, CK_DELCTOR_CALL);} CProxyElement_Hello operator [] (int idx) const {return CProxyElement_Hello(ckGetArrayID(), CkArrayIndex1D(idx), CK_DELCTOR_CALL);} CProxyElement_Hello operator () (int idx) const {return CProxyElement_Hello(ckGetArrayID(), CkArrayIndex1D(idx), CK_DELCTOR_CALL);} CProxy_Hello(const CkArrayID &aid,CK_DELCTOR_PARAM) :CProxy_ArrayElement(aid,CK_DELCTOR_ARGS) {} CProxy_Hello(const CkArrayID &aid) :CProxy_ArrayElement(aid) {} /* DECLS: Hello(CkMigrateMessage* impl_msg); */ /* DECLS: Hello(void); */ static CkArrayID ckNew(const CkArrayOptions &opts); static CkArrayID ckNew(const int s1); /* DECLS: void work(void); */ void work(void) ; }; PUPmarshall(CProxy_Hello) /* ---------------- section proxy -------------- */ class CProxySection_Hello : public CProxySection_ArrayElement{ public: typedef Hello local_t; typedef CkIndex_Hello index_t; typedef CProxy_Hello proxy_t; typedef CProxyElement_Hello element_t; typedef CProxySection_Hello section_t; CProxySection_Hello(void) {} void ckDelegate(CkDelegateMgr *dTo,CkDelegateData *dPtr=NULL) { CProxySection_ArrayElement::ckDelegate(dTo,dPtr); } void ckUndelegate(void) { CProxySection_ArrayElement::ckUndelegate(); } void pup(PUP::er &p) { CProxySection_ArrayElement::pup(p); } CK_DISAMBIG_ARRAY_SECTION(CProxySection_ArrayElement) //Generalized array indexing: CProxyElement_Hello operator [] (const CkArrayIndex1D &idx) const {return CProxyElement_Hello(ckGetArrayID(), idx, CK_DELCTOR_CALL);} CProxyElement_Hello operator() (const CkArrayIndex1D &idx) const {return CProxyElement_Hello(ckGetArrayID(), idx, CK_DELCTOR_CALL);} CProxyElement_Hello operator [] (int idx) const {return CProxyElement_Hello(ckGetArrayID(), *(CkArrayIndex1D*)&ckGetArrayElements()[idx], CK_DELCTOR_CALL);} CProxyElement_Hello operator () (int idx) const {return CProxyElement_Hello(ckGetArrayID(), *(CkArrayIndex1D*)&ckGetArrayElements()[idx], CK_DELCTOR_CALL);} static CkSectionID ckNew(const CkArrayID &aid, CkArrayIndex1D *elems, int nElems) { return CkSectionID(aid, elems, nElems); } static CkSectionID ckNew(const CkArrayID &aid, int l, int u, int s) { CkVec al; for (int i=l; i<=u; i+=s) al.push_back(CkArrayIndex1D(i)); return CkSectionID(aid, al.getVec(), al.size()); } CProxySection_Hello(const CkArrayID &aid, CkArrayIndexMax *elems, int nElems, CK_DELCTOR_PARAM) :CProxySection_ArrayElement(aid,elems,nElems,CK_DELCTOR_ARGS) {} CProxySection_Hello(const CkArrayID &aid, CkArrayIndexMax *elems, int nElems) :CProxySection_ArrayElement(aid,elems,nElems) {} CProxySection_Hello(const CkSectionID &sid) :CProxySection_ArrayElement(sid) {} CProxySection_Hello(int n, const CkArrayID *aid, const CkArrayIndexMax **elems, const int *nElems, CK_DELCTOR_PARAM) :CProxySection_ArrayElement(n,aid,elems,nElems,CK_DELCTOR_ARGS) {} CProxySection_Hello(int n, const CkArrayID *aid, const CkArrayIndexMax **elems, const int *nElems) :CProxySection_ArrayElement(n,aid,elems,nElems) {} static CkSectionID ckNew(const CkArrayID &aid, CkArrayIndexMax *elems, int nElems) { return CkSectionID(aid, elems, nElems); } /* DECLS: Hello(CkMigrateMessage* impl_msg); */ /* DECLS: Hello(void); */ /* DECLS: void work(void); */ void work(void) ; }; PUPmarshall(CProxySection_Hello) typedef CBaseT,CProxy_Hello> CBase_Hello; extern void _registerhello(void); extern "C" void CkRegisterMainModule(void); #endif