~logan/ubuntu/trusty/suitesparse/4.2.1-3ubuntu1

« back to all changes in this revision

Viewing changes to CXSparse/Source/cs_cumsum.c

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2007-05-29 09:36:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529093629-zowquo0b7slkk6nc
Tags: 3.0.0-2
* suitesparse builds properly twice in a row
* Bug fix: "suitesparse - FTBFS: Broken build depens: libgfortran1-dev",
  thanks to Bastian Blank (Closes: #426349).
* Bug fix: "suitesparse_3.0.0-1: FTBFS: build-depends on
  libgfortran1-dev", thanks to Steve Langasek (Closes: #426354).

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
double cs_cumsum (CS_INT *p, CS_INT *c, CS_INT n)
4
4
{
5
5
    CS_INT i, nz = 0 ;
6
 
    CS_ENTRY nz2 = 0 ;
 
6
    double nz2 = 0 ;
7
7
    if (!p || !c) return (-1) ;     /* check inputs */
8
8
    for (i = 0 ; i < n ; i++)
9
9
    {
10
10
        p [i] = nz ;
11
11
        nz += c [i] ;
12
 
        nz2 += c [i] ;              /* also in CS_ENTRY to avoid CS_INT overflow */
 
12
        nz2 += c [i] ;              /* also in double to avoid CS_INT overflow */
13
13
        c [i] = p [i] ;             /* also copy p[0..n-1] back into c[0..n-1]*/
14
14
    }
15
15
    p [n] = nz ;