diff --git a/src/benchmarks/rodinia-srad/c/README b/src/benchmarks/rodinia-srad/c/README index bd61c69d56ff4685a3fa581c8b3aaffa8756fcac..d7f99e7b8a9c51579cd393e4d118a3cddc07a66d 100644 --- a/src/benchmarks/rodinia-srad/c/README +++ b/src/benchmarks/rodinia-srad/c/README @@ -1,5 +1,5 @@ Usage: -srad 128 128 0 31 0 31 4 0.5 2 +srad 128 128 0 31 0 31 0.5 2 128 //number of rows in the domain 128 //number of cols in the domain @@ -7,7 +7,6 @@ srad 128 128 0 31 0 31 4 0.5 2 31 //y2 position of the speckle 0 //x1 position of the speckle 31 //x2 position of the speckle -4 //number of threads 0.5 //Lambda value 2 //number of iterations diff --git a/src/benchmarks/rodinia-srad/c/srad.cpp b/src/benchmarks/rodinia-srad/c/srad.cpp index 6bb579f3efcb6d29f7267f56f13c1ffc8c4c3eb0..678ec9b9860685dacbd2db1283a9acbb43abe086 100644 --- a/src/benchmarks/rodinia-srad/c/srad.cpp +++ b/src/benchmarks/rodinia-srad/c/srad.cpp @@ -11,16 +11,13 @@ void random_matrix(float *I, int rows, int cols); void usage(int argc, char **argv) { - fprintf(stderr, "Usage: %s <rows> <cols> <y1> <y2> <x1> <x2> <no. of " - "threads><lamda> <no. of iter>\n", - argv[0]); + fprintf(stderr, "Usage: %s <rows> <cols> <y1> <y2> <x1> <x2> <lamda> <no. of iter>\n", argv[0]); fprintf(stderr, "\t<rows> - number of rows\n"); fprintf(stderr, "\t<cols> - number of cols\n"); fprintf(stderr, "\t<y1> - y1 value of the speckle\n"); fprintf(stderr, "\t<y2> - y2 value of the speckle\n"); fprintf(stderr, "\t<x1> - x1 value of the speckle\n"); fprintf(stderr, "\t<x2> - x2 value of the speckle\n"); - fprintf(stderr, "\t<no. of threads> - no. of threads\n"); fprintf(stderr, "\t<lamda> - lambda (0,1)\n"); fprintf(stderr, "\t<no. of iter> - number of iterations\n"); @@ -38,9 +35,8 @@ int main(int argc, char *argv[]) { float *c, D; float lambda; int i, j; - int nthreads; - if (argc == 10) { + if (argc == 9) { rows = atoi(argv[1]); // number of rows in the domain cols = atoi(argv[2]); // number of cols in the domain if ((rows % 16 != 0) || (cols % 16 != 0)) { @@ -51,9 +47,8 @@ int main(int argc, char *argv[]) { r2 = atoi(argv[4]); // y2 position of the speckle c1 = atoi(argv[5]); // x1 position of the speckle c2 = atoi(argv[6]); // x2 position of the speckle - nthreads = atoi(argv[7]); // number of threads - lambda = atof(argv[8]); // Lambda value - niter = atoi(argv[9]); // number of iterations + lambda = atof(argv[7]); // Lambda value + niter = atoi(argv[8]); // number of iterations } else { usage(argc, argv); } @@ -116,7 +111,6 @@ int main(int argc, char *argv[]) { q0sqr = varROI / (meanROI * meanROI); - omp_set_num_threads(nthreads); #pragma omp parallel for shared(J, dN, dS, dW, dE, c, rows, cols, iN, iS, jW, \ jE) private(i, j, k, Jc, G2, L, num, den, \ qsqr) @@ -155,7 +149,6 @@ int main(int argc, char *argv[]) { } } - omp_set_num_threads(nthreads); #pragma omp parallel for shared(J, c, rows, cols, \ lambda) private(i, j, k, D, cS, cN, cW, cE) for (int i = 0; i < rows; i++) {