Skip to content
Snippets Groups Projects
Verified Commit 6f64d72c authored by Dorian Stoll's avatar Dorian Stoll
Browse files

rodinia-srad: c: Unconditionally use OpenMP

parent 5c08b7d3
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// //
#define OPEN
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -117,12 +116,10 @@ int main(int argc, char *argv[]) { ...@@ -117,12 +116,10 @@ int main(int argc, char *argv[]) {
q0sqr = varROI / (meanROI * meanROI); q0sqr = varROI / (meanROI * meanROI);
#ifdef OPEN
omp_set_num_threads(nthreads); omp_set_num_threads(nthreads);
#pragma omp parallel for shared(J, dN, dS, dW, dE, c, rows, cols, iN, iS, jW, \ #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, \ jE) private(i, j, k, Jc, G2, L, num, den, \
qsqr) qsqr)
#endif
for (int i = 0; i < rows; i++) { for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) { for (int j = 0; j < cols; j++) {
...@@ -157,11 +154,10 @@ int main(int argc, char *argv[]) { ...@@ -157,11 +154,10 @@ int main(int argc, char *argv[]) {
} }
} }
} }
#ifdef OPEN
omp_set_num_threads(nthreads); omp_set_num_threads(nthreads);
#pragma omp parallel for shared(J, c, rows, cols, \ #pragma omp parallel for shared(J, c, rows, cols, \
lambda) private(i, j, k, D, cS, cN, cW, cE) lambda) private(i, j, k, D, cS, cN, cW, cE)
#endif
for (int i = 0; i < rows; i++) { for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) { for (int j = 0; j < cols; j++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment