slu_zdefs.h
Go to the documentation of this file.
1 
63 #ifndef __SUPERLU_zSP_DEFS /* allow multiple inclusions */
64 #define __SUPERLU_zSP_DEFS
65 
66 /*
67  * File name: zsp_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 #include "slu_dcomplex.h"
86 
87 
88 
89 typedef struct {
90  int *xsup; /* supernode and column mapping */
91  int *supno;
92  int *lsub; /* compressed L subscripts */
93  int *xlsub;
94  doublecomplex *lusup; /* L supernodes */
95  int *xlusup;
96  doublecomplex *ucol; /* U columns */
97  int *usub;
98  int *xusub;
99  int nzlmax; /* current max size of lsub */
100  int nzumax; /* " " " ucol */
101  int nzlumax; /* " " " lusup */
102  int n; /* number of columns in the matrix */
103  LU_space_t MemModel; /* 0 - system malloc'd; 1 - user provided */
104  int num_expansions;
105  ExpHeader *expanders; /* Array of pointers to 4 types of memory */
106  LU_stack_t stack; /* use user supplied memory */
107 } GlobalLU_t;
108 
109 
110 /* -------- Prototypes -------- */
111 
112 #ifdef __cplusplus
113 extern "C" {
114 #endif
115 
117 extern void
119  SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
120 extern void
121 zgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
122  char *, double *, double *, SuperMatrix *, SuperMatrix *,
123  void *, int, SuperMatrix *, SuperMatrix *,
124  double *, double *, double *, double *,
125  mem_usage_t *, SuperLUStat_t *, int *);
126  /* ILU */
127 extern void
129  SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
130 extern void
131 zgsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
132  char *, double *, double *, SuperMatrix *, SuperMatrix *,
133  void *, int, SuperMatrix *, SuperMatrix *, double *, double *,
134  mem_usage_t *, SuperLUStat_t *, int *);
135 
136 
138 extern void
140  int *, int *, Stype_t, Dtype_t, Mtype_t);
141 extern void
143  int *, int *, Stype_t, Dtype_t, Mtype_t);
144 extern void
146 extern void
149 extern void
151  int *, int *, int *, int *, int *,
153 extern void
155 
156 extern void countnz (const int, int *, int *, int *, GlobalLU_t *);
157 extern void ilu_countnz (const int, int *, int *, GlobalLU_t *);
158 extern void fixupL (const int, const int *, GlobalLU_t *);
159 
160 extern void zallocateA (int, int, doublecomplex **, int **, int **);
162  int, int, int*, void *, int, int *, int *,
163  SuperMatrix *, SuperMatrix *, SuperLUStat_t*, int *);
164 extern int zsnode_dfs (const int, const int, const int *, const int *,
165  const int *, int *, int *, GlobalLU_t *);
166 extern int zsnode_bmod (const int, const int, const int, doublecomplex *,
168 extern void zpanel_dfs (const int, const int, const int, SuperMatrix *,
169  int *, int *, doublecomplex *, int *, int *, int *,
170  int *, int *, int *, int *, GlobalLU_t *);
171 extern void zpanel_bmod (const int, const int, const int, const int,
172  doublecomplex *, doublecomplex *, int *, int *,
174 extern int zcolumn_dfs (const int, const int, int *, int *, int *, int *,
175  int *, int *, int *, int *, int *, GlobalLU_t *);
176 extern int zcolumn_bmod (const int, const int, doublecomplex *,
177  doublecomplex *, int *, int *, int,
179 extern int zcopy_to_ucol (int, int, int *, int *, int *,
180  doublecomplex *, GlobalLU_t *);
181 extern int zpivotL (const int, const double, int *, int *,
182  int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
183 extern void zpruneL (const int, const int *, const int, const int,
184  const int *, const int *, int *, GlobalLU_t *);
185 extern void zreadmt (int *, int *, int *, doublecomplex **, int **, int **);
186 extern void zGenXtrue (int, int, doublecomplex *, int);
187 extern void zFillRHS (trans_t, int, doublecomplex *, int, SuperMatrix *,
188  SuperMatrix *);
189 extern void zgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
190  SuperMatrix *, SuperLUStat_t*, int *);
191 /* ILU */
192 extern void zgsitrf (superlu_options_t*, SuperMatrix*, int, int, int*,
193  void *, int, int *, int *, SuperMatrix *, SuperMatrix *,
194  SuperLUStat_t*, int *);
195 extern int zldperm(int, int, int, int [], int [], doublecomplex [],
196  int [], double [], double []);
197 extern int ilu_zsnode_dfs (const int, const int, const int *, const int *,
198  const int *, int *, GlobalLU_t *);
199 extern void ilu_zpanel_dfs (const int, const int, const int, SuperMatrix *,
200  int *, int *, doublecomplex *, double *, int *, int *,
201  int *, int *, int *, int *, GlobalLU_t *);
202 extern int ilu_zcolumn_dfs (const int, const int, int *, int *, int *,
203  int *, int *, int *, int *, int *,
204  GlobalLU_t *);
205 extern int ilu_zcopy_to_ucol (int, int, int *, int *, int *,
206  doublecomplex *, int, milu_t, double, int,
207  doublecomplex *, int *, GlobalLU_t *, double *);
208 extern int ilu_zpivotL (const int, const double, int *, int *, int, int *,
209  int *, int *, int *, double, milu_t,
211 extern int ilu_zdrop_row (superlu_options_t *, int, int, double,
212  int, int *, double *, GlobalLU_t *,
213  double *, double *, int);
214 
215 
218 extern void zgsequ (SuperMatrix *, double *, double *, double *,
219  double *, double *, int *);
220 extern void zlaqgs (SuperMatrix *, double *, double *, double,
221  double, double, char *);
222 extern void zgscon (char *, SuperMatrix *, SuperMatrix *,
223  double, double *, SuperLUStat_t*, int *);
224 extern double zPivotGrowth(int, SuperMatrix *, int *,
225  SuperMatrix *, SuperMatrix *);
227  SuperMatrix *, int *, int *, char *, double *,
228  double *, SuperMatrix *, SuperMatrix *,
229  double *, double *, SuperLUStat_t*, int *);
230 
231 extern int sp_ztrsv (char *, char *, char *, SuperMatrix *,
232  SuperMatrix *, doublecomplex *, SuperLUStat_t*, int *);
234  int, doublecomplex, doublecomplex *, int);
235 
236 extern int sp_zgemm (char *, char *, int, int, int, doublecomplex,
238  doublecomplex *, int);
239 extern double dlamch_(char *);
240 
241 
243 extern int zLUMemInit (fact_t, void *, int, int, int, int, int,
244  double, SuperMatrix *, SuperMatrix *,
245  GlobalLU_t *, int **, doublecomplex **);
246 extern void zSetRWork (int, int, doublecomplex *, doublecomplex **, doublecomplex **);
247 extern void zLUWorkFree (int *, doublecomplex *, GlobalLU_t *);
248 extern int zLUMemXpand (int, int, MemType, int *, GlobalLU_t *);
249 
252 extern double *doubleMalloc(int);
253 extern double *doubleCalloc(int);
254 extern int zmemory_usage(const int, const int, const int, const int);
257 
259 extern void zreadhb(int *, int *, int *, doublecomplex **, int **, int **);
260 extern void zreadrb(int *, int *, int *, doublecomplex **, int **, int **);
261 extern void zreadtriple(int *, int *, int *, doublecomplex **, int **, int **);
262 extern void zCompRow_to_CompCol(int, int, int, doublecomplex*, int*, int*,
263  doublecomplex **, int **, int **);
264 extern void zfill (doublecomplex *, int, doublecomplex);
265 extern void zinf_norm_error (int, SuperMatrix *, doublecomplex *);
268 extern double dqselect(int, double *, int);
269 
270 
272 extern void zPrint_CompCol_Matrix(char *, SuperMatrix *);
273 extern void zPrint_SuperNode_Matrix(char *, SuperMatrix *);
274 extern void zPrint_Dense_Matrix(char *, SuperMatrix *);
275 extern void zprint_lu_col(char *, int, int, int *, GlobalLU_t *);
276 extern int print_double_vec(char *, int, double *);
277 extern void check_tempv(int, doublecomplex *);
278 
279 #ifdef __cplusplus
280  }
281 #endif
282 
283 #endif /* __SUPERLU_zSP_DEFS */
284 
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.
Header file for complex operations.
Utility header file.
int zcopy_to_ucol(int, int, int *, int *, int *, doublecomplex *, GlobalLU_t *)
void zPrint_CompCol_Matrix(char *, SuperMatrix *)
Routines for debugging.
void zgsisv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *)
int ilu_zcopy_to_ucol(int, int, int *, int *, int *, doublecomplex *, int, milu_t, double, int, doublecomplex *, int *, GlobalLU_t *, double *)
int zLUMemInit(fact_t, void *, int, int, int, int, int, double, SuperMatrix *, SuperMatrix *, GlobalLU_t *, int **, doublecomplex **)
Memory-related.
double dlamch_(char *)
void zgstrs(trans_t, SuperMatrix *, SuperMatrix *, int *, int *, SuperMatrix *, SuperLUStat_t *, int *)
int zldperm(int, int, int, int[], int[], doublecomplex[], int[], double[], double[])
void zallocateA(int, int, doublecomplex **, int **, int **)
double dqselect(int, double *, int)
int sp_zgemv(char *, doublecomplex, SuperMatrix *, doublecomplex *, int, doublecomplex, doublecomplex *, int)
double * doubleCalloc(int)
void zgsitrf(superlu_options_t *, SuperMatrix *, int, int, int *, void *, int, int *, int *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *)
void zgsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *, char *, double *, double *, SuperMatrix *, SuperMatrix *, void *, int, SuperMatrix *, SuperMatrix *, double *, double *, mem_usage_t *, SuperLUStat_t *, int *)
int zLUMemXpand(int, int, MemType, int *, GlobalLU_t *)
void zprint_lu_col(char *, int, int, int *, GlobalLU_t *)
void zgscon(char *, SuperMatrix *, SuperMatrix *, double, double *, SuperLUStat_t *, int *)
double * doubleMalloc(int)
int zcolumn_bmod(const int, const int, doublecomplex *, doublecomplex *, int *, int *, int, GlobalLU_t *, SuperLUStat_t *)
void zCopy_Dense_Matrix(int, int, doublecomplex *, int, doublecomplex *, int)
void zPrint_Dense_Matrix(char *, SuperMatrix *)
int sp_ztrsv(char *, char *, char *, SuperMatrix *, SuperMatrix *, doublecomplex *, SuperLUStat_t *, int *)
void zLUWorkFree(int *, doublecomplex *, GlobalLU_t *)
void zpanel_bmod(const int, const int, const int, const int, doublecomplex *, doublecomplex *, int *, int *, GlobalLU_t *, SuperLUStat_t *)
void zgstrf(superlu_options_t *, SuperMatrix *, int, int, int *, void *, int, int *, int *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *)
int zmemory_usage(const int, const int, const int, const int)
int ilu_zQuerySpace(SuperMatrix *, SuperMatrix *, mem_usage_t *)
void zCopy_CompCol_Matrix(SuperMatrix *, SuperMatrix *)
void fixupL(const int, const int *, GlobalLU_t *)
int zQuerySpace(SuperMatrix *, SuperMatrix *, mem_usage_t *)
int sp_zgemm(char *, char *, int, int, int, doublecomplex, SuperMatrix *, doublecomplex *, int, doublecomplex, doublecomplex *, int)
void zCreate_CompCol_Matrix(SuperMatrix *, int, int, int, doublecomplex *, int *, int *, Stype_t, Dtype_t, Mtype_t)
Supernodal LU factor related.
void zgssvx(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 zgsrfs(trans_t, SuperMatrix *, SuperMatrix *, SuperMatrix *, int *, int *, char *, double *, double *, SuperMatrix *, SuperMatrix *, double *, double *, SuperLUStat_t *, int *)
void zinf_norm_error(int, SuperMatrix *, doublecomplex *)
void countnz(const int, int *, int *, int *, GlobalLU_t *)
void check_tempv(int, doublecomplex *)
void zFillRHS(trans_t, int, doublecomplex *, int, SuperMatrix *, SuperMatrix *)
double zPivotGrowth(int, SuperMatrix *, int *, SuperMatrix *, SuperMatrix *)
void zpruneL(const int, const int *, const int, const int, const int *, const int *, int *, GlobalLU_t *)
int ilu_zdrop_row(superlu_options_t *, int, int, double, int, int *, double *, GlobalLU_t *, double *, double *, int)
void zreadtriple(int *, int *, int *, doublecomplex **, int **, int **)
int ilu_zsnode_dfs(const int, const int, const int *, const int *, const int *, int *, GlobalLU_t *)
void zSetRWork(int, int, doublecomplex *, doublecomplex **, doublecomplex **)
void zlaqgs(SuperMatrix *, double *, double *, double, double, double, char *)
int print_double_vec(char *, int, double *)
void ilu_countnz(const int, int *, int *, GlobalLU_t *)
void zCompRow_to_CompCol(int, int, int, doublecomplex *, int *, int *, doublecomplex **, int **, int **)
int int_t
Definition: slu_zdefs.h:78
doublecomplex * doublecomplexCalloc(int)
int zcolumn_dfs(const int, const int, int *, int *, int *, int *, int *, int *, int *, int *, int *, GlobalLU_t *)
void zCreate_Dense_Matrix(SuperMatrix *, int, int, doublecomplex *, int, Stype_t, Dtype_t, Mtype_t)
int ilu_zpivotL(const int, const double, int *, int *, int, int *, int *, int *, int *, double, milu_t, doublecomplex, GlobalLU_t *, SuperLUStat_t *)
void zGenXtrue(int, int, doublecomplex *, int)
void ilu_zpanel_dfs(const int, const int, const int, SuperMatrix *, int *, int *, doublecomplex *, double *, int *, int *, int *, int *, int *, int *, GlobalLU_t *)
void zCreate_SuperNode_Matrix(SuperMatrix *, int, int, int, doublecomplex *, int *, int *, int *, int *, int *, Stype_t, Dtype_t, Mtype_t)
void zreadhb(int *, int *, int *, doublecomplex **, int **, int **)
Auxiliary routines.
void zreadmt(int *, int *, int *, doublecomplex **, int **, int **)
void zCreate_CompRow_Matrix(SuperMatrix *, int, int, int, doublecomplex *, int *, int *, Stype_t, Dtype_t, Mtype_t)
int zpivotL(const int, const double, int *, int *, int *, int *, int *, GlobalLU_t *, SuperLUStat_t *)
void zpanel_dfs(const int, const int, const int, SuperMatrix *, int *, int *, doublecomplex *, int *, int *, int *, int *, int *, int *, int *, GlobalLU_t *)
void zgsequ(SuperMatrix *, double *, double *, double *, double *, double *, int *)
Driver related.
doublecomplex * doublecomplexMalloc(int)
void zreadrb(int *, int *, int *, doublecomplex **, int **, int **)
void PrintPerf(SuperMatrix *, SuperMatrix *, mem_usage_t *, doublecomplex, doublecomplex, doublecomplex *, doublecomplex *, char *)
int zsnode_dfs(const int, const int, const int *, const int *, const int *, int *, int *, GlobalLU_t *)
void zgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *)
Driver routines.
int zsnode_bmod(const int, const int, const int, doublecomplex *, doublecomplex *, GlobalLU_t *, SuperLUStat_t *)
void zPrint_SuperNode_Matrix(char *, SuperMatrix *)
int ilu_zcolumn_dfs(const int, const int, int *, int *, int *, int *, int *, int *, int *, int *, GlobalLU_t *)
void zfill(doublecomplex *, int, doublecomplex)
Definition: slu_cdefs.h:89
doublecomplex * lusup
Definition: slu_zdefs.h:94
doublecomplex * ucol
Definition: slu_zdefs.h:96
Definition: slu_util.h:282
Definition: slu_util.h:290
Definition: oomph_superlu_4.3/supermatrix.h:43
Definition: datatypes.h:15
Headers for 4 types of dynamatically managed memory.
Definition: slu_util.h:277
Definition: slu_util.h:299
Definition: slu_util.h:246