From a3886552003d031acb9039e920b7c9ddce946ad6 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Sat, 17 Oct 2020 14:43:46 -0400 Subject: DIS fixes used for (rejected) RTSS'20 submission - All: Output times to stderr and nothing to stdout - Field, Update, Pointer: change definition of a job to match other stressmark execution times more closely - Matrix: move all allocations into main() - Update: Use volatile to prevent computations from being optimized out - Transitive: Use volatile to prevent computations from being optimized out - Neighborhood: Use working version of drawLineSegment from original DIS sample code --- dis/Pointer/pointer.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'dis/Pointer/pointer.c') diff --git a/dis/Pointer/pointer.c b/dis/Pointer/pointer.c index 5671697..3fc7248 100644 --- a/dis/Pointer/pointer.c +++ b/dis/Pointer/pointer.c @@ -38,19 +38,19 @@ int main(int argc, char** argv){ unsigned int *field; - unsigned int f; + unsigned long f; unsigned short int w; - unsigned int maxhops; - int seed; + unsigned long maxhops; + long seed; unsigned int n; - clock_t startTime; + clock_t startTime, endTime; struct threadS{ - unsigned int initial; - unsigned int minStop; - unsigned int maxStop; - unsigned int hops; + unsigned long initial; + unsigned long minStop; + unsigned long maxStop; + unsigned long hops; }*thread; unsigned int l; @@ -72,7 +72,7 @@ int main(int argc, char** argv){ return (-1); for (l=0; l= 0) && (thread[l].initial < f)); assert ((thread[l].minStop >= 0) && (thread[l].minStop < f)); @@ -89,9 +89,9 @@ int main(int argc, char** argv){ startTime = time(NULL); clock(); +START_LOOP for (l=0; l