alpar@1
|
1 |
/* ========================================================================= */
|
alpar@1
|
2 |
/* === AMD_control ========================================================= */
|
alpar@1
|
3 |
/* ========================================================================= */
|
alpar@1
|
4 |
|
alpar@1
|
5 |
/* ------------------------------------------------------------------------- */
|
alpar@1
|
6 |
/* AMD, Copyright (c) Timothy A. Davis, */
|
alpar@1
|
7 |
/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */
|
alpar@1
|
8 |
/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */
|
alpar@1
|
9 |
/* web: http://www.cise.ufl.edu/research/sparse/amd */
|
alpar@1
|
10 |
/* ------------------------------------------------------------------------- */
|
alpar@1
|
11 |
|
alpar@1
|
12 |
/* User-callable. Prints the control parameters for AMD. See amd.h
|
alpar@1
|
13 |
* for details. If the Control array is not present, the defaults are
|
alpar@1
|
14 |
* printed instead.
|
alpar@1
|
15 |
*/
|
alpar@1
|
16 |
|
alpar@1
|
17 |
#include "amd_internal.h"
|
alpar@1
|
18 |
|
alpar@1
|
19 |
GLOBAL void AMD_control
|
alpar@1
|
20 |
(
|
alpar@1
|
21 |
double Control [ ]
|
alpar@1
|
22 |
)
|
alpar@1
|
23 |
{
|
alpar@1
|
24 |
double alpha ;
|
alpar@1
|
25 |
Int aggressive ;
|
alpar@1
|
26 |
|
alpar@1
|
27 |
if (Control != (double *) NULL)
|
alpar@1
|
28 |
{
|
alpar@1
|
29 |
alpha = Control [AMD_DENSE] ;
|
alpar@1
|
30 |
aggressive = Control [AMD_AGGRESSIVE] != 0 ;
|
alpar@1
|
31 |
}
|
alpar@1
|
32 |
else
|
alpar@1
|
33 |
{
|
alpar@1
|
34 |
alpha = AMD_DEFAULT_DENSE ;
|
alpar@1
|
35 |
aggressive = AMD_DEFAULT_AGGRESSIVE ;
|
alpar@1
|
36 |
}
|
alpar@1
|
37 |
|
alpar@1
|
38 |
PRINTF (("\nAMD version %d.%d.%d, %s: approximate minimum degree ordering\n"
|
alpar@1
|
39 |
" dense row parameter: %g\n", AMD_MAIN_VERSION, AMD_SUB_VERSION,
|
alpar@1
|
40 |
AMD_SUBSUB_VERSION, AMD_DATE, alpha)) ;
|
alpar@1
|
41 |
|
alpar@1
|
42 |
if (alpha < 0)
|
alpar@1
|
43 |
{
|
alpar@1
|
44 |
PRINTF ((" no rows treated as dense\n")) ;
|
alpar@1
|
45 |
}
|
alpar@1
|
46 |
else
|
alpar@1
|
47 |
{
|
alpar@1
|
48 |
PRINTF ((
|
alpar@1
|
49 |
" (rows with more than max (%g * sqrt (n), 16) entries are\n"
|
alpar@1
|
50 |
" considered \"dense\", and placed last in output permutation)\n",
|
alpar@1
|
51 |
alpha)) ;
|
alpar@1
|
52 |
}
|
alpar@1
|
53 |
|
alpar@1
|
54 |
if (aggressive)
|
alpar@1
|
55 |
{
|
alpar@1
|
56 |
PRINTF ((" aggressive absorption: yes\n")) ;
|
alpar@1
|
57 |
}
|
alpar@1
|
58 |
else
|
alpar@1
|
59 |
{
|
alpar@1
|
60 |
PRINTF ((" aggressive absorption: no\n")) ;
|
alpar@1
|
61 |
}
|
alpar@1
|
62 |
|
alpar@1
|
63 |
PRINTF ((" size of AMD integer: %d\n\n", sizeof (Int))) ;
|
alpar@1
|
64 |
}
|