/[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 1552 by gross, Thu May 8 08:52:41 2008 UTC revision 2548 by jfenwick, Mon Jul 20 06:20:06 2009 UTC
# Line 1  Line 1 
1    
 /* $Id: SparseMatrix_nullifyRowsAndCols.c 1306 2007-09-18 05:51:09Z ksteube $ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2009 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  /**************************************************************/  /**************************************************************/
16    
# Line 27  Line 26 
26    
27  /**************************************************************/  /**************************************************************/
28    
 /* Copyrights by ACcESS Australia 2003, 2007 */  
29  /* Author: gross@access.edu.au */  /* Author: gross@access.edu.au */
30    
31  /**************************************************************/  /**************************************************************/
# Line 74  void Paso_SparseMatrix_nullifyRowsAndCol Line 72  void Paso_SparseMatrix_nullifyRowsAndCol
72  }  }
73  void Paso_SparseMatrix_nullifyRowsAndCols_CSC(Paso_SparseMatrix* A, double* mask_row, double* mask_col, double main_diagonal_value) {  void Paso_SparseMatrix_nullifyRowsAndCols_CSC(Paso_SparseMatrix* A, double* mask_row, double* mask_col, double main_diagonal_value) {
74    index_t index_offset=(A->type & MATRIX_FORMAT_OFFSET1 ? 1:0);    index_t index_offset=(A->type & MATRIX_FORMAT_OFFSET1 ? 1:0);
75    index_t ir,icol,iptr,icb,irb,irow,ic,l;    index_t icol,iptr,icb,irb,irow,ic,l;
76    #pragma omp parallel for private(l,irow, iptr,icol,ic,irb,icb) schedule(static)    #pragma omp parallel for private(l,irow, iptr,icol,ic,irb,icb) schedule(static)
77    for (ic=0;ic< A->pattern->numOutput;ic++) {    for (ic=0;ic< A->pattern->numOutput;ic++) {
78      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++) {
# Line 98  void Paso_SparseMatrix_nullifyRowsAndCol Line 96  void Paso_SparseMatrix_nullifyRowsAndCol
96  }  }
97  void Paso_SparseMatrix_nullifyRowsAndCols_CSR(Paso_SparseMatrix* A, double* mask_row, double* mask_col, double main_diagonal_value) {  void Paso_SparseMatrix_nullifyRowsAndCols_CSR(Paso_SparseMatrix* A, double* mask_row, double* mask_col, double main_diagonal_value) {
98    index_t index_offset=(A->type & MATRIX_FORMAT_OFFSET1 ? 1:0);    index_t index_offset=(A->type & MATRIX_FORMAT_OFFSET1 ? 1:0);
99    index_t ir,icol,iptr,icb,irb,irow,ic,l;    index_t ir,icol,iptr,icb,irb,irow,l;
100    #pragma omp parallel for private(l,irow, iptr,icol,ir,irb,icb) schedule(static)    #pragma omp parallel for private(l,irow, iptr,icol,ir,irb,icb) schedule(static)
101    for (ir=0;ir< A->pattern->numOutput;ir++) {    for (ir=0;ir< A->pattern->numOutput;ir++) {
102      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++) {
# Line 140  void Paso_SparseMatrix_nullifyRows_CSR_B Line 138  void Paso_SparseMatrix_nullifyRows_CSR_B
138  }  }
139  void Paso_SparseMatrix_nullifyRows_CSR(Paso_SparseMatrix* A, double* mask_row, double main_diagonal_value) {  void Paso_SparseMatrix_nullifyRows_CSR(Paso_SparseMatrix* A, double* mask_row, double main_diagonal_value) {
140    index_t index_offset=(A->type & MATRIX_FORMAT_OFFSET1 ? 1:0);    index_t index_offset=(A->type & MATRIX_FORMAT_OFFSET1 ? 1:0);
141    index_t ir,icol,iptr,icb,irb,irow,ic,l;    index_t ir,icol,iptr,icb,irb,irow,l;
142    #pragma omp parallel for private(l,irow, iptr,icol,ir,irb,icb) schedule(static)    #pragma omp parallel for private(l,irow, iptr,icol,ir,irb,icb) schedule(static)
143    for (ir=0;ir< A->pattern->numOutput;ir++) {    for (ir=0;ir< A->pattern->numOutput;ir++) {
144      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++) {

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

  ViewVC Help
Powered by ViewVC 1.1.26