*** empty log message ***
authorSameer Kumar <skumar2@uiuc.edu>
Sat, 30 Sep 2006 01:49:22 +0000 (01:49 +0000)
committerSameer Kumar <skumar2@uiuc.edu>
Sat, 30 Sep 2006 01:49:22 +0000 (01:49 +0000)
src/arch/bluegenel/bglmachine.C

index 4676531ff38125f6a48d1192b462cf7487c9e273..14ab95a3af835c9bb5382d39d9940a4db9ddb75b 100644 (file)
@@ -437,9 +437,6 @@ int  networkProgressPeriod;
 // Rectangular broadcast implementation 
 // -----------------------------------------
 
-#define MAX_COMM  256
-static void * comm_table [MAX_COMM];
-
 typedef struct rectbcast_msg {
   BGTsRC_t           request;
   BGML_Callback_t    cb;
@@ -453,8 +450,13 @@ static void bcast_done (void *data) {
   free (rinfo);
 }
 
+
+typedef void * (*requestFnType) (unsigned);
+
+requestFnType requestFn;
+
 static  void *   getRectBcastRequest (unsigned comm) {
-  return comm_table [comm];
+  return requestFn (comm);
 }
 
 
@@ -492,20 +494,22 @@ void bgl_machine_RectBcast (unsigned                 commid,
   
 }
 
-extern "C" 
-void        bgl_machine_RectBcastInit  (unsigned               commID,
-                                       const BGTsRC_Geometry_t* geometry) {
-  
-  CmiAssert (commID < 256);
-  CmiAssert (comm_table [commID] == NULL);
+extern "C"   
+void    *         bgl_machine_RectBcastInit  (unsigned               commID,
+                                             const BGTsRC_Geometry_t* geometry) {
   
   BGTsRC_t *request =  (BGTsRC_t *) malloc (sizeof (BGTsRC_t));
-  comm_table [commID] = request;
-  
   BGTsRC_AsyncBcast_init  (request, commID,  geometry);
+  
+  return request;
 }
 
 
+extern "C" 
+void  bgl_machineRectBcastConfigure (requestFnType fn) {
+  requestFn = fn;
+}
+
 
 
 //--------------------------------------------------------------