}
dense = MAX (16, dense) ;
dense = MIN (n, dense) ;
- AMD_DEBUG1 (("\n\nAMD (debug), alpha %g, aggr. "ID"\n",
+ AMD_DEBUG1 (("\n\nAMD (debug), alpha %g, aggr. " ID "\n",
alpha, aggressive)) ;
for (i = 0 ; i < n ; i++)
}
#ifndef NDEBUG
- AMD_DEBUG1 (("\n======Nel "ID" initial\n", nel)) ;
+ AMD_DEBUG1 (("\n======Nel " ID " initial\n", nel)) ;
AMD_dump (n, Pe, Iw, Len, iwlen, pfree, Nv, Next, Last,
Head, Elen, Degree, W, -1) ;
#endif
* version does not have this option.
* ------------------------------------------------------------- */
- AMD_DEBUG1 (("Dense node "ID" degree "ID"\n", i, deg)) ;
+ AMD_DEBUG1 (("Dense node " ID " degree " ID "\n", i, deg)) ;
ndense++ ;
Nv [i] = 0 ; /* do not postorder this node */
Elen [i] = EMPTY ;
{
#ifndef NDEBUG
- AMD_DEBUG1 (("\n======Nel "ID"\n", nel)) ;
+ AMD_DEBUG1 (("\n======Nel " ID "\n", nel)) ;
if (AMD_debug >= 2)
{
AMD_dump (n, Pe, Iw, Len, iwlen, pfree, Nv, Next,
}
mindeg = deg ;
ASSERT (me >= 0 && me < n) ;
- AMD_DEBUG1 (("=================me: "ID"\n", me)) ;
+ AMD_DEBUG1 (("=================me: " ID "\n", me)) ;
/* ----------------------------------------------------------------- */
/* remove chosen variable from link list */
e = me ;
pj = p ;
ln = slenme ;
- AMD_DEBUG2 (("Search sv: "ID" "ID" "ID"\n", me,pj,ln)) ;
+ AMD_DEBUG2 (("Search sv: " ID " " ID " " ID "\n", me,pj,ln)) ;
}
else
{
ASSERT (e >= 0 && e < n) ;
pj = Pe [e] ;
ln = Len [e] ;
- AMD_DEBUG2 (("Search element e "ID" in me "ID"\n", e,me)) ;
+ AMD_DEBUG2 (("Search element e " ID " in me " ID "\n", e,me)) ;
ASSERT (Elen [e] < EMPTY && W [e] > 0 && pj >= 0) ;
}
ASSERT (ln >= 0 && (ln == 0 || (pj >= 0 && pj < iwlen))) ;
i = Iw [pj++] ;
ASSERT (i >= 0 && i < n && (i == me || Elen [i] >= EMPTY));
nvi = Nv [i] ;
- AMD_DEBUG2 ((": "ID" "ID" "ID" "ID"\n",
+ AMD_DEBUG2 ((": " ID " " ID " " ID " " ID "\n",
i, Elen [i], Nv [i], wflg)) ;
if (nvi > 0)
j = FLIP (Iw [psrc++]) ;
if (j >= 0)
{
- AMD_DEBUG2 (("Got object j: "ID"\n", j)) ;
+ AMD_DEBUG2 (("Got object j: " ID "\n", j)) ;
Iw [pdst] = Pe [j] ;
Pe [j] = pdst++ ;
lenj = Len [j] ;
degme += nvi ;
Nv [i] = -nvi ;
Iw [pfree++] = i ;
- AMD_DEBUG2 ((" s: "ID" nv "ID"\n", i, Nv [i]));
+ AMD_DEBUG2 ((" s: " ID " nv " ID "\n", i, Nv [i]));
/* ------------------------------------------------- */
/* remove variable i from degree link list */
{
/* set tree pointer and flag to indicate element e is
* absorbed into new element me (the parent of e is me) */
- AMD_DEBUG1 ((" Element "ID" => "ID"\n", e, me)) ;
+ AMD_DEBUG1 ((" Element " ID " => " ID "\n", e, me)) ;
Pe [e] = FLIP (me) ;
W [e] = 0 ;
}
* diagonal part). */
#ifndef NDEBUG
- AMD_DEBUG2 (("New element structure: length= "ID"\n", pme2-pme1+1)) ;
- for (pme = pme1 ; pme <= pme2 ; pme++) AMD_DEBUG3 ((" "ID"", Iw[pme]));
+ AMD_DEBUG2 (("New element structure: length= " ID "\n", pme2-pme1+1)) ;
+ for (pme = pme1 ; pme <= pme2 ; pme++) AMD_DEBUG3 ((" " ID "", Iw[pme]));
AMD_DEBUG3 (("\n")) ;
#endif
i = Iw [pme] ;
ASSERT (i >= 0 && i < n) ;
eln = Elen [i] ;
- AMD_DEBUG3 ((""ID" Elen "ID": \n", i, eln)) ;
+ AMD_DEBUG3 (("" ID " Elen " ID ": \n", i, eln)) ;
if (eln > 0)
{
/* note that Nv [i] has been negated to denote i in Lme: */
e = Iw [p] ;
ASSERT (e >= 0 && e < n) ;
we = W [e] ;
- AMD_DEBUG4 ((" e "ID" we "ID" ", e, we)) ;
+ AMD_DEBUG4 ((" e " ID " we " ID " ", e, we)) ;
if (we >= wflg)
{
/* unabsorbed element e has been seen in this loop */
{
i = Iw [pme] ;
ASSERT (i >= 0 && i < n && Nv [i] < 0 && Elen [i] >= 0) ;
- AMD_DEBUG2 (("Updating: i "ID" "ID" "ID"\n", i, Elen[i], Len [i]));
+ AMD_DEBUG2 (("Updating: i " ID " " ID " " ID "\n", i, Elen[i], Len [i]));
p1 = Pe [i] ;
p2 = p1 + Elen [i] - 1 ;
pn = p1 ;
deg += dext ;
Iw [pn++] = e ;
hash += e ;
- AMD_DEBUG4 ((" e: "ID" hash = "ID"\n",e,hash)) ;
+ AMD_DEBUG4 ((" e: " ID " hash = " ID "\n",e,hash)) ;
}
else
{
/* external degree of e is zero, absorb e into me*/
- AMD_DEBUG1 ((" Element "ID" =>"ID" (aggressive)\n",
+ AMD_DEBUG1 ((" Element " ID " =>" ID " (aggressive)\n",
e, me)) ;
ASSERT (dext == 0) ;
Pe [e] = FLIP (me) ;
deg += dext ;
Iw [pn++] = e ;
hash += e ;
- AMD_DEBUG4 ((" e: "ID" hash = "ID"\n",e,hash)) ;
+ AMD_DEBUG4 ((" e: " ID " hash = " ID "\n",e,hash)) ;
}
}
}
deg += nvj ;
Iw [pn++] = j ;
hash += j ;
- AMD_DEBUG4 ((" s: "ID" hash "ID" Nv[j]= "ID"\n",
+ AMD_DEBUG4 ((" s: " ID " hash " ID " Nv[j]= " ID "\n",
j, hash, nvj)) ;
}
}
* flop count analysis. It also means that the post-ordering
* is not an exact elimination tree post-ordering. */
- AMD_DEBUG1 ((" MASS i "ID" => parent e "ID"\n", i, me)) ;
+ AMD_DEBUG1 ((" MASS i " ID " => parent e " ID "\n", i, me)) ;
Pe [i] = FLIP (me) ;
nvi = -Nv [i] ;
degme -= nvi ;
{
i = Iw [pme] ;
ASSERT (i >= 0 && i < n) ;
- AMD_DEBUG2 (("Consider i "ID" nv "ID"\n", i, Nv [i])) ;
+ AMD_DEBUG2 (("Consider i " ID " nv " ID "\n", i, Nv [i])) ;
if (Nv [i] < 0)
{
/* i is a principal variable in Lme */
*/
ASSERT (i >= EMPTY && i < n) ;
- AMD_DEBUG2 (("----i "ID" hash "ID"\n", i, hash)) ;
+ AMD_DEBUG2 (("----i " ID " hash " ID "\n", i, hash)) ;
while (i != EMPTY && Next [i] != EMPTY)
{
/* check if j and i have identical nonzero pattern */
/* ------------------------------------------------- */
- AMD_DEBUG3 (("compare i "ID" and j "ID"\n", i,j)) ;
+ AMD_DEBUG3 (("compare i " ID " and j " ID "\n", i,j)) ;
/* check if i and j have the same Len and Elen */
ASSERT (Len [j] >= 0 && Elen [j] >= 0) ;
/* found it! j can be absorbed into i */
/* --------------------------------------------- */
- AMD_DEBUG1 (("found it! j "ID" => i "ID"\n", j,i));
+ AMD_DEBUG1 (("found it! j " ID " => i " ID "\n", j,i));
Pe [j] = FLIP (i) ;
/* both Nv [i] and Nv [j] are negated since they */
/* are in Lme, and the absolute values of each */
i = Iw [pme] ;
ASSERT (i >= 0 && i < n) ;
nvi = -Nv [i] ;
- AMD_DEBUG3 (("Restore i "ID" "ID"\n", i, nvi)) ;
+ AMD_DEBUG3 (("Restore i " ID " " ID "\n", i, nvi)) ;
if (nvi > 0)
{
/* i is a principal variable in Lme */
/* FINALIZE THE NEW ELEMENT */
/* ========================================================================= */
- AMD_DEBUG2 (("ME = "ID" DONE\n", me)) ;
+ AMD_DEBUG2 (("ME = " ID " DONE\n", me)) ;
Nv [me] = nvpiv ;
/* save the length of the list for the new element me */
Len [me] = p - pme1 ;
}
#ifndef NDEBUG
- AMD_DEBUG2 (("finalize done nel "ID" n "ID"\n ::::\n", nel, n)) ;
+ AMD_DEBUG2 (("finalize done nel " ID " n " ID "\n ::::\n", nel, n)) ;
for (pme = Pe [me] ; pme <= Pe [me] + Len [me] - 1 ; pme++)
{
- AMD_DEBUG3 ((" "ID"", Iw [pme])) ;
+ AMD_DEBUG3 ((" " ID "", Iw [pme])) ;
}
AMD_DEBUG3 (("\n")) ;
#endif
AMD_DEBUG2 (("\nTree:\n")) ;
for (i = 0 ; i < n ; i++)
{
- AMD_DEBUG2 ((" "ID" parent: "ID" ", i, Pe [i])) ;
+ AMD_DEBUG2 ((" " ID " parent: " ID " ", i, Pe [i])) ;
ASSERT (Pe [i] >= EMPTY && Pe [i] < n) ;
if (Nv [i] > 0)
{
/* this is an element */
e = i ;
- AMD_DEBUG2 ((" element, size is "ID"\n", Elen [i])) ;
+ AMD_DEBUG2 ((" element, size is " ID "\n", Elen [i])) ;
ASSERT (Elen [e] > 0) ;
}
AMD_DEBUG2 (("\n")) ;
{
if (Nv [e] > 0)
{
- AMD_DEBUG3 (("Element e= "ID" size "ID" nv "ID" \n", e,
+ AMD_DEBUG3 (("Element e= " ID " size " ID " nv " ID " \n", e,
Elen [e], Nv [e])) ;
}
}
Int cnt ;
if (Nv [i] == 0)
{
- AMD_DEBUG3 (("i unordered: "ID"\n", i)) ;
+ AMD_DEBUG3 (("i unordered: " ID "\n", i)) ;
j = Pe [i] ;
cnt = 0 ;
- AMD_DEBUG3 ((" j: "ID"\n", j)) ;
+ AMD_DEBUG3 ((" j: " ID "\n", j)) ;
if (j == EMPTY)
{
AMD_DEBUG3 ((" i is a dense variable\n")) ;
ASSERT (j >= 0 && j < n) ;
while (Nv [j] == 0)
{
- AMD_DEBUG3 ((" j : "ID"\n", j)) ;
+ AMD_DEBUG3 ((" j : " ID "\n", j)) ;
j = Pe [j] ;
- AMD_DEBUG3 ((" j:: "ID"\n", j)) ;
+ AMD_DEBUG3 ((" j:: " ID "\n", j)) ;
cnt++ ;
if (cnt > n) break ;
}
e = j ;
- AMD_DEBUG3 ((" got to e: "ID"\n", e)) ;
+ AMD_DEBUG3 ((" got to e: " ID "\n", e)) ;
}
}
}
* was selected as pivot.
* ------------------------------------------------------------- */
- AMD_DEBUG1 (("Path compression, i unordered: "ID"\n", i)) ;
+ AMD_DEBUG1 (("Path compression, i unordered: " ID "\n", i)) ;
j = Pe [i] ;
ASSERT (j >= EMPTY && j < n) ;
- AMD_DEBUG3 ((" j: "ID"\n", j)) ;
+ AMD_DEBUG3 ((" j: " ID "\n", j)) ;
if (j == EMPTY)
{
/* Skip a dense variable. It has no parent. */
/* while (j is a variable) */
while (Nv [j] == 0)
{
- AMD_DEBUG3 ((" j : "ID"\n", j)) ;
+ AMD_DEBUG3 ((" j : " ID "\n", j)) ;
j = Pe [j] ;
- AMD_DEBUG3 ((" j:: "ID"\n", j)) ;
+ AMD_DEBUG3 ((" j:: " ID "\n", j)) ;
ASSERT (j >= 0 && j < n) ;
}
/* got to an element e */
e = j ;
- AMD_DEBUG3 (("got to e: "ID"\n", e)) ;
+ AMD_DEBUG3 (("got to e: " ID "\n", e)) ;
/* -------------------------------------------------------------
* traverse the path again from i to e, and compress the path
while (Nv [j] == 0)
{
jnext = Pe [j] ;
- AMD_DEBUG3 (("j "ID" jnext "ID"\n", j, jnext)) ;
+ AMD_DEBUG3 (("j " ID " jnext " ID "\n", j, jnext)) ;
Pe [j] = e ;
j = jnext ;
ASSERT (j >= 0 && j < n) ;
k = Next [i] ;
ASSERT (k >= 0 && k < n) ;
Last [k] = i ;
- AMD_DEBUG2 ((" perm ["ID"] = "ID"\n", k, i)) ;
+ AMD_DEBUG2 ((" perm [" ID "] = " ID "\n", k, i)) ;
}
}
}
if (AMD_debug >= 0)
{
- printf ("%s: AMD_debug_init, D= "ID"\n", s, AMD_debug) ;
+ printf ("%s: AMD_debug_init, D= " ID "\n", s, AMD_debug) ;
}
}
if (AMD_debug < 0) return ;
ASSERT (pfree <= iwlen) ;
- AMD_DEBUG3 (("\nAMD dump, pfree: "ID"\n", pfree)) ;
+ AMD_DEBUG3 (("\nAMD dump, pfree: " ID "\n", pfree)) ;
for (i = 0 ; i < n ; i++)
{
pe = Pe [i] ;
{
if (nv == 0)
{
- AMD_DEBUG3 (("\nI "ID": nonprincipal: ", i)) ;
+ AMD_DEBUG3 (("\nI " ID ": nonprincipal: ", i)) ;
ASSERT (elen == EMPTY) ;
if (pe == EMPTY)
{
else
{
ASSERT (pe < EMPTY) ;
- AMD_DEBUG3 ((" i "ID" -> parent "ID"\n", i, FLIP (Pe[i])));
+ AMD_DEBUG3 ((" i " ID " -> parent " ID "\n", i, FLIP (Pe[i])));
}
}
else
{
- AMD_DEBUG3 (("\nI "ID": active principal supervariable:\n",i));
- AMD_DEBUG3 ((" nv(i): "ID" Flag: %d\n", nv, (nv < 0))) ;
+ AMD_DEBUG3 (("\nI " ID ": active principal supervariable:\n",i));
+ AMD_DEBUG3 ((" nv(i): " ID " Flag: %d\n", nv, (nv < 0))) ;
ASSERT (elen >= 0) ;
ASSERT (nv > 0 && pe >= 0) ;
p = pe ;
for (k = 0 ; k < len ; k++)
{
j = Iw [p] ;
- AMD_DEBUG3 ((" "ID"", j)) ;
+ AMD_DEBUG3 ((" " ID "", j)) ;
ASSERT (j >= 0 && j < n) ;
if (k == elen-1) AMD_DEBUG3 ((" : ")) ;
p++ ;
e = i ;
if (w == 0)
{
- AMD_DEBUG3 (("\nE "ID": absorbed element: w "ID"\n", e, w)) ;
+ AMD_DEBUG3 (("\nE " ID ": absorbed element: w " ID "\n", e, w)) ;
ASSERT (nv > 0 && pe < 0) ;
- AMD_DEBUG3 ((" e "ID" -> parent "ID"\n", e, FLIP (Pe [e]))) ;
+ AMD_DEBUG3 ((" e " ID " -> parent " ID "\n", e, FLIP (Pe [e]))) ;
}
else
{
- AMD_DEBUG3 (("\nE "ID": unabsorbed element: w "ID"\n", e, w)) ;
+ AMD_DEBUG3 (("\nE " ID ": unabsorbed element: w " ID "\n", e, w)) ;
ASSERT (nv > 0 && pe >= 0) ;
p = pe ;
AMD_DEBUG3 ((" : ")) ;
for (k = 0 ; k < len ; k++)
{
j = Iw [p] ;
- AMD_DEBUG3 ((" "ID"", j)) ;
+ AMD_DEBUG3 ((" " ID "", j)) ;
ASSERT (j >= 0 && j < n) ;
p++ ;
}
AMD_DEBUG3 ((ID": \n", deg)) ;
for (i = Head [deg] ; i != EMPTY ; i = Next [i])
{
- AMD_DEBUG3 ((" "ID" : next "ID" last "ID" deg "ID"\n",
+ AMD_DEBUG3 ((" " ID " : next " ID " last " ID " deg " ID "\n",
i, Next [i], Last [i], Degree [i])) ;
ASSERT (i >= 0 && i < n && ilast == Last [i] &&
deg == Degree [i]) ;