filename
stringlengths
78
241
omp_pragma_line
stringlengths
24
416
context_chars
int64
100
100
text
stringlengths
152
177k
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/ysh329/OpenMP-101/vec_add/vec_add.c
#pragma omp parallel for
100
threads = omp_get_num_threads(); printf("Number of threads = %d\n", nthreads); // init <LOOP-START>for(idx=0; idx<N; ++idx) { a[idx] = b[idx] = 1.0; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/ysh329/OpenMP-101/vec_add/vec_add.c
#pragma omp parallel for
100
lel for for(idx=0; idx<N; ++idx) { a[idx] = b[idx] = 1.0; } // vec add <LOOP-START>for(idx=0; idx<N; ++idx) { c[idx] = a[idx] + b[idx]; tid = omp_get_thread_num(); printf("Thread %2d: c[%2d]=%.2f\n", tid, idx, c[idx]); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/ysh329/OpenMP-101/mat_mult/mat_mult.c
#pragma omp parallel for
100
//int nthreads = omp_get_num_threads(); //printf("Number of threads = %d\n", nthreads); <LOOP-START>for(register int i=0; i<m; i+=4) { //#pragma omp parallel for for(register int j=0; j<n; ++j) { //#pragma omp parallel for register DTYPE *a0p = &A(i, 0); register DTYPE *a1p = &A(i+1, 0); register DTYPE *a2p = &A(i+2, 0); register DTYPE *a3p = &A(i+3, 0); register DTYPE bp0 = B(0, j); for(register int p=0; p<k; ++p) { C(i, j) += *a0p * bp0; C(i+1, j) += *a1p * bp0; C(i+2, j) += *a2p * bp0; C(i+3, j) += *a3p * bp0; ++a0p; ++a1p; ++a2p; ++a3p; } } }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/ysh329/OpenMP-101/mat_mult/mat_mult.c
#pragma omp parallel for
100
%d\n", nthreads); #pragma omp parallel for for(register int i=0; i<m; i+=4) { //<LOOP-START>for(register int j=0; j<n; ++j) { //#pragma omp parallel for register DTYPE *a0p = &A(i, 0); register DTYPE *a1p = &A(i+1, 0); register DTYPE *a2p = &A(i+2, 0); register DTYPE *a3p = &A(i+3, 0); register DTYPE bp0 = B(0, j); for(register int p=0; p<k; ++p) { C(i, j) += *a0p * bp0; C(i+1, j) += *a1p * bp0; C(i+2, j) += *a2p * bp0; C(i+3, j) += *a3p * bp0; ++a0p; ++a1p; ++a2p; ++a3p; } }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/ysh329/OpenMP-101/mat_mult/mat_mult.c
#pragma omp parallel for
100
//#pragma omp parallel for for(register int j=0; j<n; ++j) { //<LOOP-START>register DTYPE *a0p = &A(i, 0); register DTYPE *a1p = &A(i+1, 0); register DTYPE *a2p = &A(i+2, 0); register DTYPE *a3p = &A(i+3, 0); register DTYPE bp0 = B(0, j); for(register int p=0; p<k; ++p) { C(i, j) += *a0p * bp0; C(i+1, j) += *a1p * bp0; C(i+2, j) += *a2p * bp0; C(i+3, j) += *a3p * bp0; ++a0p; ++a1p; ++a2p; ++a3p; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/ysh329/OpenMP-101/map_reduce/map_reduce.c
#pragma omp parallel for
100
return; } DTYPE *init(DTYPE *in, const int len, const DTYPE val) { assert(in && len>0); <LOOP-START>for(int idx=0; idx<len; ++idx) { in[idx] = val; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/ysh329/OpenMP-101/map_reduce/map_reduce.c
#pragma omp parallel for
100
DTYPE *in, register DTYPE *out, register const int len) { assert(f && in && out && len>0); <LOOP-START>for(register int idx=0; idx<len; ++idx) { out[idx] = f(in[idx]); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/ysh329/OpenMP-101/map_reduce/map_reduce.c
#pragma omp parallel for
100
ter const DTYPE *in, register const int len) { assert(f && in && len>0); DTYPE res = 0; <LOOP-START>for(register int idx=0; idx<len; ++idx) { DTYPE e = in[idx]; #pragma omp critical res = f(res, e); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/ysh329/OpenMP-101/pi/my_pi.c
#pragma omp parallel for reduction(+:cur_pi)
100
- 1/15 ... double calc_pi_gregory(const long max_iter_times) { register double cur_pi = 0; <LOOP-START>for(register int idx=1; idx<=max_iter_times; idx+=2) { cur_pi += (idx>>1 & 1) ? -4./idx : 4./idx; }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:cur_pi)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/ysh329/OpenMP-101/pi/my_pi.c
#pragma omp parallel for reduction(+:cur_pi)
100
n pi; } double calc_pi_nilakantha(const long max_iter_times) { register double cur_pi = 3; <LOOP-START>for(register int idx=2; idx<=max_iter_times; idx+=2) { cur_pi += (idx>>1 & 1) ? 4./(idx*(idx+1)*(idx+2)) : -4./(idx*(idx+1)*(idx+2));//TODO //printf("%d %d %d \n", idx, idx+1, idx+2); }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:cur_pi)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/ysh329/OpenMP-101/pooling/pooling.c
#pragma omp parallel for
100
rd_pooling(layer_t *l) { assert(l); int h_offset = -l->pad; int w_offset = -l->pad; <LOOP-START>for(int b=0; b<l->output_shape[0]; ++b) { for(int k=0; k<l->output_shape[1]; ++k) { for(int i=0; i<l->output_shape[2]; ++i) { for(int j=0; j<l->output_shape[3]; ++j) { int out_idx = OUT_IDX(b, k, i, j); int max_idx = -1; DTYPE max = -FLT_MAX; for(int n=0; n<l->ksize; ++n) { for(int m=0; m<l->ksize; ++m) { int cur_h = i*l->stride + h_offset + n; int cur_w = j*l->stride + w_offset + m; int in_idx = IN_IDX(b, k, cur_h, cur_w); int valid = (cur_h>=0 && cur_h<l->output[2] && cur_w>=0 && cur_w<l->output[3]); DTYPE val = (valid!=0) ? l->input[in_idx] : -FLT_MAX; max = (val > max) ? val : max; max_idx = (val > max) ? in_idx: max_idx; } } l->output[out_idx] = max; // l->indexes[out_idx] = max_idx; // record for backprop } } } }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/speglich/offloading-to-nvme/src/non-mpi/gradient.c
#pragma omp parallel for schedule(static,1) num_threads(nthreads)
100
MER(section1,timers) /* End section1 */ /* Begin read section */ START_TIMER(read) <LOOP-START>for(int i= u_vec->size[1]-1;i>=0;i--) { int tid = i%nthreads; off_t offset = counters[tid] * u_size; lseek(files[tid], -1 * offset, SEEK_END); int ret = read(files[tid], u[t0][i], u_size); if (ret != u_size) { printf("%d", ret); perror("Cannot open output file"); exit(1); } counters[tid]++; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static,1) num_threads(nthreads)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/speglich/offloading-to-nvme/src/non-mpi/forward.c
#pragma omp parallel for schedule(static,1) num_threads(nthreads)
100
R(section2,timers) /* End section2 */ /* Begin write section */ START_TIMER(write) <LOOP-START>for(int i=0; i < u_vec->size[1];i++) { int tid = i%nthreads; int ret = write(files[tid], u[t0][i], u_size); if (ret != u_size) { perror("Cannot open output file"); exit(1); } }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static,1) num_threads(nthreads)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/speglich/offloading-to-nvme/src/mpi/gradient.c
#pragma omp parallel for schedule(static,1) num_threads(nthreads)
100
MER(section1,timers) /* End section1 */ /* Begin read section */ START_TIMER(read) <LOOP-START>for(int i= u_vec->size[1]-1;i>=0;i--) { int tid = i%nthreads; off_t offset = counters[tid] * u_size; lseek(files[tid], -1 * offset, SEEK_END); int ret = read(files[tid], u[t0][i], u_size); if (ret != u_size) { printf("%d", ret); perror("Cannot open output file"); exit(1); } counters[tid]++; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static,1) num_threads(nthreads)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/speglich/offloading-to-nvme/src/mpi/forward.c
#pragma omp parallel for schedule(static,1)
100
R(section2,timers) /* End section2 */ /* Begin write section */ START_TIMER(write) <LOOP-START>for(int i=0; i < u_vec->size[1];i++) { int tid = i%nthreads; int ret = write(files[tid], u[t0][i], u_size); if (ret != u_size) { perror("Write size mismatch with u_size"); exit(1); } }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static,1)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/speglich/offloading-to-nvme/src/gradient/gradient.c
#pragma omp parallel for schedule(static,1) num_threads(nthreads)
100
timers) /* End section1 */ struct timeval start, end; gettimeofday(&start, NULL); <LOOP-START>for(int i= u_vec->size[1]-1;i>=0;i--) { int tid = i%nthreads; off_t offset = counters[tid] * u_size; lseek(files[tid], -1 * offset, SEEK_END); int ret = read(files[tid], u[time][i], u_size); if (ret != u_size) { printf("%d", ret); perror("Cannot open output file"); exit(1); } counters[tid]++; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static,1) num_threads(nthreads)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/speglich/offloading-to-nvme/src/gradient/forward.c
#pragma omp parallel for schedule(static,1) num_threads(nthreads)
100
} /* End section2 */ START_TIMER(section2) /* Begin section3 */ int t2 = time; <LOOP-START>for(int i=0; i < u_vec->size[1];i++) { int tid = i%nthreads; int ret = write(files[tid], u[t2][i], u_size); if (ret != u_size) { perror("Cannot open output file"); exit(1); } }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static,1) num_threads(nthreads)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/speglich/offloading-to-nvme/src/gradient/compression/gradient.c
#pragma omp parallel for schedule(static,1) num_threads(nthreads)
100
timers) /* End section1 */ struct timeval start, end; gettimeofday(&start, NULL); <LOOP-START>for(int i= u_vec->size[1]-1;i>=0;i--) { int tid = i%nthreads; zfp_type type = zfp_type_float; zfp_field* field = zfp_field_1d(u[t2][i], type, u_vec->size[2]); zfp_stream* zfp = zfp_stream_open(NULL); zfp_stream_set_rate(zfp, 8, type, zfp_field_dimensionality(field), zfp_false); //zfp_stream_set_reversible(zfp); //zfp_stream_set_precision(zfp, 1e-3); off_t bufsize = zfp_stream_maximum_size(zfp, field); void* buffer = malloc(bufsize); bitstream* stream = stream_open(buffer, bufsize); zfp_stream_set_bit_stream(zfp, stream); zfp_stream_rewind(zfp); int slice = spt[tid]; offset[tid] += slices_size[tid][slice]; lseek(files[tid], -1 * offset[tid], SEEK_END); int ret = read(files[tid], buffer, slices_size[tid][slice]); if (ret != slices_size[tid][slice]) { printf("%zu\n", offset[tid]); perror("Cannot open output file"); exit(1); } if (!zfp_decompress(zfp, field)) { printf("decompression failed\n"); exit(1); } zfp_field_free(field); zfp_stream_close(zfp); stream_close(stream); free(buffer); spt[tid]--; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static,1) num_threads(nthreads)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/speglich/offloading-to-nvme/src/compression/non-mpi/gradient.c
#pragma omp parallel for schedule(static,1) num_threads(nthreads)
100
,timers) /* End section1 */ /* Begin decompress section */ START_TIMER(decompress) <LOOP-START>for(int i= u_vec->size[1]-1;i>=0;i--) { int tid = i%nthreads; zfp_type type = zfp_type_float; zfp_field* field = zfp_field_2d(u[t2][i], type, u_vec->size[2],u_vec->size[3]); zfp_stream* zfp = zfp_stream_open(NULL); zfp_stream_set_rate(zfp, RATE, type, zfp_field_dimensionality(field), zfp_false); //zfp_stream_set_reversible(zfp); //zfp_stream_set_precision(zfp, 1e-3); off_t bufsize = zfp_stream_maximum_size(zfp, field); void* buffer = malloc(bufsize); bitstream* stream = stream_open(buffer, bufsize); zfp_stream_set_bit_stream(zfp, stream); zfp_stream_rewind(zfp); int slice = spt[tid]; offset[tid] += slices_size[tid][slice]; lseek(files[tid], -1 * offset[tid], SEEK_END); int ret = read(files[tid], buffer, slices_size[tid][slice]); read_size += slices_size[tid][slice]; if (ret != slices_size[tid][slice]) { printf("%zu\n", offset[tid]); perror("Cannot open output file"); exit(1); } if (!zfp_decompress(zfp, field)) { printf("decompression failed\n"); exit(1); } zfp_field_free(field); zfp_stream_close(zfp); stream_close(stream); free(buffer); spt[tid]--; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static,1) num_threads(nthreads)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/speglich/offloading-to-nvme/src/compression/non-mpi/forward.c
#pragma omp parallel for schedule(static,1) num_threads(nthreads)
100
/* Begin compress Section */ START_TIMER(compress) zfp_type type = zfp_type_float; <LOOP-START>for(int i=0; i < u_vec->size[1];i++) { int tid = i%nthreads; zfp_field* field = zfp_field_2d(u[t0][i], type, u_vec->size[2], u_vec->size[3]); zfp_stream* zfp = zfp_stream_open(NULL); zfp_stream_set_rate(zfp, RATE, type, zfp_field_dimensionality(field), zfp_false); //zfp_stream_set_reversible(zfp); //zfp_stream_set_accuracy(zfp, 1e-8); size_t bufsize = zfp_stream_maximum_size(zfp, field); void* buffer = malloc(bufsize); bitstream* stream = stream_open(buffer, bufsize); zfp_stream_set_bit_stream(zfp, stream); zfp_stream_rewind(zfp); size_t zfpsize = zfp_compress(zfp, field); if (!zfpsize) { fprintf(stderr, "compression failed\n"); exit(1); } write(files[tid], buffer, zfpsize); write(metas[tid], &zfpsize, sizeof(size_t)); write_size += zfpsize; zfp_field_free(field); zfp_stream_close(zfp); stream_close(stream); free(buffer); }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static,1) num_threads(nthreads)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGMultiOpenMPTarget.cpp
#pragma omp parallel for reduction(+:red)
100
et + length; i++) { vectorDotResults[d] += a[i] * b[i]; } #else { floatType red = 0; <LOOP-START>for (int i = offset; i < offset + length; i++) { red += a[i] * b[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:red)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
bi) {} }; void CGOpenMP::MatrixCRSOpenMP::allocatePtr(int rows) { MatrixCRS::allocatePtr(rows); <LOOP-START>for (int i = 0; i < rows + 1; i++) { ptr[i] = 0; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
::MatrixCRSOpenMP::allocateIndexAndValue(int values) { MatrixCRS::allocateIndexAndValue(values); <LOOP-START>for (int i = 0; i < N; i++) { for (int j = ptr[i]; j < ptr[i + 1]; j++) { index[j] = 0; value[j] = 0.0; } }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
} } void CGOpenMP::MatrixELLOpenMP::allocateLength(int rows) { MatrixELL::allocateLength(rows); <LOOP-START>for (int i = 0; i < rows; i++) { length[i] = 0; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
} } void CGOpenMP::MatrixELLOpenMP::allocateIndexAndData() { MatrixELL::allocateIndexAndData(); <LOOP-START>for (int i = 0; i < N; i++) { for (int j = 0; j < length[i]; j++) { int k = j * N + i; index[k] = 0; data[k] = 0.0; } }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
ata[k] = 0.0; } } } void CGOpenMP::JacobiOpenMP::allocateC(int N) { Jacobi::allocateC(N); <LOOP-START>for (int i = 0; i < N; i++) { C[i] = 0.0; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
ew floatType[N]); if (preconditioner != PreconditionerNone) { z.reset(new floatType[N]); } <LOOP-START>for (int i = 0; i < N; i++) { p[i] = 0.0; q[i] = 0.0; r[i] = 0.0; if (preconditioner != PreconditionerNone) { z[i] = 0.0; } }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
econditionerNone) { z[i] = 0.0; } } } void CGOpenMP::allocateK() { CG::allocateK(); <LOOP-START>for (int i = 0; i < N; i++) { k[i] = 0.0; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
r (int i = 0; i < N; i++) { k[i] = 0.0; } } void CGOpenMP::allocateX() { CG::allocateX(); <LOOP-START>for (int i = 0; i < N; i++) { x[i] = 0.0; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
ector _dst, Vector _src) { floatType *dst = getVector(_dst); floatType *src = getVector(_src); <LOOP-START>for (int i = 0; i < N; i++) { dst[i] = src[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
N; i++) { dst[i] = src[i]; } } void CGOpenMP::matvecKernelCRS(floatType *x, floatType *y) { <LOOP-START>for (int i = 0; i < N; i++) { floatType tmp = 0; for (int j = matrixCRS->ptr[i]; j < matrixCRS->ptr[i + 1]; j++) { tmp += matrixCRS->value[j] * x[matrixCRS->index[j]]; } y[i] = tmp; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
ndex[j]]; } y[i] = tmp; } } void CGOpenMP::matvecKernelELL(floatType *x, floatType *y) { <LOOP-START>for (int i = 0; i < N; i++) { floatType tmp = 0; for (int j = 0; j < matrixELL->length[i]; j++) { int k = j * N + i; tmp += matrixELL->data[k] * x[matrixELL->index[k]]; } y[i] = tmp; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
oatType a, Vector _x, Vector _y) { floatType *x = getVector(_x); floatType *y = getVector(_y); <LOOP-START>for (int i = 0; i < N; i++) { y[i] += a * x[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
ctor _x, floatType a, Vector _y) { floatType *x = getVector(_x); floatType *y = getVector(_y); <LOOP-START>for (int i = 0; i < N; i++) { y[i] = x[i] + a * y[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for reduction(+:res)
100
Vector _b) { floatType res = 0; floatType *a = getVector(_a); floatType *b = getVector(_b); <LOOP-START>for (int i = 0; i < N; i++) { res += a[i] * b[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:res)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/hahnjo/CGxx/openmp/CGOpenMP.cpp
#pragma omp parallel for
100
} return res; } void CGOpenMP::applyPreconditionerKernelJacobi(floatType *x, floatType *y) { <LOOP-START>for (int i = 0; i < N; i++) { y[i] = jacobi->C[i] * x[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/jimouris/parallel-convolution/mpi_omp/mpi_omp_conv.c
#pragma omp parallel for shared(src, dst) schedule(static) collapse(3)
100
col_to, int width, int height, float** h, color_t imageType) { int i, j; if (imageType == GREY) { <LOOP-START>for (i = row_from ; i <= row_to ; i++) for (j = col_from ; j <= col_to ; j++) convolute_grey(src, dst, i, j, width+2, height, h); } else if (imageType == RGB) { #pragma omp parallel for shared(src, dst) schedule(static) collapse(3) for (i = row_from ; i <= row_to ; i++) for (j = col_from ; j <= col_to ; j++) convolute_rgb(src, dst, i, j*3, width*3+6, height, h); }<LOOP-END> <OMP-START>#pragma omp parallel for shared(src, dst) schedule(static) collapse(3)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/jimouris/parallel-convolution/mpi_omp/mpi_omp_conv.c
#pragma omp parallel for shared(src, dst) schedule(static) collapse(3)
100
l_to ; j++) convolute_grey(src, dst, i, j, width+2, height, h); } else if (imageType == RGB) { <LOOP-START>for (i = row_from ; i <= row_to ; i++) for (j = col_from ; j <= col_to ; j++) convolute_rgb(src, dst, i, j*3, width*3+6, height, h); } } void convolute_grey(uint8_t *src, uint8_t *dst, int x, int y, int width, int height, float** h) { int i, j, k, l; float val = 0; for (i = x-1, k = 0 ; i <= x+1 ; i++, k++) for (j = y-1, l = 0 ; j <= y+1 ; j++, l++) val += src[width * i + j] * h[k][l]; dst[width * x + y] = val; }<LOOP-END> <OMP-START>#pragma omp parallel for shared(src, dst) schedule(static) collapse(3)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/MetalheadKen/RayTracingInOneWeekend/main_opt.c
#pragma omp parallel for reduction(+:point_x, point_y, point_z) default(none) firstprivate(i, j, nx, ny, ns, cam, world) schedule(dynamic, 1)
100
int_y = 0.0, point_z = 0.0; /* Sampling ns times per pixel area */ <LOOP-START>for (int s = 0; s < ns; s++) { /* Centered at the center point of the pixel, the pixel outward distance is (0.0, 1.0] */ float u = (float) (i + drand48()) / (float) nx; float v = (float) (j + drand48()) / (float) ny; /* Obtain the color value of the random sampling point in this pixel area */ Ray r = cam.get_ray(cam, u, v); // Vector p = r.point_at_parameter(r, 2.0); /* Accumulate the color values of all ns random sample points of this point area */ Vector temp = color(r, &world, 0); point_x += temp.point.x; point_y += temp.point.y; point_z += temp.point.z; }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:point_x, point_y, point_z) default(none) firstprivate(i, j, nx, ny, ns, cam, world) schedule(dynamic, 1)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/PetropoulakisPanagiotis/parallel-convolution/convolution/parallel_convolution.c
#pragma omp parallel for num_threads(NUM_THREADS) collapse(2) schedule(static, (my_width - 2) * (my_height - 2) / NUM_THREADS)
100
r pixels first */ ////////////////////////////////// #ifdef ENABLE_OPEN_MP <LOOP-START>for(i = 2; i < my_height; i++){ // For every inner row for(j = 2 * mult; j < my_width; j++){ // and every inner column /* Compute the new value of the current pixel */ (*im_after)[i][j] = (int)((*im_before)[i][j] * my_args.filter[1][1] + (*im_before)[i - 1][j] * my_args.filter[0][1] + (*im_before)[i - 1][j + mult] * my_args.filter[0][2] + (*im_before)[i][j + mult] * my_args.filter[1][2] + (*im_before)[i + 1][j + mult] * my_args.filter[2][2] + (*im_before)[i + 1][j] * my_args.filter[2][1] + (*im_before)[i + 1][j - mult] * my_args.filter[2][0] + (*im_before)[i][j - mult] * my_args.filter[1][0] + (*im_before)[i - 1][j - mult] * my_args.filter[0][0]); /* Truncated unexpected values */ if((*im_after)[i][j] < 0) (*im_after)[i][j] = 0; else if((*im_after)[i][j] > 255) (*im_after)[i][j] = 255; } // End for }<LOOP-END> <OMP-START>#pragma omp parallel for num_threads(NUM_THREADS) collapse(2) schedule(static, (my_width - 2) * (my_height - 2) / NUM_THREADS)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/reproducers/TBB/tbb_mixed_omp.cpp
#pragma omp parallel for
100
nit(4); // RUN SEQUENTAIL FOR std::cerr << "Running OMP for..."; gettimeofday(&sst, NULL); <LOOP-START>for(int i=0; i <nb_cells; ++i) { tasks2[i].get(); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/reproducers/MPI/main.c
#pragma omp parallel for
100
MM_WORLD, &rank); MPI_Comm_rank (MPI_COMM_WORLD, &local_rank); MPI_Barrier (MPI_COMM_WORLD); <LOOP-START>for (i = 0; i < 10; i++) { printf ("P %d i=%d, rank=(%d/%d)\n", rank, i, omp_get_thread_num (), omp_get_num_threads ()); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/pr66429.c
#pragma omp parallel for simd schedule(static, 32) collapse(3)
100
d noreturn (void) { for (;;); } __attribute__ ((noinline, noclone)) void foo (int n) { int i; <LOOP-START>for (i = 0; i < 10; i++) for (int j = n; j < 8; j++) for (long k = -10; k < 10; k++) { b[i][j][k] += 16; noreturn (); b[i][j][k] -= 32; }<LOOP-END> <OMP-START>#pragma omp parallel for simd schedule(static, 32) collapse(3)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/pr66429.c
#pragma omp parallel for simd schedule(static, 32)
100
turn (); b[i][j][k] -= 32; } } __attribute__ ((noinline, noclone)) void bar (void) { int i; <LOOP-START>for (i = 0; i < 10; i++) { b[0][0][i] += 16; noreturn (); b[0][0][i] -= 32; }<LOOP-END> <OMP-START>#pragma omp parallel for simd schedule(static, 32)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/sink-1.c
#pragma omp parallel for ordered(2)
100
-Wunknown-pragmas -Werror" } */ extern void bark (void); int i,j,k; int array[555]; int main() { <LOOP-START>for (i=0; i < 100; ++i) for (j=0; j < 100; ++j) { /* OUT variant does not apply to ORDERED construct. */ #pragma omp ordered depend(out:i) /* { dg-error "invalid depend kind" } */ /* depend(sink...) is allowed without an offset. */ #pragma omp ordered depend(sink:i,j-1) #pragma omp ordered depend(sink:i-1,j+2) bark (); }<LOOP-END> <OMP-START>#pragma omp parallel for ordered(2)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/sink-1.c
#pragma omp parallel for ordered(2)
100
); #pragma omp ordered depend(source) /* { dg-error "'depend' clause must be closely nested" } */ <LOOP-START>for (i=0; i < 100; ++i) for (j=0; j < 100; ++j) { /* Multiple depend(source) allowed. */ #pragma omp ordered depend(source) #pragma omp ordered depend(source) }<LOOP-END> <OMP-START>#pragma omp parallel for ordered(2)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/sink-1.c
#pragma omp parallel for ordered(2)
100
source) allowed. */ #pragma omp ordered depend(source) #pragma omp ordered depend(source) } <LOOP-START>for (i=0; i < 100; ++i) for (j=0; j < 100; ++j) { #pragma omp ordered depend(sink:i-2,j-2,k+2) /* { dg-error "does not match number of iteration var" } */ bark(); }<LOOP-END> <OMP-START>#pragma omp parallel for ordered(2)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/sink-1.c
#pragma omp parallel for ordered(2)
100
end(sink:i-2,j-2,k+2) /* { dg-error "does not match number of iteration var" } */ bark(); } <LOOP-START>for (i=0; i < 100; ++i) for (j=0; j < 100; ++j) { #pragma omp ordered depend(sink:i-2) /* { dg-error "does not match number of iteration variables" } */ bark(); }<LOOP-END> <OMP-START>#pragma omp parallel for ordered(2)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/sink-1.c
#pragma omp parallel for ordered(2)
100
epend(sink:i-2) /* { dg-error "does not match number of iteration variables" } */ bark(); } <LOOP-START>for (i=0; i < 100; ++i) for (j=0; j < 100; ++j) { #pragma omp ordered depend(sink:k,i) /* { dg-error "is not an iteration" } */ bark(); }<LOOP-END> <OMP-START>#pragma omp parallel for ordered(2)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/sink-1.c
#pragma omp parallel for ordered(2)
100
,k+1) bar (i, j, k); #pragma omp ordered depend(source) } } } int baz () { int i, j; <LOOP-START>for (i=0; i < 100; ++i) for (j=0; j < 100; ++j) { #pragma omp ordered depend(sink:i-1,j-3) bar (i, j, 0); #pragma omp ordered depend(source) }<LOOP-END> <OMP-START>#pragma omp parallel for ordered(2)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-1.c
#pragma omp parallel for
100
(a) #pragma omp for for (i = 0; i < 10; i++) if (b) /* { dg-warning "ambiguous" } */ <LOOP-START>for (j = 0; j < 10; j++) if (c) bar (); else baz (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-1.c
#pragma omp parallel for
100
* { dg-warning "ambiguous" } */ #pragma omp taskloop for (i = 0; i < 10; i++) if (b) <LOOP-START>for (j = 0; j < 10; j++) if (c) bar (); else baz (); else bar (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-1.c
#pragma omp parallel for
100
; else baz (); if (a) /* { dg-warning "ambiguous" } */ for (i = 0; i < 10; i++) <LOOP-START>for (j = 0; j < 10; j++) if (b) bar (); else baz (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-1.c
#pragma omp parallel for simd
100
); else baz (); if (a) /* { dg-warning "ambiguous" } */ for (i = 0; i < 10; i++) <LOOP-START>for (j = 0; j < 10; j++) if (b) bar (); else baz (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for simd<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-1.c
#pragma omp parallel for
100
omp parallel if (b) bar (); else baz (); } if (a) for (i = 0; i < 10; i++) <LOOP-START>for (j = 0; j < 10; j++) { if (b) bar (); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-1.c
#pragma omp parallel for simd
100
; j++) { if (b) bar (); } else baz (); if (a) for (i = 0; i < 10; i++) <LOOP-START>for (j = 0; j < 10; j++) { if (b) bar (); }<LOOP-END> <OMP-START>#pragma omp parallel for simd<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/pr59152.c
#pragma omp parallel for schedule(static, 32) collapse(3)
100
s "-fopenmp -fipa-pure-const" } */ extern int b[]; void foo (void) { unsigned long v1, v2, v3; <LOOP-START>for (v1 = 0; v1 < 20; v1 += 2) for (v2 = __LONG_MAX__; v2 > __LONG_MAX__ - 30; v2 -= 3) for (v3 = 10; v3 > 0; v3--) #pragma omp atomic b[v3]++; } void bar (void) { unsigned long v1, v2, v3; #pragma omp parallel for schedule(static) collapse(3) for (v1 = 0; v1 < 20; v1 += 2) for (v2 = __LONG_MAX__; v2 > __LONG_MAX__ - 30; v2 -= 3) for (v3 = 10; v3 > 0; v3--) #pragma omp atomic b[v3]++; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static, 32) collapse(3)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/pr59152.c
#pragma omp parallel for schedule(static) collapse(3)
100
3 > 0; v3--) #pragma omp atomic b[v3]++; } void bar (void) { unsigned long v1, v2, v3; <LOOP-START>for (v1 = 0; v1 < 20; v1 += 2) for (v2 = __LONG_MAX__; v2 > __LONG_MAX__ - 30; v2 -= 3) for (v3 = 10; v3 > 0; v3--) #pragma omp atomic b[v3]++; } void baz (void) { unsigned long v1, v2, v3; #pragma omp parallel for schedule(runtime) collapse(3) for (v1 = 0; v1 < 20; v1 += 2) for (v2 = __LONG_MAX__; v2 > __LONG_MAX__ - 30; v2 -= 3) for (v3 = 10; v3 > 0; v3--) #pragma omp atomic b[v3]++; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static) collapse(3)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/pr67521.c
#pragma omp parallel for simd
100
67521 */ /* { dg-do compile } */ /* { dg-options "-fopenmp" } */ void foo (int x) { int i = 0; <LOOP-START>for (i = (i & x); i < 10; i = i + 2) /* { dg-error "initializer expression refers to iteration variable" }<LOOP-END> <OMP-START>#pragma omp parallel for simd<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/pr67521.c
#pragma omp parallel for simd
100
= i + 2) /* { dg-error "initializer expression refers to iteration variable" } */ ; i = 0; <LOOP-START>for (i = 0; i < (i & x) + 10; i = i + 2) /* { dg-error "condition expression refers to iteration variable" }<LOOP-END> <OMP-START>#pragma omp parallel for simd<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/pr67521.c
#pragma omp parallel for simd
100
i = i + 2) /* { dg-error "condition expression refers to iteration variable" } */ ; i = 0; <LOOP-START>for (i = 0; i < 10; i = i + ((i & x) + 2)) /* { dg-error "increment expression refers to iteration variable" }<LOOP-END> <OMP-START>#pragma omp parallel for simd<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/pr56883.c
#pragma omp parallel for
100
83 */ /* { dg-do compile } /* { dg-options "-O2 -fopenmp" } */ void f1 (int ***x) { int i, j, k; <LOOP-START>for (i = 0; i < 10; ++i) { #pragma omp parallel shared(j) #pragma omp for for (j = 0; j < 10; ++j) { #pragma omp parallel for for (k = 0; k < 10; ++k) x[i][j][k] = k; } }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/pr56883.c
#pragma omp parallel for
100
i) { #pragma omp parallel shared(j) #pragma omp for for (j = 0; j < 10; ++j) { <LOOP-START>for (k = 0; k < 10; ++k) x[i][j][k] = k; } } } void f2 (int ***x) { int i, j, k; #pragma omp parallel for schedule(static,1) for (i = 0; i < 10; ++i) { #pragma omp parallel shared(j) #pragma omp for schedule(static,1) for (j = 0; j < 10; ++j) { #pragma omp parallel for schedule(static,1) for (k = 0; k < 10; ++k) x[i][j][k] = k; } } }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/pr56883.c
#pragma omp parallel for schedule(static,1)
100
for (k = 0; k < 10; ++k) x[i][j][k] = k; } } } void f2 (int ***x) { int i, j, k; <LOOP-START>for (i = 0; i < 10; ++i) { #pragma omp parallel shared(j) #pragma omp for schedule(static,1) for (j = 0; j < 10; ++j) { #pragma omp parallel for schedule(static,1) for (k = 0; k < 10; ++k) x[i][j][k] = k; } }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static,1)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/pr56883.c
#pragma omp parallel for schedule(static,1)
100
a omp parallel shared(j) #pragma omp for schedule(static,1) for (j = 0; j < 10; ++j) { <LOOP-START>for (k = 0; k < 10; ++k) x[i][j][k] = k; } } } void f3 (int ***x) { int i, j, k; #pragma omp parallel for schedule(runtime) for (i = 0; i < 10; ++i) { #pragma omp parallel shared(j) #pragma omp for schedule(runtime) for (j = 0; j < 10; ++j) { #pragma omp parallel for schedule(runtime) for (k = 0; k < 10; ++k) x[i][j][k] = k; } } }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static,1)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/pr56883.c
#pragma omp parallel for schedule(runtime)
100
for (k = 0; k < 10; ++k) x[i][j][k] = k; } } } void f3 (int ***x) { int i, j, k; <LOOP-START>for (i = 0; i < 10; ++i) { #pragma omp parallel shared(j) #pragma omp for schedule(runtime) for (j = 0; j < 10; ++j) { #pragma omp parallel for schedule(runtime) for (k = 0; k < 10; ++k) x[i][j][k] = k; } }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(runtime)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-4.c
#pragma omp parallel for
100
distribute parallel for for (i = 0; i < 10; i++) if (b) /* { dg-warning "ambiguous" } */ <LOOP-START>for (j = 0; j < 10; j++) if (c) bar (); else baz (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-4.c
#pragma omp parallel for
100
distribute parallel for for (i = 0; i < 10; i++) if (b) /* { dg-warning "ambiguous" } */ <LOOP-START>for (j = 0; j < 10; j++) if (c) bar (); else baz (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-4.c
#pragma omp parallel for
100
distribute parallel for for (i = 0; i < 10; i++) if (b) /* { dg-warning "ambiguous" } */ <LOOP-START>for (j = 0; j < 10; j++) if (c) bar (); else baz (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-3.c
#pragma omp parallel for
100
(a) #pragma omp for for (i = 0; i < 10; i++) if (b) /* { dg-warning "ambiguous" } */ <LOOP-START>for (j = 0; j < 10; j++) if (c) bar (); else baz (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-3.c
#pragma omp parallel for
100
* { dg-warning "ambiguous" } */ #pragma omp taskloop for (i = 0; i < 10; i++) if (b) <LOOP-START>for (j = 0; j < 10; j++) if (c) bar (); else baz (); else bar (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-3.c
#pragma omp parallel for
100
; else baz (); if (a) /* { dg-warning "ambiguous" } */ for (i = 0; i < 10; i++) <LOOP-START>for (j = 0; j < 10; j++) if (b) bar (); else baz (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-3.c
#pragma omp parallel for simd
100
); else baz (); if (a) /* { dg-warning "ambiguous" } */ for (i = 0; i < 10; i++) <LOOP-START>for (j = 0; j < 10; j++) if (b) bar (); else baz (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for simd<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-3.c
#pragma omp parallel for
100
omp parallel if (b) bar (); else baz (); } if (a) for (i = 0; i < 10; i++) <LOOP-START>for (j = 0; j < 10; j++) { if (b) bar (); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-3.c
#pragma omp parallel for simd
100
; j++) { if (b) bar (); } else baz (); if (a) for (i = 0; i < 10; i++) <LOOP-START>for (j = 0; j < 10; j++) { if (b) bar (); }<LOOP-END> <OMP-START>#pragma omp parallel for simd<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/pr58257.c
#pragma omp parallel for collapse(2)
100
pile } */ /* { dg-options "-O2 -fopenmp -Wall" } */ int foo (int n) { int a[10][10]; int x, y; <LOOP-START>for (x = 0; x < n; x++) /* { dg-bogus "may be used uninitialized in this function" }<LOOP-END> <OMP-START>#pragma omp parallel for collapse(2) <OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/ordered-3.c
#pragma omp parallel for simd ordered(1)
100
r "clause must be closely nested inside a loop with .ordered. clause with a parameter" } */ } <LOOP-START>for (i = 0; i < 64; i++) { #pragma omp ordered depend(sink: i - 1) /* { dg-error "clause must be closely nested inside a loop with .ordered. clause with a parameter" } */ #pragma omp ordered depend(source) /* { dg-error "clause must be closely nested inside a loop with .ordered. clause with a parameter" } */ }<LOOP-END> <OMP-START>#pragma omp parallel for simd ordered(1) <OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/ordered-3.c
#pragma omp parallel for ordered
100
r "clause must be closely nested inside a loop with .ordered. clause with a parameter" } */ } <LOOP-START>for (i = 0; i < 64; i++) { #pragma omp ordered depend(sink: i - 1) /* { dg-error "clause must be closely nested inside a loop with .ordered. clause with a parameter" } */ #pragma omp ordered depend(source) /* { dg-error "clause must be closely nested inside a loop with .ordered. clause with a parameter" } */ }<LOOP-END> <OMP-START>#pragma omp parallel for ordered<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/ordered-3.c
#pragma omp parallel for
100
r "clause must be closely nested inside a loop with .ordered. clause with a parameter" } */ } <LOOP-START>for (i = 0; i < 64; i++) { #pragma omp ordered depend(sink: i - 1) /* { dg-error "clause must be closely nested inside a loop with .ordered. clause with a parameter" } */ #pragma omp ordered depend(source) /* { dg-error "clause must be closely nested inside a loop with .ordered. clause with a parameter" } */ }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/sink-4.c
#pragma omp parallel for ordered(1)
100
ly. */ typedef struct { char stuff[400]; } foo; void funk (foo *begin, foo *end) { foo *p; <LOOP-START>for (p=end; p > begin; p--) { #pragma omp ordered depend(sink:p+1) void bar (); bar(); #pragma omp ordered depend(source) }<LOOP-END> <OMP-START>#pragma omp parallel for ordered(1)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/gridify-3.c
#pragma omp parallel for collapse(2)
100
E]; float Bs[BLOCK_SIZE][BLOCK_SIZE]; float Cs[BLOCK_SIZE][BLOCK_SIZE]; int C_row, C_col; <LOOP-START>for (int row=0 ; row < BLOCK_SIZE ; row++) for (int col=0 ; col < BLOCK_SIZE ; col++) { Cs[row][col] = 0.0; }<LOOP-END> <OMP-START>#pragma omp parallel for collapse(2)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/gridify-3.c
#pragma omp parallel for collapse(2)
100
row][col] = 0.0; } for (int kblock = 0; kblock < K ; kblock += BLOCK_SIZE ) { <LOOP-START>for (int row=0 ; row < BLOCK_SIZE ; row++) for (int col=0 ; col < BLOCK_SIZE ; col++) { C_row = C_row_start + row; C_col = C_col_start + col; if ((C_row < M) && (kblock + col < K)) As[row][col] = A[(C_row*LDA)+ kblock + col]; else As[row][col] = 0; if ((kblock + row < K) && C_col < N) Bs[row][col] = B[((kblock+row)*LDB)+ C_col]; else Bs[row][col] = 0; }<LOOP-END> <OMP-START>#pragma omp parallel for collapse(2)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/gridify-3.c
#pragma omp parallel for collapse(2)
100
l < N) Bs[row][col] = B[((kblock+row)*LDB)+ C_col]; else Bs[row][col] = 0; } <LOOP-START>for (int row=0 ; row < BLOCK_SIZE ; row++) for (int col=0 ; col < BLOCK_SIZE ; col++) { for (int e = 0; e < BLOCK_SIZE; ++e) Cs[row][col] += As[row][e] * Bs[e][col]; }<LOOP-END> <OMP-START>#pragma omp parallel for collapse(2)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/gridify-3.c
#pragma omp parallel for collapse(2)
100
Cs[row][col] += As[row][e] * Bs[e][col]; } } /* End for kblock .. */ <LOOP-START>for (int row=0 ; row < BLOCK_SIZE ; row++) for (int col=0 ; col < BLOCK_SIZE ; col++) { C_row = C_row_start + row; C_col = C_col_start + col; if ((C_row < M) && (C_col < N)) C[(C_row*LDC)+C_col] = alpha*Cs[row][col] + beta*C[(C_row*LDC)+C_col]; }<LOOP-END> <OMP-START>#pragma omp parallel for collapse(2)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/sink-2.c
#pragma omp parallel for ordered(1)
100
/* { dg-do compile } */ void bar (int *); void foo () { int i,j; <LOOP-START>for (i=0; i < 100; ++i) { #pragma omp ordered depend(sink:i-1) bar(&i); #pragma omp ordered depend(source) }<LOOP-END> <OMP-START>#pragma omp parallel for ordered(1)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/schedule-simd-1.c
#pragma omp parallel for simd schedule (simd:static)
100
t { x86_64-*-* i?86-*-* } } } */ #define N 1024 int a[N], b[N], c[N]; void f1 (void) { int i; <LOOP-START>for (i = 0; i < N; i++) a[i] = b[i] + c[i]; } void f2 (void) { int i; #pragma omp parallel for simd schedule (simd: static, 7) for (i = 0; i < N; i++) a[i] = b[i] + c[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for simd schedule (simd:static)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/schedule-simd-1.c
#pragma omp parallel for simd schedule (simd: static, 7)
100
dule (simd:static) for (i = 0; i < N; i++) a[i] = b[i] + c[i]; } void f2 (void) { int i; <LOOP-START>for (i = 0; i < N; i++) a[i] = b[i] + c[i]; } void f3 (void) { int i; #pragma omp parallel for simd schedule (simd : dynamic, 7) for (i = 0; i < N; i++) a[i] = b[i] + c[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for simd schedule (simd: static, 7)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/schedule-simd-1.c
#pragma omp parallel for simd schedule (simd : dynamic, 7)
100
(simd: static, 7) for (i = 0; i < N; i++) a[i] = b[i] + c[i]; } void f3 (void) { int i; <LOOP-START>for (i = 0; i < N; i++) a[i] = b[i] + c[i]; } void f4 (void) { int i; #pragma omp parallel for simd schedule ( simd:runtime) for (i = 0; i < N; i++) a[i] = b[i] + c[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for simd schedule (simd : dynamic, 7)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/schedule-simd-1.c
#pragma omp parallel for simd schedule ( simd:runtime)
100
simd : dynamic, 7) for (i = 0; i < N; i++) a[i] = b[i] + c[i]; } void f4 (void) { int i; <LOOP-START>for (i = 0; i < N; i++) a[i] = b[i] + c[i]; } void f5 (void) { int i; #pragma omp parallel for simd schedule (simd:auto) for (i = 0; i < N; i++) a[i] = b[i] + c[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for simd schedule ( simd:runtime)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-2.c
#pragma omp parallel for
100
distribute parallel for for (i = 0; i < 10; i++) if (b) /* { dg-warning "ambiguous" } */ <LOOP-START>for (j = 0; j < 10; j++) if (c) bar (); else baz (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-2.c
#pragma omp parallel for
100
distribute parallel for for (i = 0; i < 10; i++) if (b) /* { dg-warning "ambiguous" } */ <LOOP-START>for (j = 0; j < 10; j++) if (c) bar (); else baz (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/Wparentheses-2.c
#pragma omp parallel for
100
distribute parallel for for (i = 0; i < 10; i++) if (b) /* { dg-warning "ambiguous" } */ <LOOP-START>for (j = 0; j < 10; j++) if (c) bar (); else baz (); if (a) /* { dg-warning "ambiguous" }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/clauses-1.c
#pragma omp parallel for \
100
pse(1) nowait \ safelen(8) simdlen(4) aligned(q: 32) for (int i = 0; i < 64; i++) ll++; <LOOP-START>private (p) firstprivate (f) if (parallel: i2) default(shared) shared(s) copyin(t) reduction(+:r) num_threads (nth) proc_bind(spread) \ lastprivate (l) linear (ll:1) ordered schedule(static, 4) collapse(1) for (int i = 0; i < 64; i++) ll++; #pragma omp parallel for simd \ private (p) firstprivate (f) if (parallel: i2) default(shared) shared(s) copyin(t) reduction(+:r) num_threads (nth) proc_bind(spread) \ lastprivate (l) linear (ll:1) schedule(static, 4) collapse(1) \ safelen(8) simdlen(4) aligned(q: 32) for (int i = 0; i < 64; i++) ll++; #pragma omp parallel sections \ private (p) firstprivate (f) if (parallel: i2) default(shared) shared(s) copyin(t) reduction(+:r) num_threads (nth) proc_bind(spread) \ lastprivate (l) { #pragma omp section {} #pragma omp section {} }<LOOP-END> <OMP-START>#pragma omp parallel for \<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/clauses-1.c
#pragma omp parallel for simd \
100
l) linear (ll:1) ordered schedule(static, 4) collapse(1) for (int i = 0; i < 64; i++) ll++; <LOOP-START>private (p) firstprivate (f) if (parallel: i2) default(shared) shared(s) copyin(t) reduction(+:r) num_threads (nth) proc_bind(spread) \ lastprivate (l) linear (ll:1) schedule(static, 4) collapse(1) \ safelen(8) simdlen(4) aligned(q: 32) for (int i = 0; i < 64; i++) ll++; #pragma omp parallel sections \ private (p) firstprivate (f) if (parallel: i2) default(shared) shared(s) copyin(t) reduction(+:r) num_threads (nth) proc_bind(spread) \ lastprivate (l) { #pragma omp section {} #pragma omp section {} }<LOOP-END> <OMP-START>#pragma omp parallel for simd \<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/if-2.c
#pragma omp parallel for simd if (target update: a)
100
) /* { dg-error "expected .parallel. .if. clause modifier rather than .target update." } */ ; <LOOP-START>for (i = 0; i < 16; i++) ; #pragma omp task if (task) ; #pragma omp task if (task: task) ; #pragma omp task if (parallel: a) /* { dg-error "expected .task. .if. clause modifier rather than .parallel." }<LOOP-END> <OMP-START>#pragma omp parallel for simd if (target update: a) <OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/c-c++-common/gomp/sink-3.c
#pragma omp parallel for ordered(1)
100
multiple undeclared sink variables gracefully. */ void bar (int *); void foo () { int i,j; <LOOP-START>for (i=0; i < 100; ++i) { #pragma omp ordered depend(sink:poo-1,paa+1) /* { dg-error "poo.*declared.*paa.*declared" } */ bar(&i); #pragma omp ordered depend(source) }<LOOP-END> <OMP-START>#pragma omp parallel for ordered(1)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/g++.dg/warn/Wduplicated-branches3.C
#pragma omp parallel for
100
openmp" } // { dg-require-effective-target fopenmp } template<int N> void foo() { if (N > 0) { <LOOP-START>for (int i = 0; i < 10; ++i) ; } } void bar() { foo<0>(); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/g++.dg/gomp/pr29965-4.C
#pragma omp parallel for schedule (dynamic)
100
agma omp for schedule (dynamic) for (i = 0; i < 2834; i++) baz (); } void foo2 () { int i; <LOOP-START>for (i = 0; i < 2834; i++) for (;;) ; } void bar2 () { int i; #pragma omp parallel for schedule (dynamic) for (i = 0; i < 2834; i++) baz (); }<LOOP-END> <OMP-START>#pragma omp parallel for schedule (dynamic)<OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/g++.dg/gomp/pr81154.C
#pragma omp parallel for lastprivate (foo)
100
} ; #pragma omp parallel firstprivate (foo) // { dg-error "is not a variable in clause" } ; <LOOP-START>for (T i = 0; i < n; i++) ; #pragma omp parallel for linear (foo) // { dg-error "is not a variable in clause" }<LOOP-END> <OMP-START>#pragma omp parallel for lastprivate (foo) <OMP-END>
/ascldap/users/netienn/Research/HPC-Coder/data/ClonedRepos/cea-hpc/pcvs-benchmarks/compilers/gcc/g++.dg/gomp/pr81154.C
#pragma omp parallel for linear (foo)
100
stprivate (foo) // { dg-error "is not a variable in clause" } for (T i = 0; i < n; i++) ; <LOOP-START>for (T i = 0; i < n; i++) ; #pragma omp parallel reduction (+:foo) // { dg-error "is not a variable in clause" }<LOOP-END> <OMP-START>#pragma omp parallel for linear (foo) <OMP-END>