SuperLU_DIST
4.0
superlu_dist on CPU and GPU clusters
|
An approximate minimum degree column ordering algorithm. More...
#include <limits.h>
#include "colamd.h"
#include <assert.h>
Classes | |
struct | ColInfo_struct |
struct | RowInfo_struct |
Macros | |
#define | NDEBUG |
#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 | PUBLIC |
#define | PRIVATE static |
#define | DEBUG0(params) ; |
#define | DEBUG1(params) ; |
#define | DEBUG2(params) ; |
#define | DEBUG3(params) ; |
#define | DEBUG4(params) ; |
Typedefs | |
typedef struct ColInfo_struct | ColInfo |
typedef struct RowInfo_struct | RowInfo |
Functions | |
PRIVATE int | init_rows_cols (int n_row, int n_col, RowInfo Row[], ColInfo Col[], int A[], int p[]) |
PRIVATE void | init_scoring (int n_row, int n_col, RowInfo Row[], ColInfo 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, RowInfo Row[], ColInfo Col[], int A[], int head[], int n_col2, int max_deg, int pfree) |
PRIVATE void | order_children (int n_col, ColInfo Col[], int p[]) |
PRIVATE void | detect_super_cols (ColInfo Col[], int A[], int head[], int row_start, int row_length) |
PRIVATE int | garbage_collection (int n_row, int n_col, RowInfo Row[], ColInfo Col[], int A[], int *pfree) |
PRIVATE int | clear_mark (int n_row, RowInfo Row[]) |
PUBLIC int | colamd_recommended (int nnz, int n_row, int n_col) |
PUBLIC void | colamd_set_defaults (double knobs[COLAMD_KNOBS]) |
PUBLIC int | colamd (int n_row, int n_col, int Alen, int A[], int p[], double knobs[COLAMD_KNOBS]) |
An approximate minimum degree column ordering algorithm.
#define ALIVE (0) |
#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 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 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 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 TRUE (1) |
typedef struct ColInfo_struct ColInfo |
typedef struct RowInfo_struct RowInfo |
PUBLIC int colamd | ( | int | n_row, |
int | n_col, | ||
int | Alen, | ||
int | A[], | ||
int | p[], | ||
double | knobs[COLAMD_KNOBS] | ||
) |
PUBLIC int colamd_recommended | ( | int | nnz, |
int | n_row, | ||
int | n_col | ||
) |
PUBLIC void colamd_set_defaults | ( | double | knobs[COLAMD_KNOBS] | ) |
PRIVATE void detect_super_cols | ( | ColInfo | Col[], |
int | A[], | ||
int | head[], | ||
int | row_start, | ||
int | row_length | ||
) |
PRIVATE int find_ordering | ( | int | n_row, |
int | n_col, | ||
int | Alen, | ||
RowInfo | Row[], | ||
ColInfo | Col[], | ||
int | A[], | ||
int | head[], | ||
int | n_col2, | ||
int | max_deg, | ||
int | pfree | ||
) |
PRIVATE int garbage_collection | ( | int | n_row, |
int | n_col, | ||
RowInfo | Row[], | ||
ColInfo | Col[], | ||
int | A[], | ||
int * | pfree | ||
) |
PRIVATE void init_scoring | ( | int | n_row, |
int | n_col, | ||
RowInfo | Row[], | ||
ColInfo | Col[], | ||
int | A[], | ||
int | head[], | ||
double | knobs[COLAMD_KNOBS], | ||
int * | p_n_row2, | ||
int * | p_n_col2, | ||
int * | p_max_deg | ||
) |