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

Annotation of /trunk/paso/src/SparseMatrix_addAbsRow.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1384 - (hide annotations)
Fri Jan 11 02:29:38 2008 UTC (11 years, 10 months ago) by phornby
Original Path: temp_trunk_copy/paso/src/SparseMatrix_addAbsRow.c
File MIME type: text/plain
File size: 1572 byte(s)
Make a temp copy of the trunk before checking in the windows changes


1 ksteube 1315
2     /* $Id: SparseMatrix_addAbsRow.c 1306 2007-09-18 05:51:09Z ksteube $ */
3    
4     /*******************************************************
5     *
6     * Copyright 2003-2007 by ACceSS MNRF
7     * Copyright 2007 by University of Queensland
8     *
9     * http://esscc.uq.edu.au
10     * Primary Business: Queensland, Australia
11     * Licensed under the Open Software License version 3.0
12     * http://www.opensource.org/licenses/osl-3.0.php
13     *
14     *******************************************************/
15    
16     /***************************************************************************/
17    
18     /* Paso: SparseMatrix: adds the absolut values of row entries to an array */
19    
20     /***************************************************************************/
21    
22     /* Copyrights by ACcESS Australia 2005, 2007 */
23     /* Author: gross@access.edu.au */
24    
25     /**************************************************************/
26    
27     #include "Paso.h"
28     #include "SparseMatrix.h"
29    
30     void Paso_SparseMatrix_addAbsRow_CSR_OFFSET0(Paso_SparseMatrix* A, double* array) {
31     dim_t ir,irow,ic,icb,irb;
32     index_t iptr;
33     register double fac;
34     #pragma omp parallel for private(ir,irb,irow,fac,iptr,icb) schedule(static)
35     for (ir=0;ir< A->pattern->numOutput;ir++) {
36     for (irb=0;irb< A->row_block_size;irb++) {
37     irow=irb+A->row_block_size*ir;
38     fac=0.;
39     for (iptr=A->pattern->ptr[ir];iptr<A->pattern->ptr[ir+1]; iptr++) {
40     for (icb=0;icb< A->col_block_size;icb++)
41     fac+=ABS(A->val[iptr*A->block_size+irb+A->row_block_size*icb]);
42     }
43     array[irow]+=fac;
44     }
45     }
46     }

  ViewVC Help
Powered by ViewVC 1.1.26