Simplified initialization
[charm.git] / NodeHelper.C
index d2539af8fd87fba6768b2874f3a0db7e58730660..20fc4d6726fdc33e24a93dc9079b4b8e45ca8401 100644 (file)
@@ -13,17 +13,11 @@ FuncNodeHelper::FuncNodeHelper()
        useTreeBcast = (numHelpers >= USE_TREE_BROADCAST_THRESHOLD);
        
        int pestart = CkNodeFirst(CkMyNode());
-       
-       CkChareID *helperArr = new CkChareID[numHelpers];
-       for (int i=0; i<numHelpers; i++) {
-               CProxy_FuncSingleHelper::ckNew(thisgroup, &helperArr[i], pestart+i);
-               helperPtr[i] = NULL;
-       }
+               
        for (int i=0; i<numHelpers; i++) {
-               CProxy_FuncSingleHelper helpProxy(helperArr[i]);
-               helpProxy.reportCreated();
-       }
-       delete [] helperArr;
+        CkChareID helper;
+        CProxy_FuncSingleHelper::ckNew((size_t)this, &helper, pestart+i);
+       }       
 #endif
 }