1
#ifndef __SUPERLU_UTIL /* allow multiple inclusions */
11
#define USER_ABORT(msg) superlu_abort_and_exit(msg)
14
#define ABORT(err_msg) \
16
sprintf(msg,"%s at line %d in file %s\n",err_msg,__LINE__, __FILE__);\
21
#define USER_MALLOC(size) superlu_malloc(size)
24
#define SUPERLU_MALLOC(size) USER_MALLOC(size)
27
#define USER_FREE(addr) superlu_free(addr)
30
#define SUPERLU_FREE(addr) USER_FREE(addr)
33
#define SUPERLU_MAX(x, y) ( (x) > (y) ? (x) : (y) )
34
#define SUPERLU_MIN(x, y) ( (x) < (y) ? (x) : (y) )
47
typedef float flops_t;
48
typedef unsigned char Logical;
51
* The following enumerate type is used by the statistics variable
52
* SuperLUStat, to keep track of flop count and time spent at various stages.
54
* Note that not all of the fields are disjoint.
57
COLPERM, /* find a column ordering that minimizes fills */
58
RELAX, /* find artificial supernodes */
59
ETREE, /* compute column etree */
60
EQUIL, /* equilibrate the original matrix */
61
FACT, /* perform LU factorization */
62
RCOND, /* estimate reciprocal condition number */
63
SOLVE, /* forward and back solves */
64
REFINE, /* perform iterative refinement */
65
FLOAT, /* time spent in floating-point operations */
66
TRSV, /* fraction of FACT spent in xTRSV */
67
GEMV, /* fraction of FACT spent in xGEMV */
68
FERR, /* estimate error bounds after iterative refinement */
69
NPHASES /* total number of phases */
73
int *panel_histo; /* histogram of panel size distribution */
74
double *utime; /* running time at various phases */
75
flops_t *ops; /* operation count at various phases */
79
#define FIRSTCOL_OF_SNODE(i) (xsup[i])
86
extern void superlu_abort_and_exit(char*);
87
extern void *superlu_malloc (size_t);
88
extern int *intMalloc (int);
89
extern int *intCalloc (int);
90
extern void superlu_free (void*);
91
extern void SetIWork (int, int, int, int *, int **, int **, int **,
92
int **, int **, int **, int **);
93
extern void StatInit(int, int);
94
extern void StatFree();
95
extern int sp_coletree (int *, int *, int *, int, int, int *);
96
extern void relax_snode (const int, int *, const int, int *, int *);
97
extern void resetrep_col (const int, const int *, int *);
98
extern int spcoletree (int *, int *, int *, int, int, int *);
99
extern int *TreePostorder (int, int *);
100
extern double SuperLU_timer_ ();
101
extern int sp_ienv (int);
102
extern int lsame_ (char *, char *);
103
extern int xerbla_ (char *, int *);
104
extern void ifill (int *, int, int);
105
extern void snode_profile (int, int *);
106
extern void super_stats (int, int *);
107
extern void PrintSumm (char *, int, int, int);
108
extern void PrintStat (SuperLUStat_t *);
109
extern void print_panel_seg(int, int, int, int, int *, int *);
110
extern void check_repfnz(int, int, int, int *);
116
#endif /* __SUPERLU_UTIL */