/* DEFS: message CkGroupInitCallbackMsg;
 */
#ifndef CK_TEMPLATES_ONLY
void *CMessage_CkGroupInitCallbackMsg::operator new(size_t s){
  return CkGroupInitCallbackMsg::alloc(__idx, s, 0, 0);
}
void *CMessage_CkGroupInitCallbackMsg::operator new(size_t s,const int pb){
  return CkGroupInitCallbackMsg::alloc(__idx, s, 0, pb);
}
void *CMessage_CkGroupInitCallbackMsg::operator new(size_t s, int* sz){
  return CkGroupInitCallbackMsg::alloc(__idx, s, sz, 0);
}
void *CMessage_CkGroupInitCallbackMsg::operator new(size_t s, int* sz,const int pb){
  return CkGroupInitCallbackMsg::alloc(__idx, s, sz, pb);
}
void* CMessage_CkGroupInitCallbackMsg::alloc(int msgnum, size_t sz, int *sizes, int pb) {
  int offsets[1];
  offsets[0] = ALIGN8(sz);
  CkGroupInitCallbackMsg *newmsg = (CkGroupInitCallbackMsg *) CkAllocMsg(msgnum, offsets[0], pb);
  return (void *) newmsg;
}
void* CMessage_CkGroupInitCallbackMsg::pack(CkGroupInitCallbackMsg *msg) {
  return (void *) msg;
}
CkGroupInitCallbackMsg* CMessage_CkGroupInitCallbackMsg::unpack(void* buf) {
  CkGroupInitCallbackMsg *msg = (CkGroupInitCallbackMsg *) buf;
  return msg;
}
int CMessage_CkGroupInitCallbackMsg::__idx=0;
#endif

/* DEFS: group CkGroupInitCallback{
CkGroupInitCallback(void);
void callMeBack(CkGroupInitCallbackMsg*);
};
 */
#ifndef CK_TEMPLATES_ONLY
int CProxy_CkGroupInitCallback::__idx=0;
#endif
#ifndef CK_TEMPLATES_ONLY
    void CProxy_CkGroupInitCallback::__register(const char *s, size_t size) {
      __idx = CkRegisterChare(s, size);
    /* REG: CkGroupInitCallback(void);
*/
      __idx_CkGroupInitCallback_void = CkRegisterEp("CkGroupInitCallback", (CkCallFnPtr)_call_CkGroupInitCallback_void, 0, __idx);

    /* REG: void callMeBack(CkGroupInitCallbackMsg*);
*/
      __idx_callMeBack_CkGroupInitCallbackMsg = CkRegisterEp("callMeBack", (CkCallFnPtr)_call_callMeBack_CkGroupInitCallbackMsg, CMessage_CkGroupInitCallbackMsg::__idx, __idx);
    }
#endif
#ifndef CK_TEMPLATES_ONLY
/* DEFS: CkGroupInitCallback(void);
 */
int CProxy_CkGroupInitCallback::__idx_CkGroupInitCallback_void=0;
CkGroupID CProxy_CkGroupInitCallback::ckNew(void)
{
      void *msg = CkAllocSysMsg();
  return CkCreateGroup(__idx, __idx_CkGroupInitCallback_void, msg, 0, 0);
}
CkGroupID CProxy_CkGroupInitCallback::ckNewSync(void)
{
      void *msg = CkAllocSysMsg();
  return CkCreateGroupSync(__idx, __idx_CkGroupInitCallback_void, msg);
}
  CProxy_CkGroupInitCallback::CProxy_CkGroupInitCallback(int retEP, CkChareID *cid)
{
      void *msg = CkAllocSysMsg();
  _ck_gid = CkCreateGroup(__idx, __idx_CkGroupInitCallback_void, msg, retEP, cid);
  _setChare(0);
}
  CProxy_CkGroupInitCallback::CProxy_CkGroupInitCallback(void)
{
      void *msg = CkAllocSysMsg();
  _ck_gid = CkCreateGroup(__idx, __idx_CkGroupInitCallback_void, msg, 0, 0);
  _setChare(0);
}
void CProxy_CkGroupInitCallback::_call_CkGroupInitCallback_void(void* msg, CkGroupInitCallback* obj)
{
  new (obj) CkGroupInitCallback();
  CkFreeSysMsg(msg);
}

/* DEFS: void callMeBack(CkGroupInitCallbackMsg*);
 */
int CProxy_CkGroupInitCallback::__idx_callMeBack_CkGroupInitCallbackMsg=0;
void CProxy_CkGroupInitCallback::_call_callMeBack_CkGroupInitCallbackMsg(void* msg, CkGroupInitCallback* obj)
{
  obj->callMeBack((CkGroupInitCallbackMsg*)msg);
}
#endif /*CK_TEMPLATES_ONLY*/

/* DEFS: message CkReductionMsg;
 */
#ifndef CK_TEMPLATES_ONLY
void *CMessage_CkReductionMsg::operator new(size_t s){
  return CkReductionMsg::alloc(__idx, s, 0, 0);
}
void *CMessage_CkReductionMsg::operator new(size_t s,const int pb){
  return CkReductionMsg::alloc(__idx, s, 0, pb);
}
void *CMessage_CkReductionMsg::operator new(size_t s, int* sz){
  return CkReductionMsg::alloc(__idx, s, sz, 0);
}
void *CMessage_CkReductionMsg::operator new(size_t s, int* sz,const int pb){
  return CkReductionMsg::alloc(__idx, s, sz, pb);
}
void* CMessage_CkReductionMsg::alloc(int msgnum, size_t sz, int *sizes, int pb) {
  int offsets[1];
  offsets[0] = ALIGN8(sz);
  CkReductionMsg *newmsg = (CkReductionMsg *) CkAllocMsg(msgnum, offsets[0], pb);
  return (void *) newmsg;
}
void* CMessage_CkReductionMsg::pack(CkReductionMsg *msg) {
  return (void *) msg;
}
CkReductionMsg* CMessage_CkReductionMsg::unpack(void* buf) {
  CkReductionMsg *msg = (CkReductionMsg *) buf;
  return msg;
}
int CMessage_CkReductionMsg::__idx=0;
#endif

/* DEFS: message CkReductionNumberMsg;
 */
#ifndef CK_TEMPLATES_ONLY
void *CMessage_CkReductionNumberMsg::operator new(size_t s){
  return CkReductionNumberMsg::alloc(__idx, s, 0, 0);
}
void *CMessage_CkReductionNumberMsg::operator new(size_t s,const int pb){
  return CkReductionNumberMsg::alloc(__idx, s, 0, pb);
}
void *CMessage_CkReductionNumberMsg::operator new(size_t s, int* sz){
  return CkReductionNumberMsg::alloc(__idx, s, sz, 0);
}
void *CMessage_CkReductionNumberMsg::operator new(size_t s, int* sz,const int pb){
  return CkReductionNumberMsg::alloc(__idx, s, sz, pb);
}
void* CMessage_CkReductionNumberMsg::alloc(int msgnum, size_t sz, int *sizes, int pb) {
  int offsets[1];
  offsets[0] = ALIGN8(sz);
  CkReductionNumberMsg *newmsg = (CkReductionNumberMsg *) CkAllocMsg(msgnum, offsets[0], pb);
  return (void *) newmsg;
}
void* CMessage_CkReductionNumberMsg::pack(CkReductionNumberMsg *msg) {
  return (void *) msg;
}
CkReductionNumberMsg* CMessage_CkReductionNumberMsg::unpack(void* buf) {
  CkReductionNumberMsg *msg = (CkReductionNumberMsg *) buf;
  return msg;
}
int CMessage_CkReductionNumberMsg::__idx=0;
#endif

/* DEFS: group CkReductionMgr: CkGroupInitCallback{
CkReductionMgr(void);
void ReductionStarting(CkReductionNumberMsg*);
void RecvMsg(CkReductionMsg*);
void LateMigrantMsg(CkReductionMsg*);
void MigrantDied(CkReductionNumberMsg*);
};
 */
#ifndef CK_TEMPLATES_ONLY
int CProxy_CkReductionMgr::__idx=0;
#endif
#ifndef CK_TEMPLATES_ONLY
    void CProxy_CkReductionMgr::__register(const char *s, size_t size) {
      __idx = CkRegisterChare(s, size);
  _REGISTER_BASE(__idx, CProxy_CkGroupInitCallback::__idx);
    /* REG: CkReductionMgr(void);
*/
      __idx_CkReductionMgr_void = CkRegisterEp("CkReductionMgr", (CkCallFnPtr)_call_CkReductionMgr_void, 0, __idx);

    /* REG: void ReductionStarting(CkReductionNumberMsg*);
*/
      __idx_ReductionStarting_CkReductionNumberMsg = CkRegisterEp("ReductionStarting", (CkCallFnPtr)_call_ReductionStarting_CkReductionNumberMsg, CMessage_CkReductionNumberMsg::__idx, __idx);

    /* REG: void RecvMsg(CkReductionMsg*);
*/
      __idx_RecvMsg_CkReductionMsg = CkRegisterEp("RecvMsg", (CkCallFnPtr)_call_RecvMsg_CkReductionMsg, CMessage_CkReductionMsg::__idx, __idx);

    /* REG: void LateMigrantMsg(CkReductionMsg*);
*/
      __idx_LateMigrantMsg_CkReductionMsg = CkRegisterEp("LateMigrantMsg", (CkCallFnPtr)_call_LateMigrantMsg_CkReductionMsg, CMessage_CkReductionMsg::__idx, __idx);

    /* REG: void MigrantDied(CkReductionNumberMsg*);
*/
      __idx_MigrantDied_CkReductionNumberMsg = CkRegisterEp("MigrantDied", (CkCallFnPtr)_call_MigrantDied_CkReductionNumberMsg, CMessage_CkReductionNumberMsg::__idx, __idx);
    }
#endif
#ifndef CK_TEMPLATES_ONLY
/* DEFS: CkReductionMgr(void);
 */
int CProxy_CkReductionMgr::__idx_CkReductionMgr_void=0;
CkGroupID CProxy_CkReductionMgr::ckNew(void)
{
      void *msg = CkAllocSysMsg();
  return CkCreateGroup(__idx, __idx_CkReductionMgr_void, msg, 0, 0);
}
CkGroupID CProxy_CkReductionMgr::ckNewSync(void)
{
      void *msg = CkAllocSysMsg();
  return CkCreateGroupSync(__idx, __idx_CkReductionMgr_void, msg);
}
  CProxy_CkReductionMgr::CProxy_CkReductionMgr(int retEP, CkChareID *cid)
{
      void *msg = CkAllocSysMsg();
  _ck_gid = CkCreateGroup(__idx, __idx_CkReductionMgr_void, msg, retEP, cid);
  _setChare(0);
}
  CProxy_CkReductionMgr::CProxy_CkReductionMgr(void)
{
      void *msg = CkAllocSysMsg();
  _ck_gid = CkCreateGroup(__idx, __idx_CkReductionMgr_void, msg, 0, 0);
  _setChare(0);
}
void CProxy_CkReductionMgr::_call_CkReductionMgr_void(void* msg, CkReductionMgr* obj)
{
  new (obj) CkReductionMgr();
  CkFreeSysMsg(msg);
}

/* DEFS: void ReductionStarting(CkReductionNumberMsg*);
 */
int CProxy_CkReductionMgr::__idx_ReductionStarting_CkReductionNumberMsg=0;
void CProxy_CkReductionMgr::_call_ReductionStarting_CkReductionNumberMsg(void* msg, CkReductionMgr* obj)
{
  obj->ReductionStarting((CkReductionNumberMsg*)msg);
}

/* DEFS: void RecvMsg(CkReductionMsg*);
 */
int CProxy_CkReductionMgr::__idx_RecvMsg_CkReductionMsg=0;
void CProxy_CkReductionMgr::_call_RecvMsg_CkReductionMsg(void* msg, CkReductionMgr* obj)
{
  obj->RecvMsg((CkReductionMsg*)msg);
}

/* DEFS: void LateMigrantMsg(CkReductionMsg*);
 */
int CProxy_CkReductionMgr::__idx_LateMigrantMsg_CkReductionMsg=0;
void CProxy_CkReductionMgr::_call_LateMigrantMsg_CkReductionMsg(void* msg, CkReductionMgr* obj)
{
  obj->LateMigrantMsg((CkReductionMsg*)msg);
}

/* DEFS: void MigrantDied(CkReductionNumberMsg*);
 */
int CProxy_CkReductionMgr::__idx_MigrantDied_CkReductionNumberMsg=0;
void CProxy_CkReductionMgr::_call_MigrantDied_CkReductionNumberMsg(void* msg, CkReductionMgr* obj)
{
  obj->MigrantDied((CkReductionNumberMsg*)msg);
}
#endif /*CK_TEMPLATES_ONLY*/

#ifndef CK_TEMPLATES_ONLY
void _registerCkReduction(void)
{
  static int _done = 0; if(_done) return; _done = 1;
/* REG: message CkGroupInitCallbackMsg;
*/
CMessage_CkGroupInitCallbackMsg::__register("CkGroupInitCallbackMsg", sizeof(CkGroupInitCallbackMsg),(CkPackFnPtr) CkGroupInitCallbackMsg::pack,(CkUnpackFnPtr) CkGroupInitCallbackMsg::unpack);

/* REG: group CkGroupInitCallback{
CkGroupInitCallback(void);
void callMeBack(CkGroupInitCallbackMsg*);
};
*/
  CProxy_CkGroupInitCallback::__register("CkGroupInitCallback", sizeof(CkGroupInitCallback));

/* REG: message CkReductionMsg;
*/
CMessage_CkReductionMsg::__register("CkReductionMsg", sizeof(CkReductionMsg),(CkPackFnPtr) CkReductionMsg::pack,(CkUnpackFnPtr) CkReductionMsg::unpack);

/* REG: message CkReductionNumberMsg;
*/
CMessage_CkReductionNumberMsg::__register("CkReductionNumberMsg", sizeof(CkReductionNumberMsg),(CkPackFnPtr) CkReductionNumberMsg::pack,(CkUnpackFnPtr) CkReductionNumberMsg::unpack);

/* REG: group CkReductionMgr: CkGroupInitCallback{
CkReductionMgr(void);
void ReductionStarting(CkReductionNumberMsg*);
void RecvMsg(CkReductionMsg*);
void LateMigrantMsg(CkReductionMsg*);
void MigrantDied(CkReductionNumberMsg*);
};
*/
  CProxy_CkReductionMgr::__register("CkReductionMgr", sizeof(CkReductionMgr));

}
#endif
