~ubuntu-branches/ubuntu/natty/suitesparse/natty

« back to all changes in this revision

Viewing changes to CHOLMOD/MATLAB/septree.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
/* ========================================================================== */
4
4
 
5
5
/* -----------------------------------------------------------------------------
6
 
 * CHOLMOD/MATLAB Module.  Version 1.3.  Copyright (C) 2005-2006,
7
 
 * Timothy A. Davis
 
6
 * CHOLMOD/MATLAB Module.  Copyright (C) 2005-2006, Timothy A. Davis
8
7
 * The CHOLMOD/MATLAB Module is licensed under Version 2.0 of the GNU
9
8
 * General Public License.  See gpl.txt for a text of the license.
10
9
 * CHOLMOD is also available under other licenses; contact authors for details.
47
46
{
48
47
#ifndef NPARTITION
49
48
    double *p ;
50
 
    int *Cmember, *CParent ;
 
49
    Int *Cmember, *CParent ;
51
50
    cholmod_common Common, *cm ;
52
51
    double nd_oksep ;
53
 
    int nd_small, nc, n, c, j, nc_new ;
 
52
    Int nd_small, nc, n, c, j, nc_new ;
54
53
 
55
54
    /* ---------------------------------------------------------------------- */
56
55
    /* start CHOLMOD and set defaults */
57
56
    /* ---------------------------------------------------------------------- */
58
57
 
59
58
    cm = &Common ;
60
 
    cholmod_start (cm) ;
 
59
    cholmod_l_start (cm) ;
61
60
    sputil_config (SPUMONI, cm) ;
62
61
 
63
62
    /* ---------------------------------------------------------------------- */
80
79
        mexErrMsgTxt ("invalid inputs") ;
81
80
    }
82
81
 
83
 
    CParent = cholmod_malloc (nc, sizeof (int), cm) ;
84
 
    Cmember = cholmod_malloc (n, sizeof (int), cm) ;
 
82
    CParent = cholmod_l_malloc (nc, sizeof (Int), cm) ;
 
83
    Cmember = cholmod_l_malloc (n, sizeof (Int), cm) ;
85
84
 
86
85
    p = mxGetPr (pargin [0]) ;
87
86
    for (c = 0 ; c < nc ; c++)
107
106
    /* collapse the tree */
108
107
    /* ---------------------------------------------------------------------- */
109
108
 
110
 
    nc_new = cholmod_collapse_septree (n, nc, nd_oksep, nd_small, CParent,
 
109
    nc_new = cholmod_l_collapse_septree (n, nc, nd_oksep, nd_small, CParent,
111
110
        Cmember, cm) ; 
112
111
    if (nc_new < 0)
113
112
    {
129
128
    /* free workspace */
130
129
    /* ---------------------------------------------------------------------- */
131
130
 
132
 
    cholmod_free (nc, sizeof (int), CParent, cm) ;
133
 
    cholmod_free (n, sizeof (int), Cmember, cm) ;
134
 
    cholmod_finish (cm) ;
135
 
    cholmod_print_common (" ", cm) ;
 
131
    cholmod_l_free (nc, sizeof (Int), CParent, cm) ;
 
132
    cholmod_l_free (n, sizeof (Int), Cmember, cm) ;
 
133
    cholmod_l_finish (cm) ;
 
134
    cholmod_l_print_common (" ", cm) ;
136
135
    /*
137
136
    if (cm->malloc_count != 0) mexErrMsgTxt ("!") ;
138
137
    */