SuperLU 7.0.0
|
Approximate minimum degree column ordering algorithm. More...
Data Structures | |
struct | Colamd_Col_struct |
struct | Colamd_Row_struct |
Macros | |
#define | NDEBUG |
#define | NULL ((void *) 0) |
#define | Int int |
#define | ID "%d" |
#define | Int_MAX INT_MAX |
#define | COLAMD_recommended colamd_recommended |
#define | COLAMD_set_defaults colamd_set_defaults |
#define | COLAMD_MAIN colamd |
#define | SYMAMD_MAIN symamd |
#define | COLAMD_report colamd_report |
#define | SYMAMD_report symamd_report |
#define | PUBLIC |
#define | PRIVATE static |
#define | DENSE_DEGREE(alpha, n) ((Int) MAX (16.0, (alpha) * sqrt ((double) (n)))) |
#define | MAX(a, b) (((a) > (b)) ? (a) : (b)) |
#define | MIN(a, b) (((a) < (b)) ? (a) : (b)) |
#define | ONES_COMPLEMENT(r) (-(r)-1) |
#define | TRUE (1) |
#define | FALSE (0) |
#define | EMPTY (-1) |
#define | ALIVE (0) |
#define | DEAD (-1) |
#define | DEAD_PRINCIPAL (-1) |
#define | DEAD_NON_PRINCIPAL (-2) |
#define | ROW_IS_DEAD(r) ROW_IS_MARKED_DEAD (Row[r].shared2.mark) |
#define | ROW_IS_MARKED_DEAD(row_mark) (row_mark < ALIVE) |
#define | ROW_IS_ALIVE(r) (Row [r].shared2.mark >= ALIVE) |
#define | COL_IS_DEAD(c) (Col [c].start < ALIVE) |
#define | COL_IS_ALIVE(c) (Col [c].start >= ALIVE) |
#define | COL_IS_DEAD_PRINCIPAL(c) (Col [c].start == DEAD_PRINCIPAL) |
#define | KILL_ROW(r) { Row [r].shared2.mark = DEAD ; } |
#define | KILL_PRINCIPAL_COL(c) { Col [c].start = DEAD_PRINCIPAL ; } |
#define | KILL_NON_PRINCIPAL_COL(c) { Col [c].start = DEAD_NON_PRINCIPAL ; } |
#define | INDEX(i) (i) |
#define | DEBUG0(params) ; |
#define | DEBUG1(params) ; |
#define | DEBUG2(params) ; |
#define | DEBUG3(params) ; |
#define | DEBUG4(params) ; |
#define | ASSERT(expression) |
#define | COLAMD_C(n_col, ok) ((t_mult (t_add (n_col, 1, ok), sizeof (Colamd_Col), ok) / sizeof (Int))) |
#define | COLAMD_R(n_row, ok) ((t_mult (t_add (n_row, 1, ok), sizeof (Colamd_Row), ok) / sizeof (Int))) |
Typedefs | |
typedef struct Colamd_Col_struct | Colamd_Col |
typedef struct Colamd_Row_struct | Colamd_Row |
Functions | |
PRIVATE Int | init_rows_cols (Int n_row, Int n_col, Colamd_Row Row[], Colamd_Col Col[], Int A[], Int p[], Int stats[COLAMD_STATS]) |
PRIVATE void | init_scoring (Int n_row, Int n_col, Colamd_Row Row[], Colamd_Col Col[], Int A[], Int head[], double knobs[COLAMD_KNOBS], Int *p_n_row2, Int *p_n_col2, Int *p_max_deg) |
PRIVATE Int | find_ordering (Int n_row, Int n_col, Int Alen, Colamd_Row Row[], Colamd_Col Col[], Int A[], Int head[], Int n_col2, Int max_deg, Int pfree, Int aggressive) |
PRIVATE void | order_children (Int n_col, Colamd_Col Col[], Int p[]) |
PRIVATE void | detect_super_cols (Colamd_Col Col[], Int A[], Int head[], Int row_start, Int row_length) |
PRIVATE Int | garbage_collection (Int n_row, Int n_col, Colamd_Row Row[], Colamd_Col Col[], Int A[], Int *pfree) |
PRIVATE Int | clear_mark (Int tag_mark, Int max_mark, Int n_row, Colamd_Row Row[]) |
PRIVATE void | print_report (char *method, Int stats[COLAMD_STATS]) |
static size_t | t_add (size_t a, size_t b, int *ok) |
static size_t | t_mult (size_t a, size_t k, int *ok) |
PUBLIC size_t | COLAMD_recommended (Int nnz, Int n_row, Int n_col) |
PUBLIC void | COLAMD_set_defaults (double knobs[COLAMD_KNOBS]) |
PUBLIC Int | SYMAMD_MAIN (Int n, Int A[], Int p[], Int perm[], double knobs[COLAMD_KNOBS], Int stats[COLAMD_STATS], void *(*allocate)(size_t, size_t), void(*release)(void *)) |
PUBLIC Int | COLAMD_MAIN (Int n_row, Int n_col, Int Alen, Int A[], Int p[], double knobs[COLAMD_KNOBS], Int stats[COLAMD_STATS]) |
PUBLIC void | COLAMD_report (Int stats[COLAMD_STATS]) |
PUBLIC void | SYMAMD_report (Int stats[COLAMD_STATS]) |
#define ALIVE (0) |
#define ASSERT | ( | expression | ) |
#define COL_IS_ALIVE | ( | c | ) | (Col [c].start >= ALIVE) |
#define COL_IS_DEAD | ( | c | ) | (Col [c].start < ALIVE) |
#define COL_IS_DEAD_PRINCIPAL | ( | c | ) | (Col [c].start == DEAD_PRINCIPAL) |
#define COLAMD_C | ( | n_col, | |
ok | |||
) | ((t_mult (t_add (n_col, 1, ok), sizeof (Colamd_Col), ok) / sizeof (Int))) |
#define COLAMD_MAIN colamd |
#define COLAMD_R | ( | n_row, | |
ok | |||
) | ((t_mult (t_add (n_row, 1, ok), sizeof (Colamd_Row), ok) / sizeof (Int))) |
#define COLAMD_recommended colamd_recommended |
#define COLAMD_report colamd_report |
#define COLAMD_set_defaults colamd_set_defaults |
#define DEAD (-1) |
#define DEAD_NON_PRINCIPAL (-2) |
#define DEAD_PRINCIPAL (-1) |
#define DEBUG0 | ( | params | ) | ; |
#define DEBUG1 | ( | params | ) | ; |
#define DEBUG2 | ( | params | ) | ; |
#define DEBUG3 | ( | params | ) | ; |
#define DEBUG4 | ( | params | ) | ; |
#define EMPTY (-1) |
#define FALSE (0) |
#define ID "%d" |
#define INDEX | ( | i | ) | (i) |
#define Int int |
#define Int_MAX INT_MAX |
#define KILL_NON_PRINCIPAL_COL | ( | c | ) | { Col [c].start = DEAD_NON_PRINCIPAL ; } |
#define KILL_PRINCIPAL_COL | ( | c | ) | { Col [c].start = DEAD_PRINCIPAL ; } |
#define KILL_ROW | ( | r | ) | { Row [r].shared2.mark = DEAD ; } |
#define MAX | ( | a, | |
b | |||
) | (((a) > (b)) ? (a) : (b)) |
#define MIN | ( | a, | |
b | |||
) | (((a) < (b)) ? (a) : (b)) |
#define NDEBUG |
#define NULL ((void *) 0) |
#define ONES_COMPLEMENT | ( | r | ) | (-(r)-1) |
#define PRIVATE static |
#define PUBLIC |
#define ROW_IS_ALIVE | ( | r | ) | (Row [r].shared2.mark >= ALIVE) |
#define ROW_IS_DEAD | ( | r | ) | ROW_IS_MARKED_DEAD (Row[r].shared2.mark) |
#define ROW_IS_MARKED_DEAD | ( | row_mark | ) | (row_mark < ALIVE) |
#define SYMAMD_MAIN symamd |
#define SYMAMD_report symamd_report |
#define TRUE (1) |
typedef struct Colamd_Col_struct Colamd_Col |
typedef struct Colamd_Row_struct Colamd_Row |
PUBLIC Int COLAMD_MAIN | ( | Int | n_row, |
Int | n_col, | ||
Int | Alen, | ||
Int | A[], | ||
Int | p[], | ||
double | knobs[COLAMD_KNOBS], | ||
Int | stats[COLAMD_STATS] | ||
) |
PUBLIC void COLAMD_set_defaults | ( | double | knobs[COLAMD_KNOBS] | ) |
PRIVATE void detect_super_cols | ( | Colamd_Col | Col[], |
Int | A[], | ||
Int | head[], | ||
Int | row_start, | ||
Int | row_length | ||
) |
PRIVATE Int find_ordering | ( | Int | n_row, |
Int | n_col, | ||
Int | Alen, | ||
Colamd_Row | Row[], | ||
Colamd_Col | Col[], | ||
Int | A[], | ||
Int | head[], | ||
Int | n_col2, | ||
Int | max_deg, | ||
Int | pfree, | ||
Int | aggressive | ||
) |
PRIVATE Int garbage_collection | ( | Int | n_row, |
Int | n_col, | ||
Colamd_Row | Row[], | ||
Colamd_Col | Col[], | ||
Int | A[], | ||
Int * | pfree | ||
) |
PRIVATE Int init_rows_cols | ( | Int | n_row, |
Int | n_col, | ||
Colamd_Row | Row[], | ||
Colamd_Col | Col[], | ||
Int | A[], | ||
Int | p[], | ||
Int | stats[COLAMD_STATS] | ||
) |
PRIVATE void init_scoring | ( | Int | n_row, |
Int | n_col, | ||
Colamd_Row | Row[], | ||
Colamd_Col | Col[], | ||
Int | A[], | ||
Int | head[], | ||
double | knobs[COLAMD_KNOBS], | ||
Int * | p_n_row2, | ||
Int * | p_n_col2, | ||
Int * | p_max_deg | ||
) |
PRIVATE void order_children | ( | Int | n_col, |
Colamd_Col | Col[], | ||
Int | p[] | ||
) |
PUBLIC Int SYMAMD_MAIN | ( | Int | n, |
Int | A[], | ||
Int | p[], | ||
Int | perm[], | ||
double | knobs[COLAMD_KNOBS], | ||
Int | stats[COLAMD_STATS], | ||
void *(*)(size_t, size_t) | allocate, | ||
void(*)(void *) | release | ||
) |
|
static |
|
static |