/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 UPC version - BT source code tree 2004 - GWU - HPCL -- check bt.c for complete information --------------------------------------------------------------------*/ #include #include #include "functions.h" void copy_faces(void) { int i1, j1, k1, c1,i2,j2,k2,c2,i,j,c,p4, p5, b_size[6]; int suc0,suc1,suc2,pre0,pre1,pre2; int ss[6], sr[6]; double *sh_buf_priv; shared [] double *sh_arr; if( THREADS == 1 ) { #if (DEBUG == TRUE) if( MYTHREAD == 0 ) printf(" (D) compute_rhs()\n"); #endif compute_rhs(); } else { ss[0] = start_send_east; ss[1] = start_send_west; ss[2] = start_send_north; ss[3] = start_send_south; ss[4] = start_send_top; ss[5] = start_send_bottom; sr[0] = start_recv_east; sr[1] = start_recv_west; sr[2] = start_recv_north; sr[3] = start_recv_south; sr[4] = start_recv_top; sr[5] = start_recv_bottom; b_size[4] = top_size; b_size[5] = bottom_size; upc_barrier; //BLOCK1 suc0= successor[0]; u_th_arr = (shared [] double *)&u[suc0].local[0][0][0][0][0]; for (c = 0; c local[c][i+sh_cell_size[MYTHREAD][c][0]][j+2][2][0], sizeof(double)* 5 *(sh_cell_size[MYTHREAD][c][2]) ); */ /* upc_memcpy(&u[suc0].local[c][i][j+2][2][0], &u[MYTHREAD].local[c][i+sh_cell_size[MYTHREAD][c][0]][j+2][2][0], sizeof(double)* 5 *(sh_cell_size[MYTHREAD][c][2]) ); */ upc_memput(&u_th_d(c,i,j+2,2,0), &u_priv_d(c,i+sh_cell_size[MYTHREAD][c][0],j+2,2,0), sizeof(double)* 5 *(sh_cell_size[MYTHREAD][c][2]) ); } } } } //BLOCK2 pre0= predecessor[0]; u_th_arr = (shared [] double *)&u[pre0].local[0][0][0][0][0]; for (c=0;c