/*-------------------------------------------------------------------- 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 y_solve_cell( int first, int last, int c ) { /*-------------------------------------------------------------------- --------------------------------------------------------------------*/ /*-------------------------------------------------------------------- c performs guassian elimination on this cell c c assumes that unpacking routines for non-first cells c preload C' and rhs' from previous cell. c c assumed send happens outside this routine, but that c c'(JMAX) and rhs'(JMAX) will be sent to next cell --------------------------------------------------------------------*/ int i, k, isize, jsize, ksize, jstart; int j; j = 0; jstart = 0; isize = cell_size[c][0] - endc[c][0] - 1; jsize = cell_size[c][1] - 1; ksize = cell_size[c][2] - endc[c][2] - 1; /*-------------------------------------------------------------------- c outer most do loops - sweeping in j direction c-------------------------------------------------------------------*/ if( first == 1 ) { for( i=startc[c][0]; i<=isize; i++ ) { for( k=startc[c][2]; k<=ksize; k++ ) { /*-------------------------------------------------------------------- c multiply c(i,jstart,k) by b_inverse and copy back to c c multiply rhs(jstart) by b_inverse(jstart) and copy to rhs c-------------------------------------------------------------------*/ binvcrhs( &lhs_priv_d(c,i+1,jstart+1,k+1,BB,0,0), &lhs_priv_d(c,i+1,jstart+1,k+1,CC,0,0), &rhs_priv_d(c,i+1,jstart+1,k+1,0) ); } } } /*-------------------------------------------------------------------- c begin inner most do loop c do all the elements of the cell unless last c-------------------------------------------------------------------*/ for( i=startc[c][0]; i<=isize; i++ ) { for( j=jstart+first; j