summaryrefslogtreecommitdiffstats
path: root/dis/original/Neighborhood
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/Neighborhood
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/Neighborhood')
-rw-r--r--dis/original/Neighborhood/neighborhood.c9
-rw-r--r--dis/original/Neighborhood/utili.h2
2 files changed, 7 insertions, 4 deletions
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,