/[escript]/branches/doubleplusgood/paso/src/SparseMatrix_saveHB.cpp
ViewVC logotype

Diff of /branches/doubleplusgood/paso/src/SparseMatrix_saveHB.cpp

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

revision 4323 by jfenwick, Wed Feb 27 06:09:33 2013 UTC revision 4324 by jfenwick, Wed Mar 20 00:55:44 2013 UTC
# Line 198  void Paso_SparseMatrix_saveHB_CSC( Paso_ Line 198  void Paso_SparseMatrix_saveHB_CSC( Paso_
198          M = A_p->numRows*A_p->row_block_size;          M = A_p->numRows*A_p->row_block_size;
199          N = A_p->numCols*A_p->col_block_size;          N = A_p->numCols*A_p->col_block_size;
200    
201          row_ind = MEMALLOC( nz, dim_t );          row_ind = new dim_t [nz];
202          col_ind = MEMALLOC( nz, dim_t );          col_ind = new dim_t [nz];
203    
204          i = 0;          i = 0;
205          for( iCol=0; iCol<A_p->pattern->numOutput; iCol++ )          for( iCol=0; iCol<A_p->pattern->numOutput; iCol++ )
# Line 211  void Paso_SparseMatrix_saveHB_CSC( Paso_ Line 211  void Paso_SparseMatrix_saveHB_CSC( Paso_
211                           i++;                           i++;
212                      }                      }
213          /* get the col_ptr */          /* get the col_ptr */
214          col_ptr = MEMALLOC( (N+1), dim_t );          col_ptr = new dim_t [(N+1)];
215    
216          curr_col = 0;          curr_col = 0;
217          for(j=0; (j<nz && curr_col<N); curr_col++ ) {          for(j=0; (j<nz && curr_col<N); curr_col++ ) {
# Line 225  void Paso_SparseMatrix_saveHB_CSC( Paso_ Line 225  void Paso_SparseMatrix_saveHB_CSC( Paso_
225          generate_HB( fileHandle_p, col_ptr, row_ind, A_p->val );          generate_HB( fileHandle_p, col_ptr, row_ind, A_p->val );
226    
227          /* free the allocated memory */          /* free the allocated memory */
228          MEMFREE( col_ptr );          delete[] col_ptr;
229          MEMFREE( col_ind );          delete[] col_ind;
230          MEMFREE( row_ind );          delete[] row_ind;
231      }      }
232      return;      return;
233  }  }

Legend:
Removed from v.4323  
changed lines
  Added in v.4324

  ViewVC Help
Powered by ViewVC 1.1.26