slu_cdefs.h
Go to the documentation of this file.
1 
63 #ifndef __SUPERLU_cSP_DEFS /* allow multiple inclusions */
64 #define __SUPERLU_cSP_DEFS
65 
66 /*
67  * File name: csp_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_scomplex.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  complex *lusup; /* L supernodes */
95  int *xlusup;
96  complex *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 */
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 cgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
122  char *, float *, float *, SuperMatrix *, SuperMatrix *,
123  void *, int, SuperMatrix *, SuperMatrix *,
124  float *, float *, float *, float *,
125  mem_usage_t *, SuperLUStat_t *, int *);
126  /* ILU */
127 extern void
129  SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
130 extern void
131 cgsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
132  char *, float *, float *, SuperMatrix *, SuperMatrix *,
133  void *, int, SuperMatrix *, SuperMatrix *, float *, float *,
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
154 cCopy_Dense_Matrix(int, int, complex *, int, complex *, int);
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 callocateA (int, int, complex **, int **, int **);
162  int, int, int*, void *, int, int *, int *,
163  SuperMatrix *, SuperMatrix *, SuperLUStat_t*, int *);
164 extern int csnode_dfs (const int, const int, const int *, const int *,
165  const int *, int *, int *, GlobalLU_t *);
166 extern int csnode_bmod (const int, const int, const int, complex *,
168 extern void cpanel_dfs (const int, const int, const int, SuperMatrix *,
169  int *, int *, complex *, int *, int *, int *,
170  int *, int *, int *, int *, GlobalLU_t *);
171 extern void cpanel_bmod (const int, const int, const int, const int,
172  complex *, complex *, int *, int *,
174 extern int ccolumn_dfs (const int, const int, int *, int *, int *, int *,
175  int *, int *, int *, int *, int *, GlobalLU_t *);
176 extern int ccolumn_bmod (const int, const int, complex *,
177  complex *, int *, int *, int,
179 extern int ccopy_to_ucol (int, int, int *, int *, int *,
180  complex *, GlobalLU_t *);
181 extern int cpivotL (const int, const double, int *, int *,
182  int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
183 extern void cpruneL (const int, const int *, const int, const int,
184  const int *, const int *, int *, GlobalLU_t *);
185 extern void creadmt (int *, int *, int *, complex **, int **, int **);
186 extern void cGenXtrue (int, int, complex *, int);
187 extern void cFillRHS (trans_t, int, complex *, int, SuperMatrix *,
188  SuperMatrix *);
189 extern void cgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
190  SuperMatrix *, SuperLUStat_t*, int *);
191 /* ILU */
192 extern void cgsitrf (superlu_options_t*, SuperMatrix*, int, int, int*,
193  void *, int, int *, int *, SuperMatrix *, SuperMatrix *,
194  SuperLUStat_t*, int *);
195 extern int cldperm(int, int, int, int [], int [], complex [],
196  int [], float [], float []);
197 extern int ilu_csnode_dfs (const int, const int, const int *, const int *,
198  const int *, int *, GlobalLU_t *);
199 extern void ilu_cpanel_dfs (const int, const int, const int, SuperMatrix *,
200  int *, int *, complex *, float *, int *, int *,
201  int *, int *, int *, int *, GlobalLU_t *);
202 extern int ilu_ccolumn_dfs (const int, const int, int *, int *, int *,
203  int *, int *, int *, int *, int *,
204  GlobalLU_t *);
205 extern int ilu_ccopy_to_ucol (int, int, int *, int *, int *,
206  complex *, int, milu_t, double, int,
207  complex *, int *, GlobalLU_t *, float *);
208 extern int ilu_cpivotL (const int, const double, int *, int *, int, int *,
209  int *, int *, int *, double, milu_t,
211 extern int ilu_cdrop_row (superlu_options_t *, int, int, double,
212  int, int *, double *, GlobalLU_t *,
213  float *, float *, int);
214 
215 
218 extern void cgsequ (SuperMatrix *, float *, float *, float *,
219  float *, float *, int *);
220 extern void claqgs (SuperMatrix *, float *, float *, float,
221  float, float, char *);
222 extern void cgscon (char *, SuperMatrix *, SuperMatrix *,
223  float, float *, SuperLUStat_t*, int *);
224 extern float cPivotGrowth(int, SuperMatrix *, int *,
225  SuperMatrix *, SuperMatrix *);
227  SuperMatrix *, int *, int *, char *, float *,
228  float *, SuperMatrix *, SuperMatrix *,
229  float *, float *, SuperLUStat_t*, int *);
230 
231 extern int sp_ctrsv (char *, char *, char *, SuperMatrix *,
232  SuperMatrix *, complex *, SuperLUStat_t*, int *);
233 extern int sp_cgemv (char *, complex, SuperMatrix *, complex *,
234  int, complex, complex *, int);
235 
236 extern int sp_cgemm (char *, char *, int, int, int, complex,
237  SuperMatrix *, complex *, int, complex,
238  complex *, int);
239 extern float slamch_(char *);
240 
241 
243 extern int cLUMemInit (fact_t, void *, int, int, int, int, int,
244  float, SuperMatrix *, SuperMatrix *,
245  GlobalLU_t *, int **, complex **);
246 extern void cSetRWork (int, int, complex *, complex **, complex **);
247 extern void cLUWorkFree (int *, complex *, GlobalLU_t *);
248 extern int cLUMemXpand (int, int, MemType, int *, GlobalLU_t *);
249 
250 extern complex *complexMalloc(int);
251 extern complex *complexCalloc(int);
252 extern float *floatMalloc(int);
253 extern float *floatCalloc(int);
254 extern int cmemory_usage(const int, const int, const int, const int);
257 
259 extern void creadhb(int *, int *, int *, complex **, int **, int **);
260 extern void creadrb(int *, int *, int *, complex **, int **, int **);
261 extern void creadtriple(int *, int *, int *, complex **, int **, int **);
262 extern void cCompRow_to_CompCol(int, int, int, complex*, int*, int*,
263  complex **, int **, int **);
264 extern void cfill (complex *, int, complex);
265 extern void cinf_norm_error (int, SuperMatrix *, complex *);
267  complex, complex, complex *, complex *, char *);
268 extern float sqselect(int, float *, int);
269 
270 
272 extern void cPrint_CompCol_Matrix(char *, SuperMatrix *);
273 extern void cPrint_SuperNode_Matrix(char *, SuperMatrix *);
274 extern void cPrint_Dense_Matrix(char *, SuperMatrix *);
275 extern void cprint_lu_col(char *, int, int, int *, GlobalLU_t *);
276 extern int print_double_vec(char *, int, double *);
277 extern void check_tempv(int, complex *);
278 
279 #ifdef __cplusplus
280  }
281 #endif
282 
283 #endif /* __SUPERLU_cSP_DEFS */
284 
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.
int sp_cgemm(char *, char *, int, int, int, complex, SuperMatrix *, complex *, int, complex, complex *, int)
void creadrb(int *, int *, int *, complex **, int **, int **)
int cLUMemInit(fact_t, void *, int, int, int, int, int, float, SuperMatrix *, SuperMatrix *, GlobalLU_t *, int **, complex **)
Memory-related.
void cgstrf(superlu_options_t *, SuperMatrix *, int, int, int *, void *, int, int *, int *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *)
int ccolumn_bmod(const int, const int, complex *, complex *, int *, int *, int, GlobalLU_t *, SuperLUStat_t *)
void cPrint_Dense_Matrix(char *, SuperMatrix *)
void callocateA(int, int, complex **, int **, int **)
int ccopy_to_ucol(int, int, int *, int *, int *, complex *, GlobalLU_t *)
int cLUMemXpand(int, int, MemType, int *, GlobalLU_t *)
void cgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *, char *, float *, float *, SuperMatrix *, SuperMatrix *, void *, int, SuperMatrix *, SuperMatrix *, float *, float *, float *, float *, mem_usage_t *, SuperLUStat_t *, int *)
void cinf_norm_error(int, SuperMatrix *, complex *)
void cCopy_CompCol_Matrix(SuperMatrix *, SuperMatrix *)
void cgscon(char *, SuperMatrix *, SuperMatrix *, float, float *, SuperLUStat_t *, int *)
void check_tempv(int, complex *)
void creadhb(int *, int *, int *, complex **, int **, int **)
Auxiliary routines.
void cgsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *, char *, float *, float *, SuperMatrix *, SuperMatrix *, void *, int, SuperMatrix *, SuperMatrix *, float *, float *, mem_usage_t *, SuperLUStat_t *, int *)
void cCompRow_to_CompCol(int, int, int, complex *, int *, int *, complex **, int **, int **)
float * floatCalloc(int)
float * floatMalloc(int)
float slamch_(char *)
int cpivotL(const int, const double, int *, int *, int *, int *, int *, GlobalLU_t *, SuperLUStat_t *)
void cprint_lu_col(char *, int, int, int *, GlobalLU_t *)
void cCreate_CompCol_Matrix(SuperMatrix *, int, int, int, complex *, int *, int *, Stype_t, Dtype_t, Mtype_t)
Supernodal LU factor related.
void cgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *)
Driver routines.
int sp_cgemv(char *, complex, SuperMatrix *, complex *, int, complex, complex *, int)
void cfill(complex *, int, complex)
void cCreate_SuperNode_Matrix(SuperMatrix *, int, int, int, complex *, int *, int *, int *, int *, int *, Stype_t, Dtype_t, Mtype_t)
void cgsrfs(trans_t, SuperMatrix *, SuperMatrix *, SuperMatrix *, int *, int *, char *, float *, float *, SuperMatrix *, SuperMatrix *, float *, float *, SuperLUStat_t *, int *)
void cpruneL(const int, const int *, const int, const int, const int *, const int *, int *, GlobalLU_t *)
int ccolumn_dfs(const int, const int, int *, int *, int *, int *, int *, int *, int *, int *, int *, GlobalLU_t *)
void fixupL(const int, const int *, GlobalLU_t *)
void cCopy_Dense_Matrix(int, int, complex *, int, complex *, int)
void cpanel_dfs(const int, const int, const int, SuperMatrix *, int *, int *, complex *, int *, int *, int *, int *, int *, int *, int *, GlobalLU_t *)
void PrintPerf(SuperMatrix *, SuperMatrix *, mem_usage_t *, complex, complex, complex *, complex *, char *)
int cQuerySpace(SuperMatrix *, SuperMatrix *, mem_usage_t *)
void creadtriple(int *, int *, int *, complex **, int **, int **)
void cGenXtrue(int, int, complex *, int)
void countnz(const int, int *, int *, int *, GlobalLU_t *)
int sp_ctrsv(char *, char *, char *, SuperMatrix *, SuperMatrix *, complex *, SuperLUStat_t *, int *)
void cgsitrf(superlu_options_t *, SuperMatrix *, int, int, int *, void *, int, int *, int *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *)
void cPrint_SuperNode_Matrix(char *, SuperMatrix *)
void cCreate_CompRow_Matrix(SuperMatrix *, int, int, int, complex *, int *, int *, Stype_t, Dtype_t, Mtype_t)
void creadmt(int *, int *, int *, complex **, int **, int **)
void cgsisv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *)
int ilu_ccolumn_dfs(const int, const int, int *, int *, int *, int *, int *, int *, int *, int *, GlobalLU_t *)
int ilu_cQuerySpace(SuperMatrix *, SuperMatrix *, mem_usage_t *)
float sqselect(int, float *, int)
float cPivotGrowth(int, SuperMatrix *, int *, SuperMatrix *, SuperMatrix *)
void cCreate_Dense_Matrix(SuperMatrix *, int, int, complex *, int, Stype_t, Dtype_t, Mtype_t)
void ilu_cpanel_dfs(const int, const int, const int, SuperMatrix *, int *, int *, complex *, float *, int *, int *, int *, int *, int *, int *, GlobalLU_t *)
void cgstrs(trans_t, SuperMatrix *, SuperMatrix *, int *, int *, SuperMatrix *, SuperLUStat_t *, int *)
void cLUWorkFree(int *, complex *, GlobalLU_t *)
int ilu_ccopy_to_ucol(int, int, int *, int *, int *, complex *, int, milu_t, double, int, complex *, int *, GlobalLU_t *, float *)
int csnode_bmod(const int, const int, const int, complex *, complex *, GlobalLU_t *, SuperLUStat_t *)
int print_double_vec(char *, int, double *)
void ilu_countnz(const int, int *, int *, GlobalLU_t *)
void cFillRHS(trans_t, int, complex *, int, SuperMatrix *, SuperMatrix *)
int int_t
Definition: slu_cdefs.h:78
void cpanel_bmod(const int, const int, const int, const int, complex *, complex *, int *, int *, GlobalLU_t *, SuperLUStat_t *)
int ilu_csnode_dfs(const int, const int, const int *, const int *, const int *, int *, GlobalLU_t *)
int ilu_cpivotL(const int, const double, int *, int *, int, int *, int *, int *, int *, double, milu_t, complex, GlobalLU_t *, SuperLUStat_t *)
int cldperm(int, int, int, int[], int[], complex[], int[], float[], float[])
int csnode_dfs(const int, const int, const int *, const int *, const int *, int *, int *, GlobalLU_t *)
int cmemory_usage(const int, const int, const int, const int)
int ilu_cdrop_row(superlu_options_t *, int, int, double, int, int *, double *, GlobalLU_t *, float *, float *, int)
void cgsequ(SuperMatrix *, float *, float *, float *, float *, float *, int *)
Driver related.
complex * complexMalloc(int)
void claqgs(SuperMatrix *, float *, float *, float, float, float, char *)
void cPrint_CompCol_Matrix(char *, SuperMatrix *)
Routines for debugging.
void cSetRWork(int, int, complex *, complex **, complex **)
complex * complexCalloc(int)
Header file for complex operations.
Utility header file.
Definition: slu_cdefs.h:89
int * xusub
Definition: slu_cdefs.h:98
int * xlsub
Definition: slu_cdefs.h:93
int * xlusup
Definition: slu_cdefs.h:95
ExpHeader * expanders
Definition: slu_cdefs.h:105
int num_expansions
Definition: slu_cdefs.h:104
int nzlmax
Definition: slu_cdefs.h:99
int n
Definition: slu_cdefs.h:102
int nzumax
Definition: slu_cdefs.h:100
int * usub
Definition: slu_cdefs.h:97
int * lsub
Definition: slu_cdefs.h:92
LU_space_t MemModel
Definition: slu_cdefs.h:103
LU_stack_t stack
Definition: slu_cdefs.h:106
int * supno
Definition: slu_cdefs.h:91
complex * lusup
Definition: slu_cdefs.h:94
int nzlumax
Definition: slu_cdefs.h:101
complex * ucol
Definition: slu_cdefs.h:96
int * xsup
Definition: slu_cdefs.h:90
Definition: slu_util.h:282
Definition: slu_util.h:290
Definition: oomph_superlu_4.3/supermatrix.h:43
Definition: datatypes.h:12
Headers for 4 types of dynamatically managed memory.
Definition: slu_util.h:277
Definition: slu_util.h:299
Definition: slu_util.h:246