/* * Sample code for the DIS Transitive Stressmark * * This source code is the completely correct source code based on * the example codes provided by Atlantic Aerospace Division, Titan * Systems Corporation, 2000. * * If you just compile and generate the executables from this source * code, this code would be enough. However, if you wish to get a complete * understanding of this stressmark, it is strongly suggested that you * read the Benchmark Analysis and Specifications Document Version 1.0 * before going on since the detailed comments are given in this documents. * the comments are not repeated here. */ #include #include #include #include #include "DISstressmarkRNG.h" #include "extra.h" #define MIN_VERTICES 8 #define MAX_VERTICES 16384 #define MIN_EDGES 0 #define MAX_EDGES 268435456 #define MIN_SEED -2147483647 #define MAX_SEED -1 #define NO_PATH 2147483647 #define MIN_EDGS 0 #define MAX_EDGE 255 /* * main() */ int main(int argc, char** argv){ unsigned int *din, *dout; unsigned int n; unsigned int m; unsigned int i, j, k; int seed; time_t startTime; unsigned int sum; fscanf(stdin,"%d %d %d", &n, &m, &seed); assert((n >= MIN_VERTICES) && (n <= MAX_VERTICES)); assert((m >= MIN_EDGES) && (m <= MAX_EDGES)); assert (m <= n*n); assert ((seed >= MIN_SEED) && (seed <= MAX_SEED)); if ((din = (unsigned int *)malloc(n*n*sizeof(unsigned int))) == NULL) return (-1); if ((dout = (unsigned int *)malloc(n*n*sizeof(unsigned int))) == NULL) return (-1); for (i=0; i