*** empty log message ***
authorSameer Kumar <skumar2@uiuc.edu>
Mon, 31 Jan 2005 18:35:10 +0000 (18:35 +0000)
committerSameer Kumar <skumar2@uiuc.edu>
Mon, 31 Jan 2005 18:35:10 +0000 (18:35 +0000)
src/ck-com/MsgPacker.h

index 2e27a7ed9304c53aa7d009cb6c4be565af0d1f98..c30744cfc8c60e9fee410474b377642174f5b34a 100644 (file)
@@ -38,18 +38,21 @@ inline short_envelope::~short_envelope(){
 }
 
 inline void short_envelope::pup(PUP::er &p){    
-
-    p | epIdx;
-    p | size;        
-    //p | idx;
-    
-    if(p.isUnpacking())
-        idx.nInts = 0;
-
-    p((char *)&(idx.nInts), 1);
-    p((int *)(idx.data()), idx.nInts);
-
-    p.pupCmiAllocBuf((void **)&data, size);
+  char nints = 0;
+
+  p | epIdx;
+  p | size;        
+  //p | idx;
+  
+  //Complex pup of arrays, even want to save 3 bytes, GREEDY, GREEDY :)
+  if(!p.isUnpacking()) 
+    nints = idx.nInts;
+
+  p | nints;
+  idx.nInts = nints;
+  p((int *)(idx.data()), idx.nInts);
+  
+  p.pupCmiAllocBuf((void **)&data, size);
 }
 
 struct CombinedMessage{