
/* DEFS: readonly CkGroupID nborBaselb;
 */
extern CkGroupID nborBaselb;

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

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

/* DEFS: group NborBaseLB{
void NborBaseLB(void);
void ReceiveStats(NLBStatsMsg*);
void ResumeClients(void);
void ReceiveMigration(NLBMigrateMsg*);
};
 */
#ifndef CK_TEMPLATES_ONLY
int CProxy_NborBaseLB::__idx=0;
#endif
#ifndef CK_TEMPLATES_ONLY
    void CProxy_NborBaseLB::__register(const char *s, size_t size) {
      __idx = CkRegisterChare(s, size);
    /* REG: void NborBaseLB(void);
*/
      __idx_NborBaseLB_void = CkRegisterEp("NborBaseLB", (CkCallFnPtr)_call_NborBaseLB_void, 0, __idx);

    /* REG: void ReceiveStats(NLBStatsMsg*);
*/
      __idx_ReceiveStats_NLBStatsMsg = CkRegisterEp("ReceiveStats", (CkCallFnPtr)_call_ReceiveStats_NLBStatsMsg, CMessage_NLBStatsMsg::__idx, __idx);

    /* REG: void ResumeClients(void);
*/
      __idx_ResumeClients_void = CkRegisterEp("ResumeClients", (CkCallFnPtr)_call_ResumeClients_void, 0, __idx);

    /* REG: void ReceiveMigration(NLBMigrateMsg*);
*/
      __idx_ReceiveMigration_NLBMigrateMsg = CkRegisterEp("ReceiveMigration", (CkCallFnPtr)_call_ReceiveMigration_NLBMigrateMsg, CMessage_NLBMigrateMsg::__idx, __idx);
    }
#endif
#ifndef CK_TEMPLATES_ONLY
/* DEFS: void NborBaseLB(void);
 */
int CProxy_NborBaseLB::__idx_NborBaseLB_void=0;
CkGroupID CProxy_NborBaseLB::ckNew(void)
{
      void *msg = CkAllocSysMsg();
  return CkCreateGroup(__idx, __idx_NborBaseLB_void, msg, 0, 0);
}
CkGroupID CProxy_NborBaseLB::ckNewSync(void)
{
      void *msg = CkAllocSysMsg();
  return CkCreateGroupSync(__idx, __idx_NborBaseLB_void, msg);
}
  CProxy_NborBaseLB::CProxy_NborBaseLB(int retEP, CkChareID *cid)
{
      void *msg = CkAllocSysMsg();
  _ck_gid = CkCreateGroup(__idx, __idx_NborBaseLB_void, msg, retEP, cid);
  _setChare(0);
}
  CProxy_NborBaseLB::CProxy_NborBaseLB(void)
{
      void *msg = CkAllocSysMsg();
  _ck_gid = CkCreateGroup(__idx, __idx_NborBaseLB_void, msg, 0, 0);
  _setChare(0);
}
void CProxy_NborBaseLB::_call_NborBaseLB_void(void* msg, NborBaseLB* obj)
{
  new (obj) NborBaseLB();
  CkFreeSysMsg(msg);
}

/* DEFS: void ReceiveStats(NLBStatsMsg*);
 */
int CProxy_NborBaseLB::__idx_ReceiveStats_NLBStatsMsg=0;
void CProxy_NborBaseLB::_call_ReceiveStats_NLBStatsMsg(void* msg, NborBaseLB* obj)
{
  obj->ReceiveStats((NLBStatsMsg*)msg);
}

/* DEFS: void ResumeClients(void);
 */
int CProxy_NborBaseLB::__idx_ResumeClients_void=0;
void CProxy_NborBaseLB::_call_ResumeClients_void(void* msg, NborBaseLB* obj)
{
  obj->ResumeClients();
  CkFreeSysMsg(msg);
}

/* DEFS: void ReceiveMigration(NLBMigrateMsg*);
 */
int CProxy_NborBaseLB::__idx_ReceiveMigration_NLBMigrateMsg=0;
void CProxy_NborBaseLB::_call_ReceiveMigration_NLBMigrateMsg(void* msg, NborBaseLB* obj)
{
  obj->ReceiveMigration((NLBMigrateMsg*)msg);
}
#endif /*CK_TEMPLATES_ONLY*/

#ifndef CK_TEMPLATES_ONLY
void _registerNborBaseLB(void)
{
  static int _done = 0; if(_done) return; _done = 1;
      _registerLBDatabase();

  CkRegisterReadonly(sizeof(CkGroupID), (void *) &nborBaselb);

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

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

/* REG: group NborBaseLB{
void NborBaseLB(void);
void ReceiveStats(NLBStatsMsg*);
void ResumeClients(void);
void ReceiveMigration(NLBMigrateMsg*);
};
*/
  CProxy_NborBaseLB::__register("NborBaseLB", sizeof(NborBaseLB));

}
#endif
