slu_ddefs.h
Go to the documentation of this file.
1 
63 #ifndef __SUPERLU_dSP_DEFS /* allow multiple inclusions */
64 #define __SUPERLU_dSP_DEFS
65 
66 /*
67  * File name: dsp_defs.h
68  * Purpose: Sparse matrix types and function prototypes
69  * History:
70  */
71 
72 #ifdef _CRAY
73 #include <fortran.h>
74 #include <string.h>
75 #endif
76 
77 /* Define my integer type int_t */
78 typedef int int_t; /* default */
79 
80 #include <math.h>
81 #include <limits.h>
82 #include "slu_Cnames.h"
83 #include "supermatrix.h"
84 #include "slu_util.h"
85 
86 
87 
88 typedef struct {
89  int *xsup; /* supernode and column mapping */
90  int *supno;
91  int *lsub; /* compressed L subscripts */
92  int *xlsub;
93  double *lusup; /* L supernodes */
94  int *xlusup;
95  double *ucol; /* U columns */
96  int *usub;
97  int *xusub;
98  int nzlmax; /* current max size of lsub */
99  int nzumax; /* " " " ucol */
100  int nzlumax; /* " " " lusup */
101  int n; /* number of columns in the matrix */
102  LU_space_t MemModel; /* 0 - system malloc'd; 1 - user provided */
103  int num_expansions;
104  ExpHeader *expanders; /* Array of pointers to 4 types of memory */
105  LU_stack_t stack; /* use user supplied memory */
106 } GlobalLU_t;
107 
108 
109 /* -------- Prototypes -------- */
110 
111 #ifdef __cplusplus
112 extern "C" {
113 #endif
114 
116 extern void
118  SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
119 extern void
120 dgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
121  char *, double *, double *, SuperMatrix *, SuperMatrix *,
122  void *, int, SuperMatrix *, SuperMatrix *,
123  double *, double *, double *, double *,
124  mem_usage_t *, SuperLUStat_t *, int *);
125  /* ILU */
126 extern void
128  SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
129 extern void
130 dgsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
131  char *, double *, double *, SuperMatrix *, SuperMatrix *,
132  void *, int, SuperMatrix *, SuperMatrix *, double *, double *,
133  mem_usage_t *, SuperLUStat_t *, int *);
134 
135 
137 extern void
138 dCreate_CompCol_Matrix(SuperMatrix *, int, int, int, double *,
139  int *, int *, Stype_t, Dtype_t, Mtype_t);
140 extern void
141 dCreate_CompRow_Matrix(SuperMatrix *, int, int, int, double *,
142  int *, int *, Stype_t, Dtype_t, Mtype_t);
143 extern void
145 extern void
146 dCreate_Dense_Matrix(SuperMatrix *, int, int, double *, int,
148 extern void
149 dCreate_SuperNode_Matrix(SuperMatrix *, int, int, int, double *,
150  int *, int *, int *, int *, int *,
152 extern void
153 dCopy_Dense_Matrix(int, int, double *, int, double *, int);
154 
155 extern void countnz (const int, int *, int *, int *, GlobalLU_t *);
156 extern void ilu_countnz (const int, int *, int *, GlobalLU_t *);
157 extern void fixupL (const int, const int *, GlobalLU_t *);
158 
159 extern void dallocateA (int, int, double **, int **, int **);
161  int, int, int*, void *, int, int *, int *,
162  SuperMatrix *, SuperMatrix *, SuperLUStat_t*, int *);
163 extern int dsnode_dfs (const int, const int, const int *, const int *,
164  const int *, int *, int *, GlobalLU_t *);
165 extern int dsnode_bmod (const int, const int, const int, double *,
166  double *, GlobalLU_t *, SuperLUStat_t*);
167 extern void dpanel_dfs (const int, const int, const int, SuperMatrix *,
168  int *, int *, double *, int *, int *, int *,
169  int *, int *, int *, int *, GlobalLU_t *);
170 extern void dpanel_bmod (const int, const int, const int, const int,
171  double *, double *, int *, int *,
173 extern int dcolumn_dfs (const int, const int, int *, int *, int *, int *,
174  int *, int *, int *, int *, int *, GlobalLU_t *);
175 extern int dcolumn_bmod (const int, const int, double *,
176  double *, int *, int *, int,
178 extern int dcopy_to_ucol (int, int, int *, int *, int *,
179  double *, GlobalLU_t *);
180 extern int dpivotL (const int, const double, int *, int *,
181  int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
182 extern void dpruneL (const int, const int *, const int, const int,
183  const int *, const int *, int *, GlobalLU_t *);
184 extern void dreadmt (int *, int *, int *, double **, int **, int **);
185 extern void dGenXtrue (int, int, double *, int);
186 extern void dFillRHS (trans_t, int, double *, int, SuperMatrix *,
187  SuperMatrix *);
188 extern void dgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
189  SuperMatrix *, SuperLUStat_t*, int *);
190 /* ILU */
191 extern void dgsitrf (superlu_options_t*, SuperMatrix*, int, int, int*,
192  void *, int, int *, int *, SuperMatrix *, SuperMatrix *,
193  SuperLUStat_t*, int *);
194 extern int dldperm(int, int, int, int [], int [], double [],
195  int [], double [], double []);
196 extern int ilu_dsnode_dfs (const int, const int, const int *, const int *,
197  const int *, int *, GlobalLU_t *);
198 extern void ilu_dpanel_dfs (const int, const int, const int, SuperMatrix *,
199  int *, int *, double *, double *, int *, int *,
200  int *, int *, int *, int *, GlobalLU_t *);
201 extern int ilu_dcolumn_dfs (const int, const int, int *, int *, int *,
202  int *, int *, int *, int *, int *,
203  GlobalLU_t *);
204 extern int ilu_dcopy_to_ucol (int, int, int *, int *, int *,
205  double *, int, milu_t, double, int,
206  double *, int *, GlobalLU_t *, double *);
207 extern int ilu_dpivotL (const int, const double, int *, int *, int, int *,
208  int *, int *, int *, double, milu_t,
209  double, GlobalLU_t *, SuperLUStat_t*);
210 extern int ilu_ddrop_row (superlu_options_t *, int, int, double,
211  int, int *, double *, GlobalLU_t *,
212  double *, double *, int);
213 
214 
217 extern void dgsequ (SuperMatrix *, double *, double *, double *,
218  double *, double *, int *);
219 extern void dlaqgs (SuperMatrix *, double *, double *, double,
220  double, double, char *);
221 extern void dgscon (char *, SuperMatrix *, SuperMatrix *,
222  double, double *, SuperLUStat_t*, int *);
223 extern double dPivotGrowth(int, SuperMatrix *, int *,
224  SuperMatrix *, SuperMatrix *);
226  SuperMatrix *, int *, int *, char *, double *,
227  double *, SuperMatrix *, SuperMatrix *,
228  double *, double *, SuperLUStat_t*, int *);
229 
230 extern int sp_dtrsv (char *, char *, char *, SuperMatrix *,
231  SuperMatrix *, double *, SuperLUStat_t*, int *);
232 extern int sp_dgemv (char *, double, SuperMatrix *, double *,
233  int, double, double *, int);
234 
235 extern int sp_dgemm (char *, char *, int, int, int, double,
236  SuperMatrix *, double *, int, double,
237  double *, int);
238 extern double dlamch_(char *);
239 
240 
242 extern int dLUMemInit (fact_t, void *, int, int, int, int, int,
243  double, SuperMatrix *, SuperMatrix *,
244  GlobalLU_t *, int **, double **);
245 extern void dSetRWork (int, int, double *, double **, double **);
246 extern void dLUWorkFree (int *, double *, GlobalLU_t *);
247 extern int dLUMemXpand (int, int, MemType, int *, GlobalLU_t *);
248 
249 extern double *doubleMalloc(int);
250 extern double *doubleCalloc(int);
251 extern int dmemory_usage(const int, const int, const int, const int);
254 
256 extern void dreadhb(int *, int *, int *, double **, int **, int **);
257 extern void dreadrb(int *, int *, int *, double **, int **, int **);
258 extern void dreadtriple(int *, int *, int *, double **, int **, int **);
259 extern void dCompRow_to_CompCol(int, int, int, double*, int*, int*,
260  double **, int **, int **);
261 extern void dfill (double *, int, double);
262 extern void dinf_norm_error (int, SuperMatrix *, double *);
264  double, double, double *, double *, char *);
265 extern double dqselect(int, double *, int);
266 
267 
269 extern void dPrint_CompCol_Matrix(char *, SuperMatrix *);
270 extern void dPrint_SuperNode_Matrix(char *, SuperMatrix *);
271 extern void dPrint_Dense_Matrix(char *, SuperMatrix *);
272 extern void dprint_lu_col(char *, int, int, int *, GlobalLU_t *);
273 extern int print_double_vec(char *, int, double *);
274 extern void check_tempv(int, double *);
275 
276 #ifdef __cplusplus
277  }
278 #endif
279 
280 #endif /* __SUPERLU_dSP_DEFS */
281 
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
trans_t
Definition: oomph_superlu_4.3/superlu_enum_consts.h:21
milu_t
Definition: oomph_superlu_4.3/superlu_enum_consts.h:28
LU_space_t
Definition: oomph_superlu_4.3/superlu_enum_consts.h:26
MemType
Definition: oomph_superlu_4.3/superlu_enum_consts.h:24
fact_t
Definition: oomph_superlu_4.3/superlu_enum_consts.h:17
Mtype_t
Definition: oomph_superlu_4.3/supermatrix.h:31
Dtype_t
Definition: oomph_superlu_4.3/supermatrix.h:24
Stype_t
Definition: oomph_superlu_4.3/supermatrix.h:11
Matrix type definitions.
Macros defining how C routines will be called.
void dgsisv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *)
void PrintPerf(SuperMatrix *, SuperMatrix *, mem_usage_t *, double, double, double *, double *, char *)
void dCreate_CompRow_Matrix(SuperMatrix *, int, int, int, double *, int *, int *, Stype_t, Dtype_t, Mtype_t)
void dCreate_Dense_Matrix(SuperMatrix *, int, int, double *, int, Stype_t, Dtype_t, Mtype_t)
int dpivotL(const int, const double, int *, int *, int *, int *, int *, GlobalLU_t *, SuperLUStat_t *)
int dcolumn_dfs(const int, const int, int *, int *, int *, int *, int *, int *, int *, int *, int *, GlobalLU_t *)
double dlamch_(char *)
int ilu_dpivotL(const int, const double, int *, int *, int, int *, int *, int *, int *, double, milu_t, double, GlobalLU_t *, SuperLUStat_t *)
void dgscon(char *, SuperMatrix *, SuperMatrix *, double, double *, SuperLUStat_t *, int *)
void dgsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *, char *, double *, double *, SuperMatrix *, SuperMatrix *, void *, int, SuperMatrix *, SuperMatrix *, double *, double *, mem_usage_t *, SuperLUStat_t *, int *)
void dCopy_CompCol_Matrix(SuperMatrix *, SuperMatrix *)
void dpanel_bmod(const int, const int, const int, const int, double *, double *, int *, int *, GlobalLU_t *, SuperLUStat_t *)
int dsnode_bmod(const int, const int, const int, double *, double *, GlobalLU_t *, SuperLUStat_t *)
double dqselect(int, double *, int)
double * doubleCalloc(int)
double dPivotGrowth(int, SuperMatrix *, int *, SuperMatrix *, SuperMatrix *)
void dgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *)
Driver routines.
int dcolumn_bmod(const int, const int, double *, double *, int *, int *, int, GlobalLU_t *, SuperLUStat_t *)
void dgsitrf(superlu_options_t *, SuperMatrix *, int, int, int *, void *, int, int *, int *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *)
void dCreate_CompCol_Matrix(SuperMatrix *, int, int, int, double *, int *, int *, Stype_t, Dtype_t, Mtype_t)
Supernodal LU factor related.
void dallocateA(int, int, double **, int **, int **)
void dgsrfs(trans_t, SuperMatrix *, SuperMatrix *, SuperMatrix *, int *, int *, char *, double *, double *, SuperMatrix *, SuperMatrix *, double *, double *, SuperLUStat_t *, int *)
double * doubleMalloc(int)
void dPrint_CompCol_Matrix(char *, SuperMatrix *)
Routines for debugging.
int ilu_dcolumn_dfs(const int, const int, int *, int *, int *, int *, int *, int *, int *, int *, GlobalLU_t *)
int dLUMemXpand(int, int, MemType, int *, GlobalLU_t *)
int sp_dgemv(char *, double, SuperMatrix *, double *, int, double, double *, int)
void dgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *, char *, double *, double *, SuperMatrix *, SuperMatrix *, void *, int, SuperMatrix *, SuperMatrix *, double *, double *, double *, double *, mem_usage_t *, SuperLUStat_t *, int *)
void ilu_dpanel_dfs(const int, const int, const int, SuperMatrix *, int *, int *, double *, double *, int *, int *, int *, int *, int *, int *, GlobalLU_t *)
void dprint_lu_col(char *, int, int, int *, GlobalLU_t *)
void dSetRWork(int, int, double *, double **, double **)
void dCreate_SuperNode_Matrix(SuperMatrix *, int, int, int, double *, int *, int *, int *, int *, int *, Stype_t, Dtype_t, Mtype_t)
void dreadrb(int *, int *, int *, double **, int **, int **)
void fixupL(const int, const int *, GlobalLU_t *)
int ilu_dcopy_to_ucol(int, int, int *, int *, int *, double *, int, milu_t, double, int, double *, int *, GlobalLU_t *, double *)
int ilu_dQuerySpace(SuperMatrix *, SuperMatrix *, mem_usage_t *)
void dlaqgs(SuperMatrix *, double *, double *, double, double, double, char *)
void countnz(const int, int *, int *, int *, GlobalLU_t *)
void dgstrs(trans_t, SuperMatrix *, SuperMatrix *, int *, int *, SuperMatrix *, SuperLUStat_t *, int *)
void dpruneL(const int, const int *, const int, const int, const int *, const int *, int *, GlobalLU_t *)
void dCopy_Dense_Matrix(int, int, double *, int, double *, int)
int dcopy_to_ucol(int, int, int *, int *, int *, double *, GlobalLU_t *)
int dQuerySpace(SuperMatrix *, SuperMatrix *, mem_usage_t *)
int dmemory_usage(const int, const int, const int, const int)
int dLUMemInit(fact_t, void *, int, int, int, int, int, double, SuperMatrix *, SuperMatrix *, GlobalLU_t *, int **, double **)
Memory-related.
void dFillRHS(trans_t, int, double *, int, SuperMatrix *, SuperMatrix *)
int print_double_vec(char *, int, double *)
void ilu_countnz(const int, int *, int *, GlobalLU_t *)
int dsnode_dfs(const int, const int, const int *, const int *, const int *, int *, int *, GlobalLU_t *)
void dfill(double *, int, double)
int int_t
Definition: slu_ddefs.h:78
int sp_dgemm(char *, char *, int, int, int, double, SuperMatrix *, double *, int, double, double *, int)
void dreadhb(int *, int *, int *, double **, int **, int **)
Auxiliary routines.
void dgstrf(superlu_options_t *, SuperMatrix *, int, int, int *, void *, int, int *, int *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *)
int ilu_ddrop_row(superlu_options_t *, int, int, double, int, int *, double *, GlobalLU_t *, double *, double *, int)
void check_tempv(int, double *)
void dpanel_dfs(const int, const int, const int, SuperMatrix *, int *, int *, double *, int *, int *, int *, int *, int *, int *, int *, GlobalLU_t *)
int ilu_dsnode_dfs(const int, const int, const int *, const int *, const int *, int *, GlobalLU_t *)
void dreadtriple(int *, int *, int *, double **, int **, int **)
void dPrint_Dense_Matrix(char *, SuperMatrix *)
int dldperm(int, int, int, int[], int[], double[], int[], double[], double[])
void dPrint_SuperNode_Matrix(char *, SuperMatrix *)
void dinf_norm_error(int, SuperMatrix *, double *)
void dLUWorkFree(int *, double *, GlobalLU_t *)
void dGenXtrue(int, int, double *, int)
void dreadmt(int *, int *, int *, double **, int **, int **)
int sp_dtrsv(char *, char *, char *, SuperMatrix *, SuperMatrix *, double *, SuperLUStat_t *, int *)
void dCompRow_to_CompCol(int, int, int, double *, int *, int *, double **, int **, int **)
void dgsequ(SuperMatrix *, double *, double *, double *, double *, double *, int *)
Driver related.
Utility header file.
Definition: slu_cdefs.h:89
double * lusup
Definition: slu_ddefs.h:93
double * ucol
Definition: slu_ddefs.h:95
Definition: slu_util.h:282
Definition: slu_util.h:290
Definition: oomph_superlu_4.3/supermatrix.h:43
Headers for 4 types of dynamatically managed memory.
Definition: slu_util.h:277
Definition: slu_util.h:299
Definition: slu_util.h:246