/[escript]/trunk/paso/src/SparseMatrix_nullifyRowsAndCols.c
ViewVC logotype

Diff of /trunk/paso/src/SparseMatrix_nullifyRowsAndCols.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1551 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 1552 by gross, Thu May 8 08:52:41 2008 UTC
# Line 40  void Paso_SparseMatrix_nullifyRowsAndCol Line 40  void Paso_SparseMatrix_nullifyRowsAndCol
40    index_t irow, iptr, icol;    index_t irow, iptr, icol;
41    #pragma omp parallel for private(irow, iptr,icol) schedule(static)    #pragma omp parallel for private(irow, iptr,icol) schedule(static)
42    for (icol=0;icol< A->pattern->numOutput;icol++) {    for (icol=0;icol< A->pattern->numOutput;icol++) {
43         #pragma ivdep
44       for (iptr=A->pattern->ptr[icol]-index_offset;iptr<A->pattern->ptr[icol+1]-index_offset; iptr++) {       for (iptr=A->pattern->ptr[icol]-index_offset;iptr<A->pattern->ptr[icol+1]-index_offset; iptr++) {
45        irow=A->pattern->index[iptr]-index_offset;        irow=A->pattern->index[iptr]-index_offset;
46        if (mask_col[icol]>0. || mask_row[irow]>0. ) {        if (mask_col[icol]>0. || mask_row[irow]>0. ) {
# Line 58  void Paso_SparseMatrix_nullifyRowsAndCol Line 59  void Paso_SparseMatrix_nullifyRowsAndCol
59    #pragma omp parallel for private(irow, iptr,icol) schedule(static)    #pragma omp parallel for private(irow, iptr,icol) schedule(static)
60    for (irow=0;irow< A->pattern->numOutput;irow++) {    for (irow=0;irow< A->pattern->numOutput;irow++) {
61        /* TODO: test mask_row here amd not inside every loop */        /* TODO: test mask_row here amd not inside every loop */
62          #pragma ivdep
63        for (iptr=A->pattern->ptr[irow]-index_offset;iptr<A->pattern->ptr[irow+1]-index_offset; iptr++) {        for (iptr=A->pattern->ptr[irow]-index_offset;iptr<A->pattern->ptr[irow+1]-index_offset; iptr++) {
64          icol=A->pattern->index[iptr]-index_offset;          icol=A->pattern->index[iptr]-index_offset;
65          if (mask_col[icol]>0. || mask_row[irow]>0. ) {          if (mask_col[icol]>0. || mask_row[irow]>0. ) {
# Line 78  void Paso_SparseMatrix_nullifyRowsAndCol Line 80  void Paso_SparseMatrix_nullifyRowsAndCol
80      for (iptr=A->pattern->ptr[ic]-index_offset;iptr<A->pattern->ptr[ic+1]-index_offset; iptr++) {      for (iptr=A->pattern->ptr[ic]-index_offset;iptr<A->pattern->ptr[ic+1]-index_offset; iptr++) {
81        for (irb=0;irb< A->row_block_size;irb++) {        for (irb=0;irb< A->row_block_size;irb++) {
82          irow=irb+A->row_block_size*(A->pattern->index[iptr]-index_offset);          irow=irb+A->row_block_size*(A->pattern->index[iptr]-index_offset);
83                #pragma ivdep
84          for (icb=0;icb< A->col_block_size;icb++) {          for (icb=0;icb< A->col_block_size;icb++) {
85            icol=icb+A->col_block_size*ic;            icol=icb+A->col_block_size*ic;
86            if (mask_col[icol]>0. || mask_row[irow]>0. ) {            if (mask_col[icol]>0. || mask_row[irow]>0. ) {
# Line 101  void Paso_SparseMatrix_nullifyRowsAndCol Line 104  void Paso_SparseMatrix_nullifyRowsAndCol
104      for (iptr=A->pattern->ptr[ir]-index_offset;iptr<A->pattern->ptr[ir+1]-index_offset; iptr++) {      for (iptr=A->pattern->ptr[ir]-index_offset;iptr<A->pattern->ptr[ir+1]-index_offset; iptr++) {
105        for (irb=0;irb< A->row_block_size;irb++) {        for (irb=0;irb< A->row_block_size;irb++) {
106          irow=irb+A->row_block_size*ir;          irow=irb+A->row_block_size*ir;
107                #pragma ivdep
108          for (icb=0;icb< A->col_block_size;icb++) {          for (icb=0;icb< A->col_block_size;icb++) {
109            icol=icb+A->col_block_size*(A->pattern->index[iptr]-index_offset);            icol=icb+A->col_block_size*(A->pattern->index[iptr]-index_offset);
110            if (mask_col[icol]>0. || mask_row[irow]>0. ) {            if (mask_col[icol]>0. || mask_row[irow]>0. ) {
# Line 122  void Paso_SparseMatrix_nullifyRows_CSR_B Line 126  void Paso_SparseMatrix_nullifyRows_CSR_B
126    #pragma omp parallel for private(irow, iptr,icol) schedule(static)    #pragma omp parallel for private(irow, iptr,icol) schedule(static)
127    for (irow=0;irow< A->pattern->numOutput;irow++) {    for (irow=0;irow< A->pattern->numOutput;irow++) {
128        if (mask_row[irow]>0.) {        if (mask_row[irow]>0.) {
129             #pragma ivdep
130           for (iptr=A->pattern->ptr[irow]-index_offset;iptr<A->pattern->ptr[irow+1]-index_offset; iptr++) {           for (iptr=A->pattern->ptr[irow]-index_offset;iptr<A->pattern->ptr[irow+1]-index_offset; iptr++) {
131             icol=A->pattern->index[iptr]-index_offset;             icol=A->pattern->index[iptr]-index_offset;
132             if (irow==icol) {             if (irow==icol) {
# Line 142  void Paso_SparseMatrix_nullifyRows_CSR(P Line 147  void Paso_SparseMatrix_nullifyRows_CSR(P
147        for (irb=0;irb< A->row_block_size;irb++) {        for (irb=0;irb< A->row_block_size;irb++) {
148          irow=irb+A->row_block_size*ir;          irow=irb+A->row_block_size*ir;
149          if (mask_row[irow]>0. ) {          if (mask_row[irow]>0. ) {
150                   #pragma ivdep
151             for (icb=0;icb< A->col_block_size;icb++) {             for (icb=0;icb< A->col_block_size;icb++) {
152                 icol=icb+A->col_block_size*(A->pattern->index[iptr]-index_offset);                 icol=icb+A->col_block_size*(A->pattern->index[iptr]-index_offset);
153                     l=iptr*A->block_size+irb+A->row_block_size*icb;                     l=iptr*A->block_size+irb+A->row_block_size*icb;

Legend:
Removed from v.1551  
changed lines
  Added in v.1552

  ViewVC Help
Powered by ViewVC 1.1.26