ckmulticast: cleanup some dead code
authorRamprasad Venkataraman <ramv@illinois.edu>
Thu, 11 Nov 2010 17:25:31 +0000 (11:25 -0600)
committerRamprasad Venkataraman <ramv@illinois.edu>
Fri, 19 Nov 2010 15:42:53 +0000 (09:42 -0600)
src/libs/ck-libs/multicast/ckmulticast.C
src/libs/ck-libs/multicast/ckmulticast.h

index e217feaceb236e6a1790f864b2c123de687e69ad..374129772ec36c97b32e7825d3d3e61d658a2fbe 100644 (file)
@@ -1377,64 +1377,5 @@ void CkMulticastMgr::updateRedNo(mCastEntryPtr entry, int red)
   releaseFutureReduceMsgs(entry);
 }
 
-#if 0
-////////////////////////////////////////////////////////////////////////////////
-/////
-///////////////// Builtin Reducer Functions //////////////
-static CkReductionMsg *invalid_reducer(int nMsg,CkReductionMsg **msg)
-{CkAbort("ERROR! Called the invalid reducer!\n");return NULL;}
-
-/* A simple reducer, like sum_int, looks like this:
-static CkReductionMsg *sum_int(int nMsg,CkReductionMsg **msg)
-{
-  int i,ret=0;
-  for (i=0;i<nMsg;i++)
-    ret+=*(int *)(msg[i]->data);
-  return CkReductionMsg::buildNew(sizeof(int),(void *)&ret);
-}
-*/
-
-#define SIMPLE_REDUCTION(name,dataType,typeStr,loop) \
-static CkReductionMsg *name(int nMsg, CkReductionMsg **msg)\
-{\
-  int m,i;\
-  int nElem=msg[0]->getSize()/sizeof(dataType);\
-  dataType *ret=(dataType *)(msg[0]->getData());\
-  for (m=1;m<nMsg;m++)\
-  {\
-    dataType *value=(dataType *)(msg[m]->getData());\
-    for (i=0;i<nElem;i++)\
-    {\
-      loop\
-    }\
-  }\
-  return CkReductionMsg::buildNew(nElem*sizeof(dataType),(void *)ret);\
-}
-
-//Use this macro for reductions that have the same type for all inputs
-#define SIMPLE_POLYMORPH_REDUCTION(nameBase,loop) \
-  SIMPLE_REDUCTION(nameBase##_int,int,"%d",loop) \
-  SIMPLE_REDUCTION(nameBase##_float,float,"%f",loop) \
-  SIMPLE_REDUCTION(nameBase##_double,double,"%f",loop)
-
-
-//Compute the sum the numbers passed by each element.
-SIMPLE_POLYMORPH_REDUCTION(sum,ret[i]+=value[i];)
-
-SIMPLE_POLYMORPH_REDUCTION(product,ret[i]*=value[i];)
-
-SIMPLE_POLYMORPH_REDUCTION(max,if (ret[i]<value[i]) ret[i]=value[i];)
-
-SIMPLE_POLYMORPH_REDUCTION(min,if (ret[i]>value[i]) ret[i]=value[i];)
-
-CkReduction::reducerFn CkMulticastMgr::reducerTable[CkMulticastMgr::MAXREDUCERS]={
-    ::invalid_reducer,
-  //Compute the sum the numbers passed by each element.
-    ::sum_int,::sum_float,::sum_double,
-    ::product_int,::product_float,::product_double,
-    ::max_int,::max_float,::max_double,
-    ::min_int,::min_float,::min_double
-};
-#endif
-
 #include "CkMulticast.def.h"
+
index 0dbee89caad10deaefedf78c000c6087788fd505..cd26cb7be453d4d38261f5d87f793232c1df97cf 100644 (file)
@@ -17,30 +17,6 @@ PUPbytes(mCastEntryPtr)
 
 #include "CkMulticast.decl.h"
 
-#if 0
-class CkMcastReductionMsg: public CMessage_CkMcastReductionMsg {
-friend class CkMulticastMgr;
-public:
-  int dataSize;
-  char *data;
-  CkSectionInfo sid;
-private:
-  CkReduction::reducerType reducer;
-  char flag;  // 1: come from array elem 2: come from BOC
-  int redNo;
-  int gcounter;
-  int userFlag; // user set for use by client 
-  char rebuilt;
-  CkCallback callback;   /**< user callback */
-public:
-  static CkMcastReductionMsg* buildNew(int NdataSize,void *srcData,
-                 CkReduction::reducerType reducer=CkReduction::invalid);
-  void setCallback(CkCallback &cb) { callback = cb; }
-  inline int getSize(void) const {return dataSize;}
-  inline void *getData(void) {return data;}
-};
-#endif
-
 typedef void (*redClientFn)(CkSectionInfo sid, void *param,int dataSize,void *data);
 
 /// Retrieve section info from a multicast msg. Part of API
@@ -147,8 +123,7 @@ class CkMulticastMgr: public CkDelegateMgr
         void sendToSection(CkDelegateData *pd,int ep,void *m, CkSectionID *sid, int opts);
         /// Mark old cookie spanning tree as old and build a new one
         void resetCookie(CkSectionInfo sid);
-        enum {MAXREDUCERS=256};
-        // static CkReduction::reducerFn reducerTable[MAXREDUCERS];
+        ///
         void releaseBufferedReduceMsgs(mCastEntryPtr entry);
         /// Release buffered redn msgs from later reductions which arrived early (out of order)
         void releaseFutureReduceMsgs(mCastEntryPtr entry);