1
/* ========================================================================== */
2
/* === umf_internal.h ======================================================= */
3
/* ========================================================================== */
5
/* -------------------------------------------------------------------------- */
6
/* UMFPACK Version 4.1 (Apr. 30, 2003), Copyright (c) 2003 by Timothy A. */
7
/* Davis. All Rights Reserved. See ../README for License. */
8
/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */
9
/* web: http://www.cise.ufl.edu/research/sparse/umfpack */
10
/* -------------------------------------------------------------------------- */
13
This file is for internal use in UMFPACK itself, and should not be included
14
in user code. Use umfpack.h instead. User-accessible file names and
15
routine names all start with the letters "umfpack_". Non-user-accessible
16
file names and routine names all start with "umf_".
19
/* -------------------------------------------------------------------------- */
20
/* ANSI standard include files */
21
/* -------------------------------------------------------------------------- */
23
/* from float.h: DBL_EPSILON */
26
/* from string.h: strcmp */
29
/* when debugging, assert.h and the assert macro are used (see umf_dump.h) */
31
/* -------------------------------------------------------------------------- */
33
/* -------------------------------------------------------------------------- */
35
#if defined (__sun) || defined (MSOL2) || defined (ARCH_SOL2)
37
#define UMFPACK_ARCHITECTURE "Sun Solaris"
39
#elif defined (__sgi) || defined (MSGI) || defined (ARCH_SGI)
41
#define UMFPACK_ARCHITECTURE "SGI Irix"
43
#elif defined (__linux) || defined (MGLNX86) || defined (ARCH_GLNX86)
45
#define UMFPACK_ARCHITECTURE "Linux"
47
#elif defined (_AIX) || defined (MIBM_RS) || defined (ARCH_IBM_RS)
49
#define UMFPACK_ARCHITECTURE "IBM AIX"
51
#elif defined (__alpha) || defined (MALPHA) || defined (ARCH_ALPHA)
53
#define UMFPACK_ARCHITECTURE "Compaq Alpha"
55
#elif defined (__WIN32) || defined (_WIN32) || defined (_win32) || defined (__win32) || defined (WIN32)
57
#define UMFPACK_ARCHITECTURE "Microsoft Windows"
59
#elif defined (__hppa) || defined (__hpux) || defined (MHPUX) || defined (ARCH_HPUX)
61
#define UMFPACK_ARCHITECTURE "HP Unix"
63
#elif defined (__hp700) || defined (MHP700) || defined (ARCH_HP700)
65
#define UMFPACK_ARCHITECTURE "HP 700 Unix"
68
/* If the architecture is unknown, and you call the BLAS, you may need to */
69
/* define BLAS_BY_VALUE, BLAS_NO_UNDERSCORE, and/or BLAS_CHAR_ARG yourself. */
70
#define UMFPACK_ARCHITECTURE "unknown"
74
/* -------------------------------------------------------------------------- */
75
/* basic definitions (see also amd_internal.h) */
76
/* -------------------------------------------------------------------------- */
78
#define ONES_COMPLEMENT(r) (-(r)-1)
80
/* -------------------------------------------------------------------------- */
81
/* AMD include file */
82
/* -------------------------------------------------------------------------- */
84
/* stdio.h, stdlib.h, limits.h, and math.h, NDEBUG definition,
85
* assert.h, and MATLAB include files */
86
#include "amd_internal.h"
88
/* -------------------------------------------------------------------------- */
89
/* Real/complex and int/long definitions, double relops */
90
/* -------------------------------------------------------------------------- */
92
#include "umf_version.h"
94
/* -------------------------------------------------------------------------- */
95
/* Compile-time configurations */
96
/* -------------------------------------------------------------------------- */
98
#include "umf_config.h"
100
/* -------------------------------------------------------------------------- */
101
/* umfpack include file */
102
/* -------------------------------------------------------------------------- */
106
/* -------------------------------------------------------------------------- */
107
/* for contents of Info. This must correlate with umfpack.h */
108
/* -------------------------------------------------------------------------- */
110
#define ESTIMATE (UMFPACK_NUMERIC_SIZE_ESTIMATE - UMFPACK_NUMERIC_SIZE)
113
/* -------------------------------------------------------------------------- */
114
/* get a parameter from the Control array */
115
/* -------------------------------------------------------------------------- */
117
#define GET_CONTROL(i,default) \
118
((Control != (double *) NULL) ? \
119
(SCALAR_IS_NAN (Control [i]) ? default : Control [i]) \
122
/* -------------------------------------------------------------------------- */
123
/* for clearing the external degree counters */
124
/* -------------------------------------------------------------------------- */
126
#define MAX_MARK(n) Int_MAX - (2*(n)+1)
128
/* -------------------------------------------------------------------------- */
129
/* convert number of Units to MBytes */
130
/* -------------------------------------------------------------------------- */
132
#define MBYTES(units) (((units) * sizeof (Unit)) / 1048576.0)
134
/* -------------------------------------------------------------------------- */
135
/* dense row/column macro */
136
/* -------------------------------------------------------------------------- */
138
/* In order for a row or column to be treated as "dense", it must have more */
139
/* entries than the value returned by this macro. n is the dimension of the */
140
/* matrix, and alpha is the dense row/column control parameter. */
142
/* Note: this is not defined if alpha is NaN or Inf: */
143
#define UMFPACK_DENSE_DEGREE_THRESHOLD(alpha,n) \
144
((Int) MAX (16.0, (alpha) * 16.0 * sqrt ((double) (n))))
146
/* -------------------------------------------------------------------------- */
148
/* -------------------------------------------------------------------------- */
150
#define PRINTFk(k,params) { if (prl >= (k)) { PRINTF (params) ; } }
151
#define PRINTF1(params) PRINTFk (1, params)
152
#define PRINTF2(params) PRINTFk (2, params)
153
#define PRINTF3(params) PRINTFk (3, params)
154
#define PRINTF4(params) PRINTFk (4, params)
155
#define PRINTF5(params) PRINTFk (5, params)
156
#define PRINTF6(params) PRINTFk (6, params)
158
/* -------------------------------------------------------------------------- */
159
/* Fixed control parameters */
160
/* -------------------------------------------------------------------------- */
162
/* maximum number of columns to consider at one time, in a single front */
163
#define MAX_CANDIDATES 128
165
/* reduce Numeric->Memory request by this ratio, if allocation fails */
166
#define UMF_REALLOC_REDUCTION (0.95)
168
/* increase Numeric->Memory request by this ratio, if we need more */
169
#define UMF_REALLOC_INCREASE (1.2)
171
/* increase the dimensions of the current frontal matrix by this factor
172
* when it needs to grow. */
173
#define UMF_FRONTAL_GROWTH (1.2)
175
/* largest BLAS block size permitted */
178
/* if abs (y) < RECIPROCAL_TOLERANCE, then compute x/y. Otherwise x*(1/y).
179
* Ignored if NRECIPROCAL is defined */
180
#define RECIPROCAL_TOLERANCE 1e-12
182
/* -------------------------------------------------------------------------- */
183
/* Memory allocator */
184
/* -------------------------------------------------------------------------- */
186
/* The MATLAB mexFunction uses MATLAB's memory manager, while the C-callable
187
* AMD library uses the ANSI C malloc, free, and realloc routines. To use
188
* the mx* memory allocation routines, use -DNUTIL when compiling.
195
#ifdef MATLAB_MEX_FILE
199
/* These functions simply terminate the mexFunction if they fail to allocate
200
* memory. That's too restrictive for UMFPACK. */
201
#define ALLOCATE mxMalloc
203
#define REALLOCATE mxRealloc
207
/* Use internal MATLAB memory allocation routines, used by built-in MATLAB
208
* functions. These are not documented, but are available for use. Their
209
* prototypes are in util.h, but that file is not provided to the MATLAB user.
210
* The advantage of using these routines is that they return NULL if out of
211
* memory, instead of terminating the mexFunction. UMFPACK attempts to allocate
212
* extra space for "elbow room", and then reduces its request if the memory is
213
* not available. That strategy doesn't work with the mx* routines.
215
void *utMalloc (size_t size) ;
216
void utFree (void *p) ;
217
void *utRealloc (void *p, size_t size) ;
218
#define ALLOCATE utMalloc
220
#define REALLOCATE utRealloc
226
/* Compiling as a built-in routine. Since out-of-memory conditions are checked
227
* after every allocation, we can use ut* routines here. */
228
#define ALLOCATE utMalloc
230
#define REALLOCATE utRealloc
234
/* use the ANSI C memory allocation routines */
235
#define ALLOCATE malloc
237
#define REALLOCATE realloc
242
/* -------------------------------------------------------------------------- */
243
/* Memory space definitions */
244
/* -------------------------------------------------------------------------- */
246
/* for memory alignment - assume double has worst case alignment */
247
typedef double Align ;
249
/* get number of bytes required to hold n items of a type: */
250
/* note that this will not overflow, because sizeof (type) is always */
251
/* greater than or equal to sizeof (Int) >= 2 */
252
#define BYTES(type,n) (sizeof (type) * (n))
254
/* ceiling of (b/u). Assumes b >= 0 and u > 0 */
255
#define CEILING(b,u) (((b) + (u) - 1) / (u))
257
/* get number of Units required to hold n items of a type: */
258
#define UNITS(type,n) (CEILING (BYTES (type, n), sizeof (Unit)))
260
/* same as DUNITS, but use double instead of int to avoid overflow */
261
#define DUNITS(type,n) (ceil (BYTES (type, (double) n) / sizeof (Unit)))
264
{ /* memory is allocated in multiples of Unit */
268
size, /* size, in Units, of the block, excl. header block */
269
/* size >= 0: block is in use */
270
/* size < 0: block is free, of |size| Units */
271
prevsize ; /* size, in Units, of preceding block in S->Memory */
272
/* during garbage_collection, prevsize is set to -e-1 */
273
/* for element e, or positive (and thus a free block) */
275
} header ; /* block header */
276
Align xxxxxx ; /* force alignment of blocks (xxxxxx is never used) */
279
typedef union Unit_union Unit ;
281
/* get the size of an allocated block */
282
#define GET_BLOCK_SIZE(p) (((p)-1)->header.size)
284
/* -------------------------------------------------------------------------- */
286
/* -------------------------------------------------------------------------- */
289
NUMERIC_VALID and SYMBOLIC_VALID:
290
The different values of SYBOLIC_VALID and NUMERIC_VALID are chosen as a
291
first defense against corrupted *Symbolic or *Numeric pointers passed to an
292
UMFPACK routine. They also ensure that the objects are used only by the
293
same version that created them (umfpack_di_*, umfpack_dl_*, umfpack_zi_*,
294
or umfpack_zl_*). The values have also been changed since prior releases of
295
the code to ensure that all routines that operate on the objects are of the
296
same release. The values themselves are purely arbitrary. The are less
297
than the ANSI C required minimums of INT_MAX and LONG_MAX, respectively.
301
#define NUMERIC_VALID 15974
302
#define SYMBOLIC_VALID 41934
305
#define NUMERIC_VALID 399789120
306
#define SYMBOLIC_VALID 399192913
309
#define NUMERIC_VALID 17954
310
#define SYMBOLIC_VALID 40923
313
#define NUMERIC_VALID 129987654
314
#define SYMBOLIC_VALID 110291234
317
typedef struct /* NumericType */
320
flops, /* "true" flop count */
321
relpt, /* relative pivot tolerance used */
322
relpt2, /* relative pivot tolerance used for sym. */
323
alloc_init, /* initial allocation of Numeric->memory */
324
front_alloc_init, /* frontal matrix allocation parameter */
325
rsmin, /* smallest row sum */
326
rsmax, /* largest row sum */
327
min_udiag, /* smallest abs value on diagonal of D */
328
max_udiag, /* smallest abs value on diagonal of D */
329
rcond ; /* min (D) / max (D) */
334
Int valid ; /* set to NUMERIC_VALID, for validity check */
336
/* Memory space for A and LU factors */
338
*Memory ; /* working memory for A and LU factors */
340
ihead, /* pointer to tail of LU factors, in Numeric->Memory */
341
itail, /* pointer to top of elements & tuples, */
342
/* in Numeric->Memory */
343
ibig, /* pointer to largest free block seen in tail */
344
size ; /* size of Memory, in Units */
347
*Rperm, /* pointer to row perm array, size: n+1 */
348
/* after UMF_kernel: Rperm [new] = old */
349
/* during UMF_kernel: Rperm [old] = new */
350
*Cperm, /* pointer to col perm array, size: n+1 */
351
/* after UMF_kernel: Cperm [new] = old */
352
/* during UMF_kernel: Cperm [old] = new */
354
*Upos, /* see UMFPACK_get_numeric for a description */
360
*Upattern ; /* pattern of last row of U (if singular) */
363
ulen, /* length of Upattern */
364
npiv, /* number of structural pivots found (sprank approx) */
365
nnzpiv ; /* number of numerical (nonzero) pivots found */
368
*D ; /* D [i] is the diagonal entry of U */
371
double *Rs ; /* scale factors for the rows of A and b */
372
/* do_recip FALSE: Divide row i by Rs [i] */
373
/* do_recip TRUE: Multiply row i by Rs [i] */
376
n_row, n_col, /* A is n_row-by-n_row */
377
n1 ; /* number of singletons */
379
/* for information only: */
381
tail_usage, /* amount of memory allocated in tail */
382
/* head_usage is Numeric->ihead */
383
init_usage, /* memory usage just after UMF_kernel_init */
384
max_usage, /* peak memory usage (excludes internal and external */
385
/* fragmentation in the tail) */
386
ngarbage, /* number of garbage collections performed */
387
nrealloc, /* number of reallocations performed */
388
ncostly, /* number of costly reallocations performed */
389
isize, /* size of integer pattern of L and U */
390
nLentries, /* number of entries in L, excluding diagonal */
391
nUentries, /* number of entries in U, including diagonal */
392
/* Some entries may be numerically zero. */
393
lnz, /* number of nonzero entries in L, excl. diagonal */
394
unz, /* number of nonzero entries in U, excl. diagonal */
395
maxfrsize ; /* largest actual front size */
397
Int maxnrows, maxncols ; /* not the same as Symbolic->maxnrows/cols* */
403
/* -------------------------------------------------------------------------- */
404
/* Element tuples for connecting elements together in a matrix */
405
/* -------------------------------------------------------------------------- */
407
typedef struct /* Tuple */
409
/* The (e,f) tuples for the element lists */
412
f ; /* contribution to the row/col appears at this offset */
416
#define TUPLES(t) MAX (4, (t) + 1)
418
/* Col_degree is aliased with Cperm, and Row_degree with Rperm */
419
#define NON_PIVOTAL_COL(col) (Col_degree [col] >= 0)
420
#define NON_PIVOTAL_ROW(row) (Row_degree [row] >= 0)
422
/* -------------------------------------------------------------------------- */
424
/* -------------------------------------------------------------------------- */
426
typedef struct /* Element */
430
cdeg, /* external column degree + cdeg0 offset */
431
rdeg, /* external row degree + rdeg0 offset */
432
nrowsleft, /* number of rows remaining */
433
ncolsleft, /* number of columns remaining */
434
nrows, /* number of rows */
435
ncols, /* number of columns */
436
next ; /* for list link of sons, used during assembly only */
438
/* followed in memory by:
440
col [0..ncols-1], column indices of this element
441
row [0..nrows-1] ; row indices of this element
442
Entry (suitably aligned, see macro below)
443
C [0...nrows-1, 0...ncols-1] ;
444
size of C is nrows*ncols Entry's
449
/* macros for computing pointers to row/col indices, and contribution block: */
451
#define GET_ELEMENT_SIZE(nr,nc) \
452
(UNITS (Element, 1) + UNITS (Int, (nc) + (nr)) + UNITS (Entry, (nc) * (nr)))
454
#define DGET_ELEMENT_SIZE(nr,nc) \
455
(DUNITS (Element, 1) + DUNITS (Int, (nc) + (nr)) + DUNITS (Entry, (nc) * (nr)))
457
#define GET_ELEMENT_COLS(ep,p,Cols) { \
458
ASSERT (p != (Unit *) NULL) ; \
459
ASSERT (p >= Numeric->Memory + Numeric->itail) ; \
460
ASSERT (p <= Numeric->Memory + Numeric->size) ; \
461
ep = (Element *) p ; \
462
p += UNITS (Element, 1) ; \
466
#define GET_ELEMENT_PATTERN(ep,p,Cols,Rows,ncm) { \
467
GET_ELEMENT_COLS (ep, p, Cols) ; \
469
Rows = Cols + ncm ; \
472
#define GET_ELEMENT(ep,p,Cols,Rows,ncm,nrm,C) { \
473
GET_ELEMENT_PATTERN (ep, p, Cols, Rows, ncm) ; \
475
p += UNITS (Int, ncm + nrm) ; \
479
/* -------------------------------------------------------------------------- */
480
/* Work data structure */
481
/* -------------------------------------------------------------------------- */
484
This data structure holds items needed only during factorization.
485
All of this is freed when UMFPACK_numeric completes. Note that some of
486
it is stored in the tail end of Numeric->S (namely, the Tuples and the
490
typedef struct /* WorkType */
493
/* ---------------------------------------------------------------------- */
494
/* information about each row and col of A */
495
/* ---------------------------------------------------------------------- */
498
Row_tuples: pointer to tuple list (alias with Numeric->Uip)
499
Row_tlen: number of tuples (alias with Numeric->Uilen)
500
Col_tuples: pointer to tuple list (alias with Numeric->Lip)
501
Col_tlen: number of tuples (alias with Numeric->Lilen)
502
Row_degree: degree of the row or column (alias Numeric->Rperm)
503
Col_degree: degree of the row or column (alias Numeric->Cperm)
505
The Row_degree and Col_degree are MATLAB-style colmmd approximations,
506
are equal to the sum of the sizes of the elements (contribution blocks)
507
in each row and column. They are maintained when elements are created
508
and assembled. They are used only during the pivot row and column
509
search. They are not needed to represent the pattern of the remaining
513
/* ---------------------------------------------------------------------- */
514
/* information about each element */
515
/* ---------------------------------------------------------------------- */
517
Int *E ; /* E [0 .. Work->elen-1] element "pointers" */
518
/* (offsets in Numeric->Memory) */
520
/* ---------------------------------------------------------------------- */
521
/* generic workspace */
522
/* ---------------------------------------------------------------------- */
524
Entry *Wx, *Wy ; /* each of size maxnrows+1 */
526
Int /* Sizes: nn = MAX (n_row, n_col) */
529
*Wm, /* maxnrows+1 */
530
*Wio, /* maxncols+1 */
531
*Woi, /* maxncols+1 */
532
*Woo, /* MAX (maxnrows,maxncols)+1 */
533
*Wrow, /* pointer to Fcols, Wio, or Woi */
534
*NewRows, /* list of rows to scan */
535
*NewCols ; /* list of cols to scan */
537
/* ---------------------------------------------------------------------- */
540
*Lpattern, /* pattern of column of L, for one Lchain */
541
*Upattern, /* pattern of row of U, for one Uchain */
542
ulen, llen ; /* length of Upattern and Lpattern */
545
*Diagonal_map, /* used for symmetric pivoting, of size nn+1 */
546
*Diagonal_imap ;/* used for symmetric pivoting, of size nn+1 */
548
/* ---------------------------------------------------------------------- */
551
n_row, n_col, /* matrix is n_row-by-n_col */
552
nz, /* nonzeros in the elements for this matrix */
553
n1, /* number of row and col singletons */
554
elen, /* max possible number of elements */
555
npiv, /* number of pivot rows and columns so far */
556
ndiscard, /* number of discarded pivot columns */
558
nel, /* elements in use are in the range 1..nel */
563
Candidates [MAX_CANDIDATES], /* current candidate pivot columns */
564
nCandidates, /* number of candidates in Candidate set */
568
ncand, /* number of candidates (some not in Candidates[ ]) */
569
nextcand, /* next candidate to place in Candidate search set */
572
pivrow, /* current pivot row */
573
pivcol, /* current pivot column */
574
do_extend, /* true if the next pivot extends the current front */
575
do_update, /* true if update should be applied */
576
nforced, /* number of forced updates because of frontal growth */
582
frontid, /* id of current frontal matrix */
583
nfr ; /* number of frontal matrices */
585
/* ---------------------------------------------------------------------- */
586
/* For row-merge tree */
587
/* ---------------------------------------------------------------------- */
592
/* ---------------------------------------------------------------------- */
593
/* current frontal matrix, F */
594
/* ---------------------------------------------------------------------- */
600
*Flublock, /* LU block, nb-by-nb */
601
*Flblock, /* L block, fnr_curr-by-nb */
602
*Fublock, /* U block, nb-by-fnc_curr, or U' fnc_curr-by-nb */
603
*Fcblock ; /* C block, fnr_curr-by-fnc_curr */
606
*Frows, /* Frows [0.. ]: row indices of F */
608
*Fcols, /* Fcols [0.. ]: column indices of F */
610
*Frpos, /* position of row indices in F, or -1 if not present */
611
/* if Frows[i] == row, then Frpos[row] == i */
613
*Fcpos, /* position of col indices in F, or -1 if not present */
614
/* if Fcols[j] == col, then */
615
/* Fcpos[col] == j*Work->fnr_curr */
617
fnrows, /* number of rows in contribution block in F */
618
fncols, /* number of columns in contribution block in F */
619
fnr_curr, /* maximum # of rows in F (leading dimension) */
620
fnc_curr, /* maximum # of columns in F */
621
fcurr_size, /* current size of F */
622
fnrows_max, /* max possible column-dimension (max # of rows) of F */
623
fncols_max, /* max possible row-dimension (max # of columns) of F */
625
fnpiv, /* number of pivots in F */
626
fnzeros, /* number of explicit zero entries in LU block */
627
fscan_row, /* where to start scanning rows of F in UMF_assemble */
628
fscan_col, /* where to start scanning cols of F in UMF_assemble */
629
fnrows_new, /* number of new row indices in F after pivot added */
630
fncols_new, /* number of new col indices in F after pivot added */
631
pivrow_in_front, /* true if current pivot row in Frows */
632
pivcol_in_front ; /* true if current pivot column in Fcols */
634
/* ----------------------------------------------------------------------
635
* Current frontal matrix
636
* ----------------------------------------------------------------------
637
* The current frontal matrix is held as a single block of memory allocated
638
* from the "tail" end of Numeric->Memory. It is subdivided into four
639
* parts: an LU block, an L block, a U block, and a C block.
641
* Let k = fnpiv, r = fnrows, and c = fncols for the following discussion.
642
* Let dr = fnr_curr and dc = fnc_curr. Note that r <= dr and c <= dc.
644
* The LU block is of dimension nb-by-nb. The first k-by-k part holds the
645
* "diagonal" part of the LU factors for these k pivot rows and columns.
646
* The k pivot row and column indices in this part are Pivrow [0..k-1] and
647
* Pivcol [0..k-1], respectively.
649
* The L block is of dimension dr-by-nb. It holds the k pivot columns,
650
* except for the leading k-by-k part in the LU block. Only the leading
651
* r-by-k part is in use.
653
* The U block is of dimension dc-by-nb. It holds the k pivot rows,
654
* except for the leading k-by-k part in the LU block. It is stored in
655
* row-oriented form. Only the leading c-by-k part is in use.
657
* The C block is of dimension dr-by-dc. It holds the current contribution
658
* block. Only the leading r-by-c part is in use. The column indices in
659
* the C block are Fcols [0..c-1], and the row indices are Frows [0..r-1].
661
* dr is always odd, to avoid bad cache behavior.
667
/* -------------------------------------------------------------------------- */
669
/* -------------------------------------------------------------------------- */
672
This is is constructed by UMFPACK_symbolic, and is needed by UMFPACK_numeric
673
to factor the matrix.
676
typedef struct /* SymbolicType */
680
num_mem_usage_est, /* estimated max Numeric->Memory size */
681
num_mem_size_est, /* estimated final Numeric->Memory size */
682
peak_sym_usage, /* peak Symbolic and SymbolicWork usage */
683
sym, /* symmetry of pattern */
684
dnum_mem_init_usage, /* min Numeric->Memory for UMF_kernel_init */
685
amd_lunz, /* nz in LU for AMD, with symmetric pivoting */
686
lunz_bound ; /* max nx in LU, for arbitrary row pivoting */
688
Int valid, /* set to SYMBOLIC_VALID, for validity check */
694
maxnrows, /* largest number of rows in any front */
695
maxncols, /* largest number of columns in any front */
696
*Front_npivcol, /* Front_npivcol [j] = size of jth supercolumn*/
697
*Front_1strow, /* first row index in front j */
698
*Front_leftmostdesc, /* leftmost desc of front j */
699
*Front_parent, /* super-column elimination tree */
700
*Cperm_init, /* initial column ordering */
701
*Rperm_init, /* initial row ordering */
705
n1, /* number of singletons */
706
nempty, /* MIN (nempty_row, nempty_col) */
707
*Diagonal_map, /* initial "diagonal" (after 2by2) */
708
esize, /* size of Esize array */
710
n_row, n_col, /* matrix A is n_row-by-n_col */
711
nz, /* nz of original matrix */
712
nb, /* block size for BLAS 3 */
713
num_mem_init_usage, /* min Numeric->Memory for UMF_kernel_init */
714
nempty_row, nempty_col,
727
/* -------------------------------------------------------------------------- */
728
/* for debugging only: */
729
/* -------------------------------------------------------------------------- */
731
#include "umf_dump.h"
733
/* -------------------------------------------------------------------------- */
734
/* for statement coverage testing only: */
735
/* -------------------------------------------------------------------------- */
739
/* for testing integer overflow: */
740
#ifdef TEST_FOR_INTEGER_OVERFLOW
742
#define MAX_MARK(n) (3*(n))
745
/* for testing out-of-memory conditions: */
746
#define UMF_TCOV_TEST
747
GLOBAL extern Int umf_fail, umf_fail_lo, umf_fail_hi ;
748
GLOBAL extern Int umf_realloc_fail, umf_realloc_lo, umf_realloc_hi ;
750
/* for testing malloc count: */
751
#define UMF_MALLOC_COUNT