5164
|
1 /* ========================================================================== */ |
|
2 /* === UMF_symbolic_usage =================================================== */ |
|
3 /* ========================================================================== */ |
|
4 |
|
5 /* -------------------------------------------------------------------------- */ |
|
6 /* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ |
|
7 /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ |
|
8 /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ |
|
9 /* -------------------------------------------------------------------------- */ |
|
10 |
|
11 /* Returns the final size of the Symbolic object, in Units */ |
|
12 |
|
13 #include "umf_internal.h" |
|
14 |
|
15 GLOBAL double UMF_symbolic_usage |
|
16 ( |
|
17 Int n_row, |
|
18 Int n_col, |
|
19 Int nchains, |
|
20 Int nfr, |
|
21 Int esize, /* zero if no dense rows. Otherwise, equal to the |
|
22 * number of non-singleton, non-empty columns */ |
|
23 Int prefer_diagonal |
|
24 ) |
|
25 { |
|
26 double units ; |
|
27 |
|
28 units = |
|
29 DUNITS (SymbolicType, 1) /* Symbolic structure */ |
|
30 + 2 * DUNITS (Int, n_col+1) /* Cperm_init, Cdeg */ |
|
31 + 2 * DUNITS (Int, n_row+1) /* Rperm_init, Rdeg */ |
|
32 + 3 * DUNITS (Int, nchains+1) /* Chain_ */ |
|
33 + 4 * DUNITS (Int, nfr+1) ; /* Front_ */ |
|
34 |
|
35 /* if dense rows are present */ |
|
36 units += DUNITS (Int, esize) ; /* Esize */ |
|
37 |
|
38 /* for diagonal pivoting */ |
|
39 if (prefer_diagonal) |
|
40 { |
|
41 units += DUNITS (Int, n_col+1) ; /* Diagonal_map */ |
|
42 } |
|
43 |
|
44 return (units) ; |
|
45 } |