[Sumover-dev] [svn commit] r4503 - vic/branches/cc/cc

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Tue Aug 4 21:27:41 BST 2009


Author: soohyunc
Date: Tue Aug  4 21:27:40 2009
New Revision: 4503

Modified:
   vic/branches/cc/cc/tfwc_sndr.cpp

Log:
introduced BITLEN instead of 16.



Modified: vic/branches/cc/cc/tfwc_sndr.cpp
==============================================================================
--- vic/branches/cc/cc/tfwc_sndr.cpp	(original)
+++ vic/branches/cc/cc/tfwc_sndr.cpp	Tue Aug  4 21:27:40 2009
@@ -209,13 +209,14 @@
 	// number of seqvec elements 
 	// (i.e., number of packets in AckVec)
 	int numElm = ends_ - begins_;
+	int x = numElm%BITLEN;
 
 	// start of seqvec
 	int start = jacked_;
 
 	int i, j, k = 0;
 	for (i = 0; i < num_chunks-1; i++) {
-		for (j = 0; j < 16; j++) {
+		for (j = 0; j < BITLEN; j++) {
 			if ( CHECK_BIT_AT(ackvec[i], (j+1)) )
 				seqvec_[k%SSZ] = start;
 		else num_loss_++;
@@ -223,7 +224,7 @@
 		}
 	}
 
-	int a = (numElm%16 == 0) ? 16 : numElm%16;
+	int a = (x == 0) ? BITLEN : x;
 	for (i = 0; i < a; i++) {
 		if ( CHECK_BIT_AT(ackvec[num_chunks-1], i+1 ))
 			seqvec_[k++%SSZ] = start;



More information about the Sumover-dev mailing list