diff options
| author | Joshua Bakita <jbakita@cs.unc.edu> | 2020-10-19 01:30:29 -0400 |
|---|---|---|
| committer | Joshua Bakita <jbakita@cs.unc.edu> | 2020-10-19 01:30:29 -0400 |
| commit | 47ced4e96bbb782b9e780e8f2cfc637b2c21ff44 (patch) | |
| tree | e0d2a0f28145ba21312c8d96442228d4b7219ff7 /dis/Neighborhood | |
| parent | a71fc97fd262e1b5770f827047ea60bbaf38d9a2 (diff) | |
Enable internal DIS job looping and port to new extra.h API
Changes to DIS code:
- field, pointer, transitive, and update's random initialization
steps moved the main job loop (so that they run on fresh state
each job).
- Moved free() calls outside of the job loop in matrix
- Removed loose clock() call in pointer
Misc fixes:
- Added input file for neighborhood
- Log status before, rather than after, printing in gen_input.py
Diffstat (limited to 'dis/Neighborhood')
| -rw-r--r-- | dis/Neighborhood/neighborhood.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/dis/Neighborhood/neighborhood.c b/dis/Neighborhood/neighborhood.c index 614b8e8..2d401d3 100644 --- a/dis/Neighborhood/neighborhood.c +++ b/dis/Neighborhood/neighborhood.c | |||
| @@ -63,14 +63,14 @@ int main(int argc, char **argv) { | |||
| 63 | image = malloc(sizeof(Pixel) * dimension * dimension); | 63 | image = malloc(sizeof(Pixel) * dimension * dimension); |
| 64 | assert(image != NULL); | 64 | assert(image != NULL); |
| 65 | 65 | ||
| 66 | beginTime = time(NULL); | 66 | for_each_job { |
| 67 | START_LOOP | 67 | beginTime = time(NULL); |
| 68 | createImage(image, dimension, maxPixel, numberLines, minThickness, | 68 | createImage(image, dimension, maxPixel, numberLines, minThickness, |
| 69 | maxThickness); | 69 | maxThickness); |
| 70 | 70 | ||
| 71 | neighborhoodCalculation(image, dimension, distanceShort, distanceLong, | 71 | neighborhoodCalculation(image, dimension, distanceShort, distanceLong, |
| 72 | &values, maxPixel); | 72 | &values, maxPixel); |
| 73 | STOP_LOOP | 73 | } |
| 74 | endTime = time(NULL); | 74 | endTime = time(NULL); |
| 75 | WRITE_TO_FILE | 75 | WRITE_TO_FILE |
| 76 | 76 | ||
