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

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

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

/* DEFS: group WSLB{
void WSLB(void);
void ReceiveStats(WSLBStatsMsg*);
void ResumeClients(void);
void ReceiveMigration(WSLBMigrateMsg*);
};
 */
#ifndef CK_TEMPLATES_ONLY
int CProxy_WSLB::__idx=0;
#endif
#ifndef CK_TEMPLATES_ONLY
    void CProxy_WSLB::__register(const char *s, size_t size) {
      __idx = CkRegisterChare(s, size);
    /* REG: void WSLB(void);
*/
      __idx_WSLB_void = CkRegisterEp("WSLB", (CkCallFnPtr)_call_WSLB_void, 0, __idx);

    /* REG: void ReceiveStats(WSLBStatsMsg*);
*/
      __idx_ReceiveStats_WSLBStatsMsg = CkRegisterEp("ReceiveStats", (CkCallFnPtr)_call_ReceiveStats_WSLBStatsMsg, CMessage_WSLBStatsMsg::__idx, __idx);

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

    /* REG: void ReceiveMigration(WSLBMigrateMsg*);
*/
      __idx_ReceiveMigration_WSLBMigrateMsg = CkRegisterEp("ReceiveMigration", (CkCallFnPtr)_call_ReceiveMigration_WSLBMigrateMsg, CMessage_WSLBMigrateMsg::__idx, __idx);
    }
#endif
#ifndef CK_TEMPLATES_ONLY
/* DEFS: void WSLB(void);
 */
int CProxy_WSLB::__idx_WSLB_void=0;
CkGroupID CProxy_WSLB::ckNew(void)
{
      void *msg = CkAllocSysMsg();
  return CkCreateGroup(__idx, __idx_WSLB_void, msg, 0, 0);
}
CkGroupID CProxy_WSLB::ckNewSync(void)
{
      void *msg = CkAllocSysMsg();
  return CkCreateGroupSync(__idx, __idx_WSLB_void, msg);
}
  CProxy_WSLB::CProxy_WSLB(int retEP, CkChareID *cid)
{
      void *msg = CkAllocSysMsg();
  _ck_gid = CkCreateGroup(__idx, __idx_WSLB_void, msg, retEP, cid);
  _setChare(0);
}
  CProxy_WSLB::CProxy_WSLB(void)
{
      void *msg = CkAllocSysMsg();
  _ck_gid = CkCreateGroup(__idx, __idx_WSLB_void, msg, 0, 0);
  _setChare(0);
}
void CProxy_WSLB::_call_WSLB_void(void* msg, WSLB* obj)
{
  new (obj) WSLB();
  CkFreeSysMsg(msg);
}

/* DEFS: void ReceiveStats(WSLBStatsMsg*);
 */
int CProxy_WSLB::__idx_ReceiveStats_WSLBStatsMsg=0;
void CProxy_WSLB::_call_ReceiveStats_WSLBStatsMsg(void* msg, WSLB* obj)
{
  obj->ReceiveStats((WSLBStatsMsg*)msg);
}

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

/* DEFS: void ReceiveMigration(WSLBMigrateMsg*);
 */
int CProxy_WSLB::__idx_ReceiveMigration_WSLBMigrateMsg=0;
void CProxy_WSLB::_call_ReceiveMigration_WSLBMigrateMsg(void* msg, WSLB* obj)
{
  obj->ReceiveMigration((WSLBMigrateMsg*)msg);
}
#endif /*CK_TEMPLATES_ONLY*/

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

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

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

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

/* REG: group WSLB{
void WSLB(void);
void ReceiveStats(WSLBStatsMsg*);
void ResumeClients(void);
void ReceiveMigration(WSLBMigrateMsg*);
};
*/
  CProxy_WSLB::__register("WSLB", sizeof(WSLB));

}
#endif
