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

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

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

revision 511 by gross, Mon Feb 6 06:32:06 2006 UTC revision 512 by gross, Fri Feb 10 07:04:14 2006 UTC
# Line 207  void  Paso_SystemMatrix_MatrixVector_CSR Line 207  void  Paso_SystemMatrix_MatrixVector_CSR
207          #pragma omp for private(irow,iptr,reg) schedule(static)          #pragma omp for private(irow,iptr,reg) schedule(static)
208      for (irow=0;irow< A->pattern->n_ptr;++irow) {      for (irow=0;irow< A->pattern->n_ptr;++irow) {
209            reg=0.;            reg=0.;
           #pragma swp  
210        for (iptr=(A->pattern->ptr[irow]);iptr<(A->pattern->ptr[irow+1]); ++iptr) {        for (iptr=(A->pattern->ptr[irow]);iptr<(A->pattern->ptr[irow+1]); ++iptr) {
211            reg += A->val[iptr] * in[A->pattern->index[iptr]];            reg += A->val[iptr] * in[A->pattern->index[iptr]];
212        }        }
213        out[irow] += alpha * reg;        out[irow] += alpha * reg;
214      }      }
215      } else if (A ->col_block_size==2 && A->row_block_size ==2) {      } else if (A ->col_block_size==2 && A->row_block_size ==2) {
216          #pragma omp for private(ir,iptr,irb,icb,irow,icol,reg1,reg2,in1,in2,Aiptr,A00,A10,A01,A11) schedule(static)          #pragma omp for private(ir,reg1,reg2,iptr,ic,Aiptr,in1,in2,A00,A10,A01,A11) schedule(static)
217      for (ir=0;ir< A->pattern->n_ptr;ir++) {      for (ir=0;ir< A->pattern->n_ptr;ir++) {
218            reg1=0.;            reg1=0.;
219            reg2=0.;            reg2=0.;
           #pragma swp  
220        for (iptr=A->pattern->ptr[ir];iptr<A->pattern->ptr[ir+1]; iptr++) {        for (iptr=A->pattern->ptr[ir];iptr<A->pattern->ptr[ir+1]; iptr++) {
221             ic=2*(A->pattern->index[iptr]);             ic=2*(A->pattern->index[iptr]);
222                 Aiptr=iptr*4;                 Aiptr=iptr*4;
# Line 235  void  Paso_SystemMatrix_MatrixVector_CSR Line 233  void  Paso_SystemMatrix_MatrixVector_CSR
233        out[1+2*ir] += alpha * reg2;        out[1+2*ir] += alpha * reg2;
234      }      }
235      } else if (A ->col_block_size==3 && A->row_block_size ==3) {      } else if (A ->col_block_size==3 && A->row_block_size ==3) {
236          #pragma omp for private(ir,iptr,irb,icb,irow,icol,reg1,reg2,reg3,in1,in2,in3,Aiptr,A00,A10,A20,A01,A11,A21,A02,A12,A22) schedule(static)          #pragma omp for private(ir,reg1,reg2,reg3,iptr,ic,Aiptr,in1,in2,in3,A00,A10,A20,A01,A11,A21,A02,A12,A22) schedule(static)
237      for (ir=0;ir< A->pattern->n_ptr;ir++) {      for (ir=0;ir< A->pattern->n_ptr;ir++) {
238            reg1=0.;            reg1=0.;
239            reg2=0.;            reg2=0.;
240            reg3=0.;            reg3=0.;
           #pragma swp  
241        for (iptr=A->pattern->ptr[ir];iptr<A->pattern->ptr[ir+1]; iptr++) {        for (iptr=A->pattern->ptr[ir];iptr<A->pattern->ptr[ir+1]; iptr++) {
242             ic=3*(A->pattern->index[iptr]);             ic=3*(A->pattern->index[iptr]);
243                 Aiptr=iptr*9;                 Aiptr=iptr*9;
# Line 315  void  Paso_SystemMatrix_MatrixVector_CSR Line 312  void  Paso_SystemMatrix_MatrixVector_CSR
312        out[irow] += alpha * reg;        out[irow] += alpha * reg;
313      }      }
314      } else if (A ->col_block_size==2 && A->row_block_size ==2) {      } else if (A ->col_block_size==2 && A->row_block_size ==2) {
315          #pragma omp for private(ir,iptr,irb,icb,irow,icol,reg1,reg2) schedule(static)          #pragma omp for private(ir,reg1,reg2,iptr,ic) schedule(static)
316      for (ir=0;ir< A->pattern->n_ptr;ir++) {      for (ir=0;ir< A->pattern->n_ptr;ir++) {
317            reg1=0.;            reg1=0.;
318            reg2=0.;            reg2=0.;
# Line 328  void  Paso_SystemMatrix_MatrixVector_CSR Line 325  void  Paso_SystemMatrix_MatrixVector_CSR
325        out[1+2*ir] += alpha * reg2;        out[1+2*ir] += alpha * reg2;
326      }      }
327      } else if (A ->col_block_size==3 && A->row_block_size ==3) {      } else if (A ->col_block_size==3 && A->row_block_size ==3) {
328          #pragma omp for private(ir,iptr,irb,icb,irow,icol,reg1,reg2,reg3) schedule(static)          #pragma omp for private(ir,reg1,reg2,reg3,iptr,ic) schedule(static)
329      for (ir=0;ir< A->pattern->n_ptr;ir++) {      for (ir=0;ir< A->pattern->n_ptr;ir++) {
330            reg1=0.;            reg1=0.;
331            reg2=0.;            reg2=0.;

Legend:
Removed from v.511  
changed lines
  Added in v.512

  ViewVC Help
Powered by ViewVC 1.1.26