summaryrefslogtreecommitdiffstats
path: root/dis/original/Update
diff options
context:
space:
mode:
Diffstat (limited to 'dis/original/Update')
-rw-r--r--dis/original/Update/update.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dis/original/Update/update.c b/dis/original/Update/update.c
index 92384cd..1fd8197 100644
--- a/dis/original/Update/update.c
+++ b/dis/original/Update/update.c
@@ -55,8 +55,8 @@ int main(int argc, char** argv){
55 unsigned int hops; 55 unsigned int hops;
56 unsigned int l; 56 unsigned int l;
57 57
58 fscanf(stdin, "%u %u %u %d %u %u %u", 58 assert(fscanf(stdin, "%u %u %u %d %u %u %u",
59 &f, &l, &maxhops, &seed, &initial, &minStop, &maxStop); 59 &f, &l, &maxhops, &seed, &initial, &minStop, &maxStop) == 7);
60 60
61 assert((f >= MIN_FIELD_SIZE) && (f <= MAX_FIELD_SIZE)); 61 assert((f >= MIN_FIELD_SIZE) && (f <= MAX_FIELD_SIZE));
62 w = (unsigned int )l; 62 w = (unsigned int )l;
@@ -92,7 +92,7 @@ int main(int argc, char** argv){
92 unsigned int max, min; 92 unsigned int max, min;
93 unsigned int partition; 93 unsigned int partition;
94 unsigned int high; 94 unsigned int high;
95 START_LOOP 95 if (hops % 100 == 0) {START_LOOP} // These loops are too quick to sample individually
96 max = MAX_FIELD_SIZE; 96 max = MAX_FIELD_SIZE;
97 min = 0; 97 min = 0;
98 high = 0; 98 high = 0;
@@ -125,7 +125,7 @@ int main(int argc, char** argv){
125 field[index] = sum % (f-w); 125 field[index] = sum % (f-w);
126 index = (partition+hops)%(f-w); 126 index = (partition+hops)%(f-w);
127 hops++; 127 hops++;
128 STOP_LOOP 128 if (hops % 100 == 0) {STOP_LOOP} // These loops are too quick to sample individually
129 }/* end for loop */ 129 }/* end for loop */
130 130
131 startTime = time(NULL) - startTime; 131 startTime = time(NULL) - startTime;