From 47ced4e96bbb782b9e780e8f2cfc637b2c21ff44 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Mon, 19 Oct 2020 01:30:29 -0400 Subject: 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 --- dis/Neighborhood/neighborhood.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'dis/Neighborhood') 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) { image = malloc(sizeof(Pixel) * dimension * dimension); assert(image != NULL); - beginTime = time(NULL); - START_LOOP - createImage(image, dimension, maxPixel, numberLines, minThickness, - maxThickness); + for_each_job { + beginTime = time(NULL); + createImage(image, dimension, maxPixel, numberLines, minThickness, + maxThickness); - neighborhoodCalculation(image, dimension, distanceShort, distanceLong, - &values, maxPixel); - STOP_LOOP + neighborhoodCalculation(image, dimension, distanceShort, distanceLong, + &values, maxPixel); + } endTime = time(NULL); WRITE_TO_FILE -- cgit v1.2.2