summaryrefslogtreecommitdiffstats
path: root/dis/original/Neighborhood
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2020-06-11 21:44:56 -0400
committerJoshua Bakita <jbakita@cs.unc.edu>2020-06-11 21:44:56 -0400
commite9285d0cdea756a2830f0ace378e4197b36869aa (patch)
treec936ca400ec6593b24aadb75f961229f0b238e01 /dis/original/Neighborhood
parent18b1585116344646e544d6e3a92f3690356026a9 (diff)
Add initial instrumentation to and fix warnings in DIS stressmarks
Changes: - Backpoint fix to randInt range - Instrument benchmarks with time tracking - assert inputs are correct length to fix compiler warnings Problems: - Timing on a per-loop basis is non representative of real-world workloads, as we clear the cache after every loop. These all need to be re-instrumented to record times for the whole benchmark, rather than per-loop.
Diffstat (limited to 'dis/original/Neighborhood')
-rw-r--r--dis/original/Neighborhood/neighborhood.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dis/original/Neighborhood/neighborhood.c b/dis/original/Neighborhood/neighborhood.c
index 2d50336..1736d38 100644
--- a/dis/original/Neighborhood/neighborhood.c
+++ b/dis/original/Neighborhood/neighborhood.c
@@ -42,10 +42,10 @@ int main(int argc, char** argv)
42 time_t endTime; 42 time_t endTime;
43 SET_UP 43 SET_UP
44 44
45 fscanf(stdin, "%ld %d %d %d %d %d %d %d", 45 assert(fscanf(stdin, "%ld %d %d %d %d %d %d %d",
46 &seed, &bitDepth, &dimension, &numberLines, 46 &seed, &bitDepth, &dimension, &numberLines,
47 &minThickness, &maxThickness, 47 &minThickness, &maxThickness,
48 &distanceShort, &distanceLong); 48 &distanceShort, &distanceLong) == 8);
49 49
50 assert((seed >= MIN_SEED) && (seed <= MAX_SEED)); 50 assert((seed >= MIN_SEED) && (seed <= MAX_SEED));
51 assert((dimension > 0) && (dimension <= MAX_DIMENSION)); 51 assert((dimension > 0) && (dimension <= MAX_DIMENSION));
@@ -70,7 +70,7 @@ int main(int argc, char** argv)
70 endTime = time(NULL); 70 endTime = time(NULL);
71 WRITE_TO_FILE 71 WRITE_TO_FILE
72 72
73 printf(" end time is %d\n", endTime); 73// printf(" end time is %d\n", endTime);
74 74
75 fprintf(stdout, "%9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e", 75 fprintf(stdout, "%9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e",
76 values.distShort.deg0.entropy, 76 values.distShort.deg0.entropy,