filename
stringlengths
19
182
omp_pragma_line
stringlengths
24
416
context_chars
int64
100
100
text
stringlengths
152
177k
vlkale/lw-sched/share/ukernels/matVec-mpi.c
#pragma omp parallel for num_threads(16)
100
o, except that entry J_ONE will be 1. Pick any value of J_ONE between 1 and M. */ j_one = 17; <LOOP-START>for ( i = 0; i < n; i++ ) { x[i] = sqrt ( 2.0 / ( double ) ( n + 1 ) ) * sin ( ( double ) ( ( i + 1 ) * j_one ) * pi / ( double ) ( n + 1 ) ); printf("thread %d doing iteration %d \n"...
vlkale/lw-sched/share/ukernels/matVec-mpi.c
#pragma omp parallel for
100
printf ( " Process %d shutting down.\n", my_id ); break; } ans = 0.0; <LOOP-START>for ( i = 0; i < n; i++ ) { ans = ans + a_row[i] * x[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END>
garciparedes/cc-examples/parallel/openmp/uva/proof3.c
#pragma omp parallel for firstprivate(a) lastprivate(b)
100
h> #include<omp.h> int main() { omp_set_num_threads(4); int i; int a = 0; int b = 5; <LOOP-START>for (i=0; i<4; i++) { b = a + 1; a = b; }<LOOP-END> <OMP-START>#pragma omp parallel for firstprivate(a) lastprivate(b)<OMP-END>
garciparedes/cc-examples/parallel/openmp/uva/proof2.c
#pragma omp parallel for
100
lib.h> #include<omp.h> int main() { omp_set_num_threads(4); int i, v[4]; int a = 2; <LOOP-START>for (i=0; i<4; i++) v[i] = i; #pragma omp parallel for for (i=0; i<4; i++) { v[i] = a + v[i]; a = a + 1; }<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END>
garciparedes/cc-examples/parallel/openmp/uva/proof2.c
#pragma omp parallel for
100
int i, v[4]; int a = 2; #pragma omp parallel for for (i=0; i<4; i++) v[i] = i; <LOOP-START>for (i=0; i<4; i++) { v[i] = a + v[i]; a = a + 1; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
mcanalesmayo/jacobi-mpi/jacobi_par.c
#pragma omp parallel for
100
not ensured to be contiguous rows = (double*) malloc(sizeof(double)*subprob_size*subprob_size); <LOOP-START>for (i=0;i<subprob_size;i++) { a[i] = &rows[i*subprob_size]; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
mcanalesmayo/jacobi-mpi/jacobi_par.c
#pragma omp parallel for collapse(2)
100
n_num, int row_num) { int i, j; // Initialize matrix // First time all values are INITIAL_GRID <LOOP-START>for(i=0; i<subprob_size; i++) { for(j=0; j<subprob_size; j++) a[i][j] = INITIAL_GRID; }<LOOP-END> <OMP-START>#pragma omp parallel for collapse(2)<OMP-END>
mcanalesmayo/jacobi-mpi/jacobi_par.c
#pragma omp parallel for
100
in the first column if (column_num == 0){ // I'm in the first row column if (row_num == 0){ <LOOP-START>for(i=0; i<subprob_size; i++){ rlcbuff[i] = INITIAL_GRID; rfcbuff[i] = BC_HOT; rlrbuff[i] = INITIAL_GRID; rfrbuff[i] = BC_HOT; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
mcanalesmayo/jacobi-mpi/jacobi_par.c
#pragma omp parallel for
100
i] = BC_HOT; } } // I'm in the last row else if(row_num == ((int) sqrt(n_subprobs))-1){ <LOOP-START>for(i=0; i<subprob_size; i++){ rlcbuff[i] = INITIAL_GRID; rfcbuff[i] = BC_HOT; rlrbuff[i] = BC_COLD; rfrbuff[i] = INITIAL_GRID; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
mcanalesmayo/jacobi-mpi/jacobi_par.c
#pragma omp parallel for
100
lse if(column_num == ((int) sqrt(n_subprobs))-1){ // I'm in the first row if (row_num == 0){ <LOOP-START>for(i=0; i<subprob_size; i++){ rlcbuff[i] = BC_HOT; rfcbuff[i] = INITIAL_GRID; rlrbuff[i] = INITIAL_GRID; rfrbuff[i] = BC_HOT; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
mcanalesmayo/jacobi-mpi/jacobi_par.c
#pragma omp parallel for
100
i] = BC_HOT; } } // I'm in the last row else if(row_num == ((int) sqrt(n_subprobs))-1){ <LOOP-START>for(i=0; i<subprob_size; i++){ rlcbuff[i] = BC_HOT; rfcbuff[i] = INITIAL_GRID; rlrbuff[i] = BC_COLD; rfrbuff[i] = INITIAL_GRID; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
mcanalesmayo/jacobi-mpi/jacobi_par.c
#pragma omp parallel for
100
f (column_num != ((int) sqrt(n_subprobs))-1){ // send the last column of my subproblem matrix <LOOP-START>for(i=0; i<subprob_size; i++) slcbuff[i] = a[i][subprob_size-1]; MPI_Isend(slcbuff, subprob_size, MPI_DOUBLE, my_rank+1, iteration, MPI_COMM_WORLD, slcreq); // post receive last column + 1 MPI_Irecv...
mcanalesmayo/jacobi-mpi/jacobi_par.c
#pragma omp parallel for
100
in the first column if (column_num != 0){ // send the first column of my subproblem matrix <LOOP-START>for(i=0; i<subprob_size; i++) sfcbuff[i] = a[i][0]; MPI_Isend(sfcbuff, subprob_size, MPI_DOUBLE, my_rank-1, iteration, MPI_COMM_WORLD, sfcreq); // post receive first column - 1 MPI_Irecv(rfcbuff, su...
mcanalesmayo/jacobi-mpi/jacobi_par.c
#pragma omp parallel for reduction(max:maxdiff) collapse(2)
100
EL = 0.2*( EL + UP + DOWN + LEFT + RIGHT ); // Inner rows i=[1...subprob_size-2] <LOOP-START>for(i=1;i<subprob_size-1;i++) { // j=[1...subprob_size-2] for(j=1;j<subprob_size-1;j++) { b[i][j] = 0.2*(a[i][j]+a[i-1][j]+a[i+1][j]+a[i][j-1]+a[i][j+1]); if (fabs(b[i][j]-a[i][j]) > maxdiff) ma...
mcanalesmayo/jacobi-mpi/jacobi_par.c
#pragma omp parallel for reduction(max:maxdiff)
100
if (fabs(b[i][j]-a[i][j]) > maxdiff) maxdiff = fabs(b[i][j]-a[i][j]); // j=[1...subprob_size-2] <LOOP-START>for(j=1;j<subprob_size-1;j++){ b[i][j] = 0.2*(a[i][j]+rfrbuff[j]+a[i+1][j]+a[i][j-1]+a[i][j+1]); if (fabs(b[i][j]-a[i][j]) > maxdiff) maxdiff = fabs(b[i][j]-a[i][j]); }<LOOP-END> <OMP-START>#pragma om...
mcanalesmayo/jacobi-mpi/jacobi_par.c
#pragma omp parallel for reduction(max:maxdiff)
100
][j]-a[i][j]) > maxdiff) maxdiff = fabs(b[i][j]-a[i][j]); // Inner rows i=[1...subprob_size-2] <LOOP-START>for(i=1;i<subprob_size-1;i++) { // j=0 j=0; b[i][j] = 0.2*(a[i][j]+a[i-1][j]+a[i+1][j]+rfcbuff[i]+a[i][j+1]); if (fabs(b[i][j]-a[i][j]) > maxdiff) maxdiff = fabs(b[i][j]-a[i][j]); }<LOOP-END> <O...
mcanalesmayo/jacobi-mpi/jacobi_par.c
#pragma omp parallel for reduction(max:maxdiff)
100
ff[i]+a[i][j+1]); if (fabs(b[i][j]-a[i][j]) > maxdiff) maxdiff = fabs(b[i][j]-a[i][j]); } <LOOP-START>for(i=1;i<subprob_size-1;i++){ // j=subprob_size-1 j=subprob_size-1; b[i][j] = 0.2*(a[i][j]+a[i-1][j]+a[i+1][j]+a[i][j-1]+rlcbuff[i]); if (fabs(b[i][j]-a[i][j]) > maxdiff) maxdiff = fabs(b[i][j]-a...
mcanalesmayo/jacobi-mpi/jacobi_par.c
#pragma omp parallel for reduction(max:maxdiff)
100
if (fabs(b[i][j]-a[i][j]) > maxdiff) maxdiff = fabs(b[i][j]-a[i][j]); // j=[1...subprob_size-2] <LOOP-START>for(j=1;j<subprob_size-1;j++){ b[i][j] = 0.2*(a[i][j]+a[i-1][j]+rlrbuff[j]+a[i][j-1]+a[i][j+1]); if (fabs(b[i][j]-a[i][j]) > maxdiff) maxdiff = fabs(b[i][j]-a[i][j]); }<LOOP-END> <OMP-START>#pragma om...
abhishekgupta-1/Parallel-Computing-Assignment/submission/tsp_openmp/tsp_openmp.c
#pragma omp parallel for default(none) \
100
); final_res = curr_res; } } return; } int i; <LOOP-START>firstprivate(curr_bound, curr_weight, level)\ shared(curr_pat, vis,adj,final_res,N) for (i=0; i<N; i++) { int visited[N]; int curr_path[N]; int j; for (j=0;j<N;j++) {vi...
abhishekgupta-1/Parallel-Computing-Assignment/submission/tsp_openmp/tsp_openmp.c
#pragma omp parallel for reduction(+:curr_bound)
100
memset(curr_path, -1,sizeof(curr_path)); memset(visited, 0, sizeof(visited)); int i; <LOOP-START>for (i=0; i<N; i++) curr_bound += (firstMin(adj, i) + secondMin(adj, i)); curr_bound = (curr_bound&1)? curr_bound/2 + 1 : curr_bound/2; ...
fmorenovr/ComputerScience_UNI/CC301-Algoritmos_Paralelos/Clase_7/Ejercicio_3/minMaxVector_openmp.c
#pragma omp parallel for ordered schedule(static,chunksize)
100
%d\n",*(minMax_array+1)); return 0; } void llenar(int *a) { int i; omp_set_num_threads(4); <LOOP-START>for(i=0;i<SIZE;i++) *(a+i)=rand()%50; } int* minMax(int*a) { int i,min_val=a[0],max_val=a[0]; omp_set_num_threads(4); #pragma omp parallel for ordered schedule(static,chunksize) \ reduction(max:...
fmorenovr/ComputerScience_UNI/CC301-Algoritmos_Paralelos/Clase_7/Ejercicio_3/minMaxVector_openmp.c
#pragma omp parallel for ordered schedule(static,chunksize) \
100
)=rand()%50; } int* minMax(int*a) { int i,min_val=a[0],max_val=a[0]; omp_set_num_threads(4); <LOOP-START>reduction(max:max_val) reduction(min:min_val) for(i=1;i<SIZE;i++) { if(a[i]>max_val) max_val=a[i]; if(min_val>a[i]) min_val=a[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for orde...
fmorenovr/ComputerScience_UNI/CC301-Algoritmos_Paralelos/Clase_7/Ejercicio_2/ordered_openmp.c
#pragma omp parallel for ordered schedule(static,chunksize)
100
alelo\nEl vector a es:\n"); for(i=0;i<n;i++) printf("a[%d]:%d\n",i,a[i]); printf("\n\n"); <LOOP-START>for(i=0;i<n;i++){ a[i]=i; printf("%d del hilo %d\n",i,omp_get_thread_num()); }<LOOP-END> <OMP-START>#pragma omp parallel for ordered schedule(static,chunksize)<OMP-END>
fmorenovr/ComputerScience_UNI/CC301-Algoritmos_Paralelos/Clase_10/Ejercicio_1/bitonicSort_openmp.c
#pragma omp parallel for private(start) shared(sequence, end, up, distance)
100
p, int * sequence, int size) { int distance = size/2; int * start, * end = sequence+distance; <LOOP-START>for(start = sequence; start < end; start++) if( (*start > *(start+distance)) == up) swap(start, start+distance); } void swap(int * x, int * y) { int temp = *x; *x = *y; *y = temp; }<LOOP-END>...
fmorenovr/ComputerScience_UNI/CC301-Algoritmos_Paralelos/Clase_10/Ejercicio_1/generateBitonicArray.c
#pragma omp parallel for ordered schedule(static,5)
100
// 2^14 = 16384 maximo omp_set_num_threads(4); fprintf(fp,"%li\n",n); <LOOP-START>for(i=0;i<n;i++){ numero = rand()%n; #pragma omp ordered fprintf(fp,"%li",numero); if(i<n-1) #pragma omp ordered fprintf(fp," "); }<LOOP-END> <OMP-START>#pragma...
fmorenovr/ComputerScience_UNI/CC462-Sistemas_Concurrentes_y_Distribuidos/Labo_1/example/matrix.c
#pragma omp parallel for
100
trix(quantum_matrix m) { int i, j, z=0; /* int l; */ while ((1 << z++) < m.rows); z--; <LOOP-START>{ /* for (l=z-1; l>=0; l--) { if ((l % 4 == 3)) printf(" "); printf("%i", (i >> l) & 1); } */ #pragma omp parallel for for(j=0; j<m.cols; j++) printf("%g %+gi ", quantum_rea...
fmorenovr/ComputerScience_UNI/CC462-Sistemas_Concurrentes_y_Distribuidos/Labo_1/example/matrix.c
#pragma omp parallel for
100
l>=0; l--) { if ((l % 4 == 3)) printf(" "); printf("%i", (i >> l) & 1); } */ <LOOP-START>for(j=0; j<m.cols; j++) printf("%g %+gi ", quantum_real(M(m, j, i)), quantum_imag(M(m, j, i))); printf("\n"); } printf("\n"); } /* Matrix multiplication */ quantum_matrix quantum_mmult(quantum_...
fmorenovr/ComputerScience_UNI/CC462-Sistemas_Concurrentes_y_Distribuidos/Labo_1/example/matrix.c
#pragma omp parallel for
100
f(A.cols != B.rows) quantum_error(QUANTUM_EMSIZE); C = quantum_new_matrix(B.cols, A.rows); <LOOP-START>for(i=0; i<B.cols; i++) { for(j=0; j<A.rows; j++) { for(k=0; k<B.rows; k++) M(C, i, j) += M(A, k, j) * M(B, i, k); } }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
TITAN2D/titan2d/src/geoflow/slopes.C
#pragma omp parallel for private(currentPtr,Curr_El)
100
-------- //-------------------and -------------------------- /* mdj 2007-02 */ //<LOOP-START>for(ti_ndx_t ndx = 0; ndx < El_Table->size(); ndx++) { if(El_Table->adapted_[ndx] > 0)//if this element does not belong on this processor don't involve!!! { El_Table->elenode_[...
TITAN2D/titan2d/src/geoflow/integrators.C
#pragma omp parallel for \
100
double VxVy[2]; double dt2 = .5 * dt; // dt2 is set as dt/2 ! Element* Curr_El; //<LOOP-START>//private(currentPtr,Curr_El,IF_STOPPED,influx,j,k,curr_time,flux_src_coef,VxVy) for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { if(adapted_[ndx] <= 0)continue;//if this element does no...
TITAN2D/titan2d/src/geoflow/integrators.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_MIDIUM_CHUNK) \
100
ISPC_cor); //ANNOTATE_TASK_BEGIN(Integrator_SinglePhase_Coulomb_FirstOrder_corrector_loop); <LOOP-START>reduction(+: m_forceint, m_forcebed, m_eroded, m_deposited, m_realvolume) for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { //ANNOTATE_ITERATION_TASK(ISPC_cor_iter); if(adapted_[n...
TITAN2D/titan2d/src/geoflow/integrators.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_MIDIUM_CHUNK)
100
cosphiSQ*=cosphiSQ; // Updating K_act/pass based on updated state vars and their derivatives. <LOOP-START>for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { if(adapted_[ndx] <= 0) { double vel; double Kactx, Kacty; if(h[ndx] > tiny) { double hSQ = h[ndx] * h[ndx]; ...
TITAN2D/titan2d/src/geoflow/integrators.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_MIDIUM_CHUNK) \
100
lquants_ptr->TimeInts[iloc].resize(0); } tivector<double> &kactxy=effect_kactxy_[0]; <LOOP-START>reduction(+: m_force_transx, m_force_transy, m_force_conx, m_force_cony, m_force_gx, m_force_gy) \ reduction(+: m_force_bx, m_force_by, m_force_bcx, m_force_bcy, m_force_rx, m_force_ry) \ reduction(+: m_p...
TITAN2D/titan2d/src/geoflow/integrators.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK) \
100
me = 0.0; double inv_xi= 1.0/xi; //convinience ref tivector<double> *g=gravity_; <LOOP-START>reduction(+: m_forceint, m_forcebed, m_eroded, m_deposited, m_realvolume) for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { if(adapted_[ndx] <= 0)continue;//if this element does not belon...
TITAN2D/titan2d/src/geoflow/integrators.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_MIDIUM_CHUNK) \
100
ocalquants_ptr->temps[iloc].resize(0); localquants_ptr->TimeInts[iloc].resize(0); } <LOOP-START>reduction(+: m_force_transx, m_force_transy, m_force_conx, m_force_cony, m_force_gx, m_force_gy) \ reduction(+: m_force_bx, m_force_by, m_force_bcx, m_force_bcy, m_force_rx, m_force_ry) \ reduction(+: m_p...
TITAN2D/titan2d/src/geoflow/integrators.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK) \
100
n(phi2); double mu_3 = tan(phi3); //convinience ref tivector<double> *g=gravity_; <LOOP-START>reduction(+: m_forceint, m_forcebed, m_eroded, m_deposited, m_realvolume) for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { if(adapted_[ndx] <= 0)continue;//if this element does not belon...
TITAN2D/titan2d/src/geoflow/integrators.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_MIDIUM_CHUNK) \
100
ocalquants_ptr->temps[iloc].resize(0); localquants_ptr->TimeInts[iloc].resize(0); } <LOOP-START>reduction(+: m_force_transx, m_force_transy, m_force_conx, m_force_cony, m_force_gx, m_force_gy) \ reduction(+: m_force_bx, m_force_by, m_force_bcx, m_force_bcy, m_force_rx, m_force_ry) \ reduction(+: m_p...
TITAN2D/titan2d/src/geoflow/integrators.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK) \
100
a dependency in the Element class that causes incorrect // results <LOOP-START>reduction(+: m_forceint, m_forcebed, m_eroded, m_deposited, m_realvolume) for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { if(adapted_[ndx] <= 0)continue;//if this element does not belon...
TITAN2D/titan2d/src/geoflow/integrators.C
#pragma omp parallel for \
100
; double VxVy[2]; double dt2 = .5 * dt; // dt2 is set as dt/2 ! Element* Curr_El; //<LOOP-START>//private(currentPtr,Curr_El,IF_STOPPED,influx,j,k,curr_time,flux_src_coef,VxVy) for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { Curr_El = &(elements_[ndx]); elements_[ndx].upda...
TITAN2D/titan2d/src/geoflow/stats.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK) \
100
NOTATE_SITE_BEGIN(StatProps_calc_stats); //ANNOTATE_TASK_BEGIN(StatProps_calc_stats_loop); <LOOP-START>reduction(min:m_x_min,m_y_min,testpointmindist2) \ reduction(max:m_x_max,m_y_max,m_v_max,testpointreach) \ reduction(max:m_max_height) \ reduction(+:xC,yC,rC,m_area,m_v_ave,m_vx_ave,m_...
TITAN2D/titan2d/src/geoflow/flux_srcs.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
>size(); if(fluxprops->MaxInfluxNow(matprops, timeprops) > 0.0) { <LOOP-START>for (ti_ndx_t ndx = 0; ndx < N; ndx++) { if (adapted[ndx] > 0) //if this element doesn't belong on this processor don't involve ElemTable->E...
TITAN2D/titan2d/src/geoflow/flux_srcs.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
p->calc_flux(ndx, fluxprops, timeprops); } } else { <LOOP-START>for (ti_ndx_t ndx = 0; ndx < N; ndx++) { if (adapted[ndx] > 0) //if this element doesn't belong on this processor don't involve elements[ndx...
TITAN2D/titan2d/src/geoflow/flux_srcs.C
#pragma omp parallel for private(entryptr,EmTemp)
100
rt(0); } */ // mdj 2007-04 Element *EmTemp; //<LOOP-START>//@ElementsBucketDoubleLoop for(int ibuck = 0; ibuck < no_of_buckets; ibuck++) { for(int ielm = 0; ielm < bucket[ibuck].ndx.size(); ielm++) { ...
TITAN2D/titan2d/src/geoflow/flux_srcs.C
#pragma omp parallel for private(entryptr,EmTemp)
100
} } else { // mdj 2007-04 Element *EmTemp; //<LOOP-START>//@ElementsBucketDoubleLoop for(int ibuck = 0; ibuck < no_of_buckets; ibuck++) { for(int ielm = 0; ielm < bucket[ibuck].ndx.size(); ielm++) { ...
TITAN2D/titan2d/src/geoflow/edge_states.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
ICAL_OMP vector<double> &localoutflow=dtmp; localoutflow.resize(elements_.size()); <LOOP-START>for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { localoutflow[ndx]=0.0; if(adapted_[ndx] > 0)//if this element does not belong on this processor don't involve!!! { ...
TITAN2D/titan2d/src/geoflow/edge_states.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK) reduction(+:localoutflow_sum)
100
nts_.size(); ndx++) outflow+=localoutflow[ndx]; #else double localoutflow_sum=0.0; <LOOP-START>for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { if(adapted_[ndx] > 0)//if this element does not belong on this processor don't involve!!! { //if this element doesn't...
TITAN2D/titan2d/src/geoflow/get_coef_and_eigen.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK) reduction(min:min_dx_dy_evalue) reduction(max:hmax)
100
dt[2] = c_dmin1(dttemp, dttemp2); } //end of section that SHOULD ____NOT___ be openmp'd <LOOP-START>for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { if((adapted_[ndx] > 0) || ((adapted_[ndx] < 0) && (ghost_flag == 1))) { //if this element does not belong on this process...
TITAN2D/titan2d/src/geoflow/get_coef_and_eigen.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK) reduction(min:min_dx_dy_evalue) reduction(max:hmax)
100
dt[2] = c_dmin1(dttemp, dttemp2); } //end of section that SHOULD ____NOT___ be openmp'd <LOOP-START>for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { if((adapted_[ndx] > 0) || ((adapted_[ndx] < 0) && (ghost_flag == 1))) { //if this element does not belong on this process...
TITAN2D/titan2d/src/geoflow/get_coef_and_eigen.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK) reduction(min:min_dx_dy_evalue) reduction(max:hmax)
100
dt[2] = c_dmin1(dttemp, dttemp2); } //end of section that SHOULD ____NOT___ be openmp'd <LOOP-START>for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { if((adapted_[ndx] > 0) || ((adapted_[ndx] < 0) && (ghost_flag == 1))) { //if this element does not belong on this process...
TITAN2D/titan2d/src/geoflow/get_coef_and_eigen.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK) reduction(min:min_dx_dy_evalue) reduction(max:hmax)
100
2] = c_dmin1(dttemp, dttemp2); } //end of section that SHOULD ____NOT___ be openmp'd <LOOP-START>for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { if((adapted_[ndx] > 0) || ((adapted_[ndx] < 0) && (ghost_flag == 1))) { //if this element does not belong on this process...
TITAN2D/titan2d/src/datstr/hashtab2.C
#pragma omp parallel for schedule(guided,TITAN2D_DINAMIC_CHUNK)
100
NodeHashTable::removeNodes(const ti_ndx_t *nodes_to_delete, const ti_ndx_t Nnodes_to_delete) { <LOOP-START>for(int i=0;i<Nnodes_to_delete;++i) { ti_ndx_t ndx=nodes_to_delete[i]; if(status_[ndx]<0)continue;/*was already deleted*/ ASSERT2(status_[ndx]>=0); SFC_Key keyi=key_[ndx]...
TITAN2D/titan2d/src/datstr/hashtab2.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
ragma omp section connection_id_.resize(new_size); } } //set values <LOOP-START>for(int i=0;i<N;++i) { const int iElm=create_node_ielm[i]; const int which=create_node_iwhich[i]; const ti_ndx_t ndx=ndx_start+i; SFC_Key keyi=new_node_key[iElm][which]; ...
TITAN2D/titan2d/src/datstr/hashtab2.C
#pragma omp parallel for schedule(guided,TITAN2D_DINAMIC_CHUNK)
100
dx[iElm][which]=ndx; new_node_isnew[iElm][which]=true; } //place to hash table <LOOP-START>for(int i=0;i<N;++i) { const int iElm=create_node_ielm[i]; const int which=create_node_iwhich[i]; SFC_Key keyi=new_node_key[iElm][which]; int entry = hash(keyi); I...
TITAN2D/titan2d/src/datstr/hashtab2.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
ize(); ti_ndx_t new_size=size()+numElemToRefine*4; resize(new_size); //set values <LOOP-START>for(int iElm=0;iElm<numElemToRefine;++iElm) { for(int which=0;which<4;++which) { const ti_ndx_t ndx=ndx_start+iElm*4+which; SFC_Key keyi=new_node_key[iElm][which];...
TITAN2D/titan2d/src/datstr/hashtab2.C
#pragma omp parallel for schedule(guided,TITAN2D_DINAMIC_CHUNK)
100
dx(ndx); new_sons_ndx[iElm][which]=ndx; } } //place to hash table <LOOP-START>for(int iElm=0;iElm<numElemToRefine;++iElm) { for(int which=0;which<4;++which) { SFC_Key keyi=new_node_key[iElm][which]; int entry = hash(keyi); IF_OMP...
TITAN2D/titan2d/src/datstr/hashtab2.C
#pragma omp parallel for schedule(guided,TITAN2D_DINAMIC_CHUNK)
100
Table::removeElements(const ti_ndx_t *elements_to_delete, const ti_ndx_t Nelements_to_delete) { <LOOP-START>for(int i=0;i<Nelements_to_delete;++i) { ti_ndx_t ndx=elements_to_delete[i]; ASSERT2(status_[ndx]>=0); SFC_Key keyi=key_[ndx]; int entry = hash(keyi); IF_OMP(omp_...
TITAN2D/titan2d/src/datstr/elements_properties.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
ptr) { assert(ElemTable->all_elenodes_are_permanent); double gamma=matprops_ptr->gamma; <LOOP-START>for(ti_ndx_t ndx = 0; ndx < elements_.size(); ndx++) { if(adapted_[ndx] > 0)//if this element does not belong on this processor don't involve!!! { get_slopes(ndx,gamma); ...
TITAN2D/titan2d/src/main/properties.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
ic_pressure_by_elm); TI_ASSUME_ALIGNED(m_cum_kinergy_by_elm); if(numprocs>1) { <LOOP-START>for(ti_ndx_t ndx = 0; ndx < N; ndx++) { if(adapted_[ndx] <= 0)continue;//if this element does not belong on this processor don't involve!!! //update the record of maximum pile...
TITAN2D/titan2d/src/main/properties.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
max_kinergy_by_elm[ndx] = max(m_max_kinergy_by_elm[ndx],ke); } } else { <LOOP-START>for(ti_ndx_t ndx = 0; ndx < N; ndx++) { //update the record of maximum pileheight in the area covered by this element double ke = 0.0; double dp = 0.0; ...
TITAN2D/titan2d/src/main/properties.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
I_ASSUME_ALIGNED(m_max_dynamic_pressure_by_elm); TI_ASSUME_ALIGNED(m_cum_kinergy_by_elm); <LOOP-START>for(ti_ndx_t ndx = 0; ndx < N; ndx++) { if(adapted_[ndx] <= 0)continue;//if this element does not belong on this processor don't involve!!! //@TODO check ke for two phases double ...
TITAN2D/titan2d/src/adapt/refine2.C
#pragma omp parallel for schedule(static)
100
D_RESTART(HAdapt_refineElements_init,pt_start); //find position of corners, sides and bubbles <LOOP-START>for(int iElm=0;iElm<numElemToRefine;++iElm) { ti_ndx_t ndx=ElemToRefine[iElm]; for(int i = 0; i < 8; i++) //-- corners and sides { node_ndx_ref[iElm][i] = ElemTable->node_key_ndx_[i][nd...
TITAN2D/titan2d/src/adapt/refine2.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
s(); PROFILING3_STOPADD_RESTART(HAdapt_refineElements_int_nodes_alloc,pt_start); //SIDE 0 <LOOP-START>for(int iElm=0;iElm<numElemToRefine;++iElm) { ti_ndx_t ndx=ElemToRefine[iElm]; //@todo replace which with macro or enum //@todo reuse indexes for nodes and elements int whi...
TITAN2D/titan2d/src/adapt/refine2.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
} } PROFILING3_STOPADD_RESTART(HAdapt_refineElements_side0_init,pt_start); //SIDE1 <LOOP-START>for(int iElm=0;iElm<numElemToRefine;++iElm) { ti_ndx_t ndx=ElemToRefine[iElm]; //@todo replace which with macro or enum //@todo reuse indexes for nodes and elements int whi...
TITAN2D/titan2d/src/adapt/refine2.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
} } PROFILING3_STOPADD_RESTART(HAdapt_refineElements_side1_init,pt_start); //SIDE2 <LOOP-START>for(int iElm=0;iElm<numElemToRefine;++iElm) { ti_ndx_t ndx=ElemToRefine[iElm]; //@todo replace which with macro or enum //@todo reuse indexes for nodes and elements int whi...
TITAN2D/titan2d/src/adapt/refine2.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
} PROFILING3_STOPADD_RESTART(HAdapt_refineElements_side2_init,pt_start); //SIDE 3 <LOOP-START>for(int iElm=0;iElm<numElemToRefine;++iElm) { ti_ndx_t ndx=ElemToRefine[iElm]; //@todo replace which with macro or enum //@todo reuse indexes for nodes and elements int whi...
TITAN2D/titan2d/src/adapt/refine2.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
=S_C_CON; } } PROFILING3_STOPADD_RESTART(HAdapt_refineElements_side3_init,pt_start); <LOOP-START>for(int iElm=0;iElm<numElemToRefine;++iElm) { ti_ndx_t ndx=ElemToRefine[iElm]; int which; //changing the old bubble NodeTable->info_[ElemTable->node_bubble_ndx_[iElm]]=CORNER; ...
TITAN2D/titan2d/src/adapt/refine2.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
,new_node_isnew); PROFILING3_STOPADD_RESTART(HAdapt_refineElements_new_elm_aloc,pt_start); <LOOP-START>for(int iElm=0;iElm<numElemToRefine;++iElm) { ti_ndx_t ndx=ElemToRefine[iElm]; //@todo replace which with macro or enum //@todo reuse indexes for nodes and elements int whi...
TITAN2D/titan2d/src/adapt/hadpt.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
n the innermost buffer layer as the BUFFER layer //@ElementsSingleLoopNoStatusCheck <LOOP-START>for(ti_ndx_t ndx=0;ndx<ElemTable->size();++ndx) { if(status[ndx] >=0 && ((ElemProp->if_first_buffer_boundary(ndx, GEOFLOW_TINY) > 0) || (ElemProp->if_first_buffer_...
TITAN2D/titan2d/src/adapt/hadpt.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
PROFILING3_STOPADD_RESTART(HAdapt_adapt_htflush2,pt_start); TIMING3_START(t_start3); <LOOP-START>for(ti_ndx_t ndx=0;ndx<ElemTable->size();++ndx) { if(status[ndx]>=0) { EmTemp = &(elements[ndx]); switch (adapted[ndx]) { c...
TITAN2D/titan2d/src/adapt/updatenei.C
#pragma omp parallel for schedule(dynamic,TITAN2D_DINAMIC_CHUNK)
100
on from other processors */ /*************************************************************/ <LOOP-START>for(int iElm=0;iElm<allRefinement.size();++iElm) { Element* EmFather; Element* EmSon[4]; ti_ndx_t EmSonNdx[4]; Element* EmNeighNew[4]; ti_ndx_t EmNeighNewNdx[4]; ...
void-echo/SDU-Parallel-Lab/LAB/try20/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
n euclidean_distance[id1 * n + id2]; } static INLINE void calcEuclideanDistanceAndStoreInArray() { <LOOP-START>for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { euclidean_distance[i * n + j] = euclidean_distance[j * n + i] = (i == j) ? 0 : calc_distance(i, j); } ...
void-echo/SDU-Parallel-Lab/LAB/try20/pivot.c
#pragma omp parallel for schedule(static, 200) num_threads(thread_count)
100
******************************************* int len = c_n_m(n, m); // set omp thread number <LOOP-START>for (int i = 0; i < len; i++) { int tid = omp_get_thread_num(); int *values = object[i].values; for (int __m__ = 0; __m__ < m; __m__++) { int pivot_id = val...
void-echo/SDU-Parallel-Lab/LAB/try9/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
nDistanceAndStoreInArray() { // when adding this pragma, the program can be really fast! // <LOOP-START>for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { euclidean_distance[i * n + j] = get_distance(i, j); } // printf("calcEuclideanDistanceAndStoreInArray: %d\n", i)...
void-echo/SDU-Parallel-Lab/LAB/try9/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
tf("c_n_m = %d, each_thread_works = %d\n", c_n_m(n, m), each_thread_works); <LOOP-START>for (int __thread__ = 0; __thread__ < thread_count; __thread__++) { struct timeval start1, end1; gettimeofday(&start1, NULL); // *******************************************...
void-echo/SDU-Parallel-Lab/LAB/try6/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
nDistanceAndStoreInArray() { // when adding this pragma, the program can be really fast! // <LOOP-START>for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { euclidean_distance[i * n + j] = get_distance(i, j); } // printf("calcEuclideanDistanceAndStoreInArray: %d\n", i)...
void-echo/SDU-Parallel-Lab/LAB/try6/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
bination)); com->values = (int *)malloc(sizeof(int) * m); com->cost = 0; // <LOOP-START>for (int i = 0; i < c_n_m(n, m); i++) { com = next_combination(com); // CRITICAL SECTION if (com == NULL) { break; } int *values = com->values...
void-echo/SDU-Parallel-Lab/LAB/try7/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
nDistanceAndStoreInArray() { // when adding this pragma, the program can be really fast! // <LOOP-START>for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { euclidean_distance[i * n + j] = get_distance(i, j); } // printf("calcEuclideanDistanceAndStoreInArray: %d\n", i)...
void-echo/SDU-Parallel-Lab/LAB/try7/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
omp_lock_t LOCK_1, LOCK_2; omp_init_lock(&LOCK_1); omp_init_lock(&LOCK_2); <LOOP-START>for (int __thread__ = 0; __thread__ < thread_count; __thread__++) { // ********************************************************* // int chebyshev_matrix_set = 0; double **c...
void-echo/SDU-Parallel-Lab/LAB/try16/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
2) static INLINE double calc_distance(int id1, int id2) { double sum = 0; // 更改5,没作用 // <LOOP-START>for (int i = 0; i < dim; i++) { double diff = get_point_coordinate_of_id_and_dimension(id1, i) - get_point_coordinate_of_id_and_dimension(id2, i); sum += diff * diff; ...
void-echo/SDU-Parallel-Lab/LAB/try16/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
id2]; } // 计算每对顶点的欧几里得距离并存储在数组中 static INLINE void calcEuclideanDistanceAndStoreInArray() { // <LOOP-START>// 更改3: 加入collapse(2) #pragma omp parallel for num_threads(thread_count) for (int i = 0; i < n; i++) { // 更改4,大概优化100ms for (int j = i; j < n; j++) { // if (i == j) { ...
void-echo/SDU-Parallel-Lab/LAB/try16/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
InArray() { // #pragma omp parallel for num_threads(thread_count) // 更改3: 加入collapse(2) <LOOP-START>for (int i = 0; i < n; i++) { // 更改4,大概优化100ms for (int j = i; j < n; j++) { // if (i == j) { // euclidean_distance[i * n + j] = 0; // } else { ...
void-echo/SDU-Parallel-Lab/LAB/try16/pivot.c
#pragma omp parallel for ?
100
bject object = (combination *)malloc(sizeof(combination) * c_n_m(n, m)); // *更改,可以加 <LOOP-START>// #pragma omp parallel for (变慢了) for (int i = 0; i < c_n_m(n, m); i++) { object[i].values = (int *)malloc(sizeof(int) * m); object[i].cost = 0; }<LOOP-END> <OMP-START>...
void-echo/SDU-Parallel-Lab/LAB/try16/pivot.c
#pragma omp parallel for (变慢了)
100
malloc(sizeof(combination) * c_n_m(n, m)); // *更改,可以加 #pragma omp parallel for ? // <LOOP-START>for (int i = 0; i < c_n_m(n, m); i++) { object[i].values = (int *)malloc(sizeof(int) * m); object[i].cost = 0; }<LOOP-END> <OMP-START>#pragma omp parallel for (变慢了)<OMP-END>
void-echo/SDU-Parallel-Lab/LAB/try16/pivot.c
#pragma omp parallel for schedule(static,200) num_threads(thread_count)
100
en = c_n_m(n, m); // set omp thread number // Q: 怎么确定的schedule(static,200)? <LOOP-START>// #pragma omp parallel for schedule(guided) num_threads(thread_count) for (int i = 0; i < len; i++) { int tid = omp_get_thread_num(); int d1 = tid * m * n; int *va...
void-echo/SDU-Parallel-Lab/LAB/try16/pivot.c
#pragma omp parallel for schedule(guided) num_threads(thread_count)
100
c,200)? #pragma omp parallel for schedule(static,200) num_threads(thread_count) // <LOOP-START>for (int i = 0; i < len; i++) { int tid = omp_get_thread_num(); int d1 = tid * m * n; int *values = object[i].values; // 计算cube中d1层的矩阵 for (int __m_...
void-echo/SDU-Parallel-Lab/LAB/try18/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
n euclidean_distance[id1 * n + id2]; } static INLINE void calcEuclideanDistanceAndStoreInArray() { <LOOP-START>for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (i == j) { euclidean_distance[i * n + j] = 0; } else { euclidean_distance[i * n +...
void-echo/SDU-Parallel-Lab/LAB/try18/pivot.c
#pragma omp parallel for schedule(static, 200) num_threads(thread_count)
100
******************************************* int len = c_n_m(n, m); // set omp thread number <LOOP-START>for (int i = 0; i < len; i++) { int tid = omp_get_thread_num(); int *values = object[i].values; for (int __m__ = 0; __m__ < m; __m__++) { int pivot_id = val...
void-echo/SDU-Parallel-Lab/LAB/try5/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
nDistanceAndStoreInArray() { // when adding this pragma, the program can be really fast! // <LOOP-START>for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { euclidean_distance[i * n + j] = get_distance(i, j); } // printf("calcEuclideanDistanceAndStoreInArray: %d\n", i)...
void-echo/SDU-Parallel-Lab/LAB/try5/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
j++) { chebyshev_matrix[j] = (float *)malloc(sizeof(float) * n); }; // <LOOP-START>for (int i = 0; i < c_n_m(n, m); i++) { combination *com = next_combination(); // very quick if (com == NULL) { break; } int *values = com->val...
void-echo/SDU-Parallel-Lab/LAB/try10/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
printf("c_n_m = %d, each_thread_works = %d\n", c_n_m(n, m), each_thread_works); <LOOP-START>for (int __thread__ = 0; __thread__ < thread_count; __thread__++) { struct timeval start1, end1; gettimeofday(&start1, NULL); // *******************************************...
void-echo/SDU-Parallel-Lab/LAB/try3/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
alcEuclideanDistanceAndStoreInArray() { // when adding this pragma, the program can be really fast! <LOOP-START>for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { euclidean_distance[i * n + j] = get_distance(i, j); } // printf("calcEuclideanDistanceAndStoreInArray: %d\n", i)...
void-echo/SDU-Parallel-Lab/LAB/try19/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
return euclidean_distance[id1][id2]; } static INLINE void calcEuclideanDistanceAndStoreInArray() { <LOOP-START>for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (i == j) { euclidean_distance[i][j] = 0; } else { euclidean_distance[i][j] = calc...
void-echo/SDU-Parallel-Lab/LAB/try19/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
******************************************* int len = c_n_m(n, m); // set omp thread number <LOOP-START>for (int i = 0; i < len; i++) { int tid = omp_get_thread_num(); int *values = object[i].values; for (int __m__ = 0; __m__ < m; __m__++) { int pivot_id = val...
void-echo/SDU-Parallel-Lab/LAB/try14/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
clidean_distance[id1 * n + id2]; } static INLINE void calcEuclideanDistanceAndStoreInArray() { <LOOP-START>for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (i == j) { euclidean_distance[i * n + j] = 0; } else { euclidean_distance[i * n +...
void-echo/SDU-Parallel-Lab/LAB/try14/pivot.c
#pragma omp parallel for schedule(static, 200) num_threads(thread_count)
100
******************************************* int len = c_n_m(n, m); // set omp thread number <LOOP-START>for (int i = 0; i < len; i++) { int tid = omp_get_thread_num(); int d1 = tid * m * n; int *values = object[i].values; for (int __m__ = 0; __m__ < m; __m__++) { ...
void-echo/SDU-Parallel-Lab/LAB/try11/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
printf("c_n_m = %d, each_thread_works = %d\n", c_n_m(n, m), each_thread_works); <LOOP-START>for (int __thread__ = 0; __thread__ < thread_count; __thread__++) { struct timeval start1, end1; gettimeofday(&start1, NULL); // *******************************************...
void-echo/SDU-Parallel-Lab/LAB/try15-big-change-using-avx2/pivot.c
#pragma omp parallel for
100
*********************************** int len = c_n_m(n, m); // set omp thread number <LOOP-START>for (int i = 0; i < len; i++) { // printf("HERE\n"); int tid = omp_get_thread_num(); int d1 = tid * m * n; int *values = object[i].values; for (int ...
void-echo/SDU-Parallel-Lab/LAB/try17/pivot.c
#pragma omp parallel for num_threads(thread_count)
100
clidean_distance[id1 * n + id2]; } static INLINE void calcEuclideanDistanceAndStoreInArray() { <LOOP-START>for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (i == j) { euclidean_distance[i * n + j] = 0; } else { euclidean_distance[i * n +...
void-echo/SDU-Parallel-Lab/LAB/try17/pivot.c
#pragma omp parallel for schedule(static, 200) num_threads(thread_count)
100
******************************************* int len = c_n_m(n, m); // set omp thread number <LOOP-START>for (int i = 0; i < len; i++) { int tid_ = omp_get_thread_num(); short unsigned int tid = (short unsigned int)tid_; int d1 = tid * m * n; short unsigned int *va...
void-echo/SDU-Parallel-Lab/LAB/try13/pivot.c
#pragma omp parallel for schedule(static, 100) num_threads(thread_count)
100
******************************************* int len = c_n_m(n, m); // set omp thread number <LOOP-START>for (int i = 0; i < len; i++) { for (int __i__ = 0; __i__ < n; __i__++) { int bound = __i__ + 1; for (int __j__ = bound; __j__ < n; __j__++) { o...