summaryrefslogtreecommitdiffstats
path: root/dis/original
diff options
context:
space:
mode:
authorJoshua Bakita <bakitajoshua@gmail.com>2020-05-29 12:44:28 -0400
committerJoshua Bakita <bakitajoshua@gmail.com>2020-05-29 12:44:28 -0400
commit8dfefc152f16f9fd9e8aa0910fd4d23d6543d87e (patch)
tree4e5c596dadf1df4fb77c9a10b3e483939c6aa018 /dis/original
parent43ce989b5077913f18a5b083501498f5e1a6d349 (diff)
Add DIS benchmarks and scripts as they were used for Joshua's PRP
Note that Neighborhood has been modified to use less space
Diffstat (limited to 'dis/original')
-rw-r--r--dis/original/Field/field.c8
-rw-r--r--dis/original/Neighborhood/neighborhood.c9
-rw-r--r--dis/original/Neighborhood/utili.h2
-rw-r--r--dis/original/Pointer/pointer.c8
-rw-r--r--dis/original/Transitive/transitive.c7
-rw-r--r--dis/original/Update/update.c7
-rwxr-xr-xdis/original/runDIS1.sh2
-rwxr-xr-xdis/original/runDIS2.sh2
-rwxr-xr-xdis/original/runDIS4.sh5
-rwxr-xr-xdis/original/summarize.py71
10 files changed, 111 insertions, 10 deletions
diff --git a/dis/original/Field/field.c b/dis/original/Field/field.c
index 7d26d37..a561f72 100644
--- a/dis/original/Field/field.c
+++ b/dis/original/Field/field.c
@@ -18,6 +18,7 @@
18#include <assert.h> 18#include <assert.h>
19#include <stdlib.h> 19#include <stdlib.h>
20#include "DISstressmarkRNG.h" 20#include "DISstressmarkRNG.h"
21#include "extra.h"
21 22
22 23
23#define MIN_FIELD_SIZE 16 24#define MIN_FIELD_SIZE 16
@@ -38,8 +39,8 @@
38 * main() 39 * main()
39 */ 40 */
40 41
41int main(){ 42int main(int argc, char** argv){
42 43 SET_UP
43 unsigned char *field; 44 unsigned char *field;
44 unsigned int f; 45 unsigned int f;
45 int seed; 46 int seed;
@@ -93,6 +94,7 @@ int main(){
93 startTime = time(NULL); 94 startTime = time(NULL);
94 95
95 for (l =0; l<n; l++){ 96 for (l =0; l<n; l++){
97 START_LOOP
96 unsigned int index; 98 unsigned int index;
97 99
98 token[l].subfields = 0; 100 token[l].subfields = 0;
@@ -130,6 +132,7 @@ int main(){
130 } 132 }
131 index++; 133 index++;
132 } 134 }
135 STOP_LOOP
133 } 136 }
134 137
135 startTime = time(NULL) - startTime; 138 startTime = time(NULL) - startTime;
@@ -144,5 +147,6 @@ int main(){
144 } 147 }
145 fprintf(stdout, "total time = %d seconds.\n", (int)startTime); 148 fprintf(stdout, "total time = %d seconds.\n", (int)startTime);
146 free(field); 149 free(field);
150 WRITE_TO_FILE
147 return(0); 151 return(0);
148 } 152 }
diff --git a/dis/original/Neighborhood/neighborhood.c b/dis/original/Neighborhood/neighborhood.c
index e3d4f69..2d50336 100644
--- a/dis/original/Neighborhood/neighborhood.c
+++ b/dis/original/Neighborhood/neighborhood.c
@@ -19,11 +19,12 @@
19#include<assert.h> 19#include<assert.h>
20#include "DISstressmarkRNG.h" 20#include "DISstressmarkRNG.h"
21#include "utili.h" 21#include "utili.h"
22#include "extra.h"
22 23
23/* 24/*
24 * main() 25 * main()
25 */ 26 */
26int main() 27int main(int argc, char** argv)
27{ 28{
28 long int seed; 29 long int seed;
29 int dimension; 30 int dimension;
@@ -39,6 +40,7 @@ int main()
39 40
40 time_t beginTime; 41 time_t beginTime;
41 time_t endTime; 42 time_t endTime;
43 SET_UP
42 44
43 fscanf(stdin, "%ld %d %d %d %d %d %d %d", 45 fscanf(stdin, "%ld %d %d %d %d %d %d %d",
44 &seed, &bitDepth, &dimension, &numberLines, 46 &seed, &bitDepth, &dimension, &numberLines,
@@ -61,11 +63,12 @@ int main()
61 assert (image != NULL); 63 assert (image != NULL);
62 64
63 beginTime = time(NULL); 65 beginTime = time(NULL);
64 66 START_LOOP
65 neighborhoodCalculation(image, dimension, 67 neighborhoodCalculation(image, dimension,
66 distanceShort, distanceLong, &values, maxPixel); 68 distanceShort, distanceLong, &values, maxPixel);
67 69 STOP_LOOP
68 endTime = time(NULL); 70 endTime = time(NULL);
71 WRITE_TO_FILE
69 72
70 printf(" end time is %d\n", endTime); 73 printf(" end time is %d\n", endTime);
71 74
diff --git a/dis/original/Neighborhood/utili.h b/dis/original/Neighborhood/utili.h
index 2a8e2a0..87a481c 100644
--- a/dis/original/Neighborhood/utili.h
+++ b/dis/original/Neighborhood/utili.h
@@ -54,7 +54,7 @@ typedef struct {
54 Angeles distLong; 54 Angeles distLong;
55}Neighborhood; 55}Neighborhood;
56 56
57typedef short int Pixel; /* short int;*/ 57typedef char Pixel; /* short int;*/
58 58
59 59
60void drawLineSegment(Pixel *image, 60void drawLineSegment(Pixel *image,
diff --git a/dis/original/Pointer/pointer.c b/dis/original/Pointer/pointer.c
index 0c4966f..a0aa62e 100644
--- a/dis/original/Pointer/pointer.c
+++ b/dis/original/Pointer/pointer.c
@@ -17,6 +17,7 @@
17#include <assert.h> 17#include <assert.h>
18#include <stdlib.h> 18#include <stdlib.h>
19#include "DISstressmarkRNG.h" 19#include "DISstressmarkRNG.h"
20#include "extra.h"
20 21
21#define MIN_FIELD_SIZE 16 22#define MIN_FIELD_SIZE 16
22#define MAX_FIELD_SIZE 16777216 23#define MAX_FIELD_SIZE 16777216
@@ -34,7 +35,7 @@
34/* 35/*
35 * main() 36 * main()
36 */ 37 */
37int main(){ 38int main(int argc, char** argv){
38 39
39 unsigned int *field; 40 unsigned int *field;
40 unsigned int f; 41 unsigned int f;
@@ -53,6 +54,7 @@ int main(){
53 }*thread; 54 }*thread;
54 55
55 unsigned int l; 56 unsigned int l;
57 SET_UP
56 58
57 fscanf(stdin, "%lu %u %lu %ld %u", 59 fscanf(stdin, "%lu %u %lu %ld %u",
58 &f, &l, &maxhops, &seed, &n); 60 &f, &l, &maxhops, &seed, &n);
@@ -84,12 +86,12 @@ int main(){
84 for (l=0; l<f; l++){ 86 for (l=0; l<f; l++){
85 field[l] = randInt(0, f-w); 87 field[l] = randInt(0, f-w);
86} 88}
87
88startTime = time(NULL); 89startTime = time(NULL);
89clock(); 90clock();
90 91
91for (l=0; l<n; l++) 92for (l=0; l<n; l++)
92{ 93{
94 START_LOOP
93 unsigned int index; 95 unsigned int index;
94 unsigned int minStop, maxStop; 96 unsigned int minStop, maxStop;
95 unsigned int hops; 97 unsigned int hops;
@@ -140,6 +142,7 @@ for (l=0; l<n; l++)
140 hops++; 142 hops++;
141 }/* end loop ll */ 143 }/* end loop ll */
142 thread[l].hops = hops; 144 thread[l].hops = hops;
145 STOP_LOOP
143} /* end while */ 146} /* end while */
144 147
145 startTime = time(NULL) - startTime; 148 startTime = time(NULL) - startTime;
@@ -151,5 +154,6 @@ for (l=0; l<n; l++)
151 fprintf(stderr, "total time = %u seconds.\n", (unsigned int)startTime); 154 fprintf(stderr, "total time = %u seconds.\n", (unsigned int)startTime);
152 free (field); 155 free (field);
153 free (thread); 156 free (thread);
157 WRITE_TO_FILE
154 158