summaryrefslogtreecommitdiffstats
path: root/dis/original/Transitive
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/Transitive
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/Transitive')
-rw-r--r--dis/original/Transitive/transitive.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dis/original/Transitive/transitive.c b/dis/original/Transitive/transitive.c
index ca16a31..5fa52e8 100644
--- a/dis/original/Transitive/transitive.c
+++ b/dis/original/Transitive/transitive.c
@@ -11,6 +11,9 @@
11 * read the Benchmark Analysis and Specifications Document Version 1.0 11 * read the Benchmark Analysis and Specifications Document Version 1.0
12 * before going on since the detailed comments are given in this documents. 12 * before going on since the detailed comments are given in this documents.
13 * the comments are not repeated here. 13 * the comments are not repeated here.
14 *
15 * CHANGELOG:
16 * Joshua Bakita, 05/30/2020: Fixed out-of-bounds randInt call
14 */ 17 */
15 18
16#include <stdio.h> 19#include <stdio.h>
@@ -64,8 +67,8 @@ int main(int argc, char** argv){
64 67
65 randInit(seed); 68 randInit(seed);
66 for (k=0; k<m; k++){ 69 for (k=0; k<m; k++){
67 i = randInt(0, n); 70 i = randInt(0, n-1);
68 j = randInt(0, n); 71 j = randInt(0, n-1);
69 *(din + j*n + i) = randInt(MIN_EDGES, MAX_EDGES); 72 *(din + j*n + i) = randInt(MIN_EDGES, MAX_EDGES);
70 } 73 }
71 74