4
* -- SuperLU routine (version 2.0) --
5
* Univ. of California Berkeley, Xerox Palo Alto Research Center,
6
* and Lawrence Berkeley National Lab.
11
Copyright (c) 1994 by Xerox Corporation. All rights reserved.
13
THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
14
EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
16
Permission is hereby granted to use or copy this program for any
17
purpose, provided the above notices are retained on all copies.
18
Permission to modify the code and to distribute modified code is
19
granted, provided the above notices are retained, and a notice that
20
the code was modified is included with the above copyright notice.
28
const int jcol, /* in - start of the supernode */
29
const int kcol, /* in - end of the supernode */
30
const int *asub, /* in */
31
const int *xa_begin, /* in */
32
const int *xa_end, /* in */
33
int *xprune, /* out */
34
int *marker, /* modified */
35
GlobalLU_t *Glu /* modified */
40
* dsnode_dfs() - Determine the union of the row structures of those
41
* columns within the relaxed snode.
42
* Note: The relaxed snodes are leaves of the supernodal etree, therefore,
43
* the portion outside the rectangular supernode must be zero.
48
* >0 number of bytes allocated when run out of memory.
51
register int i, k, ifrom, ito, nextl, new_next;
52
int nsuper, krow, kmark, mem_error;
63
nsuper = ++supno[jcol]; /* Next available supernode number */
66
for (i = jcol; i <= kcol; i++) {
67
/* For each nonzero in A[*,i] */
68
for (k = xa_begin[i]; k < xa_end[i]; k++) {
71
if ( kmark != kcol ) { /* First time visit krow */
74
if ( nextl >= nzlmax ) {
75
if ( mem_error = dLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
84
/* Supernode > 1, then make a copy of the subscripts for pruning */
86
new_next = nextl + (nextl - xlsub[jcol]);
87
while ( new_next > nzlmax ) {
88
if ( mem_error = dLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
93
for (ifrom = xlsub[jcol]; ifrom < nextl; )
94
lsub[ito++] = lsub[ifrom++];
95
for (i = jcol+1; i <= kcol; i++) xlsub[i] = nextl;
99
xsup[nsuper+1] = kcol + 1;
100
supno[kcol+1] = nsuper;
101
xprune[kcol] = nextl;
102
xlsub[kcol+1] = nextl;