SuperLU 6.0.1
slu_zdefs.h
Go to the documentation of this file.
1
73#ifndef __SUPERLU_zSP_DEFS /* allow multiple inclusions */
74#define __SUPERLU_zSP_DEFS
75
76/*
77 * File name: zsp_defs.h
78 * Purpose: Sparse matrix types and function prototypes
79 * History:
80 */
81
82#ifdef _CRAY
83#include <fortran.h>
84#endif
85
86#include <math.h>
87#include <limits.h>
88#include <stdio.h>
89#include <stdlib.h>
90#include <stdint.h>
91#include <string.h>
92#include "slu_Cnames.h"
93#include "superlu_config.h"
94#include "supermatrix.h"
95#include "slu_util.h"
96#include "slu_dcomplex.h"
97
98
99/* -------- Prototypes -------- */
100
101#ifdef __cplusplus
102extern "C" {
103#endif
104
106extern void
107zgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
109extern void
110zgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
111 char *, double *, double *, SuperMatrix *, SuperMatrix *,
112 void *, int_t lwork, SuperMatrix *, SuperMatrix *,
113 double *, double *, double *, double *,
115 /* ILU */
116extern void
118 SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
119extern void
120zgsisx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
121 int *etree, char *equed, double *R, double *C,
122 SuperMatrix *L, SuperMatrix *U, void *work, int_t lwork,
123 SuperMatrix *B, SuperMatrix *X, double *recip_pivot_growth, double *rcond,
124 GlobalLU_t *Glu, mem_usage_t *mem_usage, SuperLUStat_t *stat, int_t *info);
125
126
128extern void
131extern void
134extern void zCompRow_to_CompCol(int, int, int_t, doublecomplex*, int_t*, int_t*,
135 doublecomplex **, int_t **, int_t **);
136extern void
138extern void
141extern void
143 int_t *, int_t *, int_t *, int *, int *,
145extern void
146zCopy_Dense_Matrix(int, int, doublecomplex *, int, doublecomplex *, int);
147
148extern void zallocateA (int, int_t, doublecomplex **, int_t **, int_t **);
149extern void zgstrf (superlu_options_t*, SuperMatrix*,
150 int, int, int*, void *, int_t, int *, int *,
152 SuperLUStat_t*, int_t *info);
153extern int_t zsnode_dfs (const int, const int, const int_t *, const int_t *,
154 const int_t *, int_t *, int *, GlobalLU_t *);
155extern int zsnode_bmod (const int, const int, const int, doublecomplex *,
157extern void zpanel_dfs (const int, const int, const int, SuperMatrix *,
158 int *, int *, doublecomplex *, int *, int *, int *,
159 int_t *, int *, int *, int_t *, GlobalLU_t *);
160extern void zpanel_bmod (const int, const int, const int, const int,
161 doublecomplex *, doublecomplex *, int *, int *,
163extern int zcolumn_dfs (const int, const int, int *, int *, int *, int *,
164 int *, int_t *, int *, int *, int_t *, GlobalLU_t *);
165extern int zcolumn_bmod (const int, const int, doublecomplex *,
166 doublecomplex *, int *, int *, int,
168extern int zcopy_to_ucol (int, int, int *, int *, int *,
170extern int zpivotL (const int, const double, int *, int *,
171 int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
172extern void zpruneL (const int, const int *, const int, const int,
173 const int *, const int *, int_t *, GlobalLU_t *);
174extern void zreadmt (int *, int *, int_t *, doublecomplex **, int_t **, int_t **);
175extern void zGenXtrue (int, int, doublecomplex *, int);
176extern void zFillRHS (trans_t, int, doublecomplex *, int, SuperMatrix *,
177 SuperMatrix *);
178extern void zgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
179 SuperMatrix *, SuperLUStat_t*, int *);
180/* ILU */
181extern void zgsitrf (superlu_options_t*, SuperMatrix*, int, int, int*,
182 void *, int_t, int *, int *, SuperMatrix *, SuperMatrix *,
183 GlobalLU_t *, SuperLUStat_t*, int_t *info);
184extern int zldperm(int, int, int_t, int_t [], int_t [], doublecomplex [],
185 int [], double [], double []);
186extern int ilu_zsnode_dfs (const int, const int, const int_t *, const int_t *,
187 const int_t *, int *, GlobalLU_t *);
188extern void ilu_zpanel_dfs (const int, const int, const int, SuperMatrix *,
189 int *, int *, doublecomplex *, double *, int *, int *,
190 int *, int *, int *, int_t *, GlobalLU_t *);
191extern int ilu_zcolumn_dfs (const int, const int, int *, int *, int *,
192 int *, int *, int *, int *, int_t *, GlobalLU_t *);
193extern int ilu_zcopy_to_ucol (int, int, int *, int *, int *,
194 doublecomplex *, int, milu_t, double, int,
195 doublecomplex *, int *, GlobalLU_t *, double *);
196extern int ilu_zpivotL (const int, const double, int *, int *, int, int *,
197 int *, int *, int *, double, milu_t,
199extern int ilu_zdrop_row (superlu_options_t *, int, int, double,
200 int, int *, double *, GlobalLU_t *,
201 double *, double *, int);
202
203
206extern void zgsequ (SuperMatrix *, double *, double *, double *,
207 double *, double *, int *);
208extern void zlaqgs (SuperMatrix *, double *, double *, double,
209 double, double, char *);
210extern void zgscon (char *, SuperMatrix *, SuperMatrix *,
211 double, double *, SuperLUStat_t*, int *);
212extern double zPivotGrowth(int, SuperMatrix *, int *,
214extern void zgsrfs (trans_t, SuperMatrix *, SuperMatrix *,
215 SuperMatrix *, int *, int *, char *, double *,
216 double *, SuperMatrix *, SuperMatrix *,
217 double *, double *, SuperLUStat_t*, int *);
218
219extern int sp_ztrsv (char *, char *, char *, SuperMatrix *,
221extern int sp_zgemv (char *, doublecomplex, SuperMatrix *, doublecomplex *,
222 int, doublecomplex, doublecomplex *, int);
223
224extern int sp_zgemm (char *, char *, int, int, int, doublecomplex,
226 doublecomplex *, int);
227extern double dmach(char *); /* from C99 standard, in float.h */
228
230extern int_t zLUMemInit (fact_t, void *, int_t, int, int, int_t, int,
231 double, SuperMatrix *, SuperMatrix *,
232 GlobalLU_t *, int **, doublecomplex **);
233extern void zSetRWork (int, int, doublecomplex *, doublecomplex **, doublecomplex **);
234extern void zLUWorkFree (int *, doublecomplex *, GlobalLU_t *);
235extern int_t zLUMemXpand (int, int_t, MemType, int_t *, GlobalLU_t *);
236
237extern doublecomplex *doublecomplexMalloc(size_t);
238extern doublecomplex *doublecomplexCalloc(size_t);
239extern double *doubleMalloc(size_t);
240extern double *doubleCalloc(size_t);
241extern int_t zmemory_usage(const int_t, const int_t, const int_t, const int);
244
246extern void zreadhb(FILE *, int *, int *, int_t *, doublecomplex **, int_t **, int_t **);
247extern void zreadrb(int *, int *, int_t *, doublecomplex **, int_t **, int_t **);
248extern void zreadtriple(int *, int *, int_t *, doublecomplex **, int_t **, int_t **);
249extern void zreadMM(FILE *, int *, int *, int_t *, doublecomplex **, int_t **, int_t **);
250extern void zfill (doublecomplex *, int, doublecomplex);
251extern void zinf_norm_error (int, SuperMatrix *, doublecomplex *);
252extern double dqselect(int, double *, int);
253
254
256extern void zPrint_CompCol_Matrix(char *, SuperMatrix *);
257extern void zPrint_SuperNode_Matrix(char *, SuperMatrix *);
258extern void zPrint_Dense_Matrix(char *, SuperMatrix *);
259extern void zprint_lu_col(char *, int, int, int_t *, GlobalLU_t *);
260extern int print_double_vec(char *, int, double *);
261extern void zcheck_tempv(int, doublecomplex *);
262
265extern int zgemm_(const char*, const char*, const int*, const int*, const int*,
266 const doublecomplex*, const doublecomplex*, const int*, const doublecomplex*,
267 const int*, const doublecomplex*, doublecomplex*, const int*);
268extern int ztrsv_(char*, char*, char*, int*, doublecomplex*, int*,
269 doublecomplex*, int*);
270extern int ztrsm_(char*, char*, char*, char*, int*, int*,
271 doublecomplex*, doublecomplex*, int*, doublecomplex*, int*);
272extern int zgemv_(char *, int *, int *, doublecomplex *, doublecomplex *a, int *,
273 doublecomplex *, int *, doublecomplex *, doublecomplex *, int *);
274
275extern void zusolve(int, int, doublecomplex*, doublecomplex*);
276extern void zlsolve(int, int, doublecomplex*, doublecomplex*);
277extern void zmatvec(int, int, int, doublecomplex*, doublecomplex*, doublecomplex*);
278
279#ifdef __cplusplus
280 }
281#endif
282
283#endif /* __SUPERLU_zSP_DEFS */
284
#define X(I)
#define A(I, J)
#define U(I)
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 *)
Definition: zcopy_to_ucol.c:36
void zPrint_CompCol_Matrix(char *, SuperMatrix *)
Routines for debugging.
Definition: zutil.c:202
void zgsisv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *)
double * doubleMalloc(size_t)
Definition: dmemory.c:679
int ilu_zcopy_to_ucol(int, int, int *, int *, int *, doublecomplex *, int, milu_t, double, int, doublecomplex *, int *, GlobalLU_t *, double *)
Definition: ilu_zcopy_to_ucol.c:44
void zmatvec(int, int, int, doublecomplex *, doublecomplex *, doublecomplex *)
Performs a dense matrix-vector multiply: Mxvec = Mxvec + M * vec.
Definition: zmyblas2.c:143
doublecomplex * doublecomplexCalloc(size_t)
Definition: zmemory.c:690
int ilu_zsnode_dfs(const int, const int, const int_t *, const int_t *, const int_t *, int *, GlobalLU_t *)
Definition: ilu_zsnode_dfs.c:42
void zreadMM(FILE *, int *, int *, int_t *, doublecomplex **, int_t **, int_t **)
Definition: zreadMM.c:35
void zCompRow_to_CompCol(int, int, int_t, doublecomplex *, int_t *, int_t *, doublecomplex **, int_t **, int_t **)
Convert a row compressed storage into a column compressed storage.
Definition: zutil.c:164
int zcolumn_dfs(const int, const int, int *, int *, int *, int *, int *, int_t *, int *, int *, int_t *, GlobalLU_t *)
Definition: zcolumn_dfs.c:76
void zreadhb(FILE *, int *, int *, int_t *, doublecomplex **, int_t **, int_t **)
Auxiliary routines.
Definition: zreadhb.c:293
void zgstrs(trans_t, SuperMatrix *, SuperMatrix *, int *, int *, SuperMatrix *, SuperLUStat_t *, int *)
Definition: zgstrs.c:93
int_t zLUMemXpand(int, int_t, MemType, int_t *, GlobalLU_t *)
Expand the data structures for L and U during the factorization.
Definition: zmemory.c:430
void zCreate_SuperNode_Matrix(SuperMatrix *, int, int, int_t, doublecomplex *, int_t *, int_t *, int_t *, int *, int *, Stype_t, Dtype_t, Mtype_t)
Definition: zutil.c:134
double dqselect(int, double *, int)
int sp_zgemv(char *, doublecomplex, SuperMatrix *, doublecomplex *, int, doublecomplex, doublecomplex *, int)
Performs one of the matrix-vector operations y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y.
Definition: zsp_blas2.c:462
int_t zmemory_usage(const int_t, const int_t, const int_t, const int)
Definition: zmemory.c:704
void zgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int_t *info)
Driver routines.
Definition: zgssv.c:143
void zreadrb(int *, int *, int_t *, doublecomplex **, int_t **, int_t **)
Definition: zreadrb.c:290
void zgscon(char *, SuperMatrix *, SuperMatrix *, double, double *, SuperLUStat_t *, int *)
Definition: zgscon.c:84
int zcolumn_bmod(const int, const int, doublecomplex *, doublecomplex *, int *, int *, int, GlobalLU_t *, SuperLUStat_t *)
Definition: zcolumn_bmod.c:52
void zCopy_Dense_Matrix(int, int, doublecomplex *, int, doublecomplex *, int)
Definition: zutil.c:121
void zPrint_Dense_Matrix(char *, SuperMatrix *)
Definition: zutil.c:277
int sp_ztrsv(char *, char *, char *, SuperMatrix *, SuperMatrix *, doublecomplex *, SuperLUStat_t *, int *)
Solves one of the systems of equations A*x = b, or A'*x = b.
Definition: zsp_blas2.c:86
double dmach(char *)
Definition: dmach.c:18
void zLUWorkFree(int *, doublecomplex *, GlobalLU_t *)
Free the working storage used by factor routines.
Definition: zmemory.c:407
void zpanel_bmod(const int, const int, const int, const int, doublecomplex *, doublecomplex *, int *, int *, GlobalLU_t *, SuperLUStat_t *)
Definition: zpanel_bmod.c:61
int ilu_zQuerySpace(SuperMatrix *, SuperMatrix *, mem_usage_t *)
Definition: zmemory.c:147
void zCopy_CompCol_Matrix(SuperMatrix *, SuperMatrix *)
Copy matrix A into matrix B.
Definition: zutil.c:82
int zQuerySpace(SuperMatrix *, SuperMatrix *, mem_usage_t *)
Definition: zmemory.c:110
int sp_zgemm(char *, char *, int, int, int, doublecomplex, SuperMatrix *, doublecomplex *, int, doublecomplex, doublecomplex *, int)
Definition: zsp_blas3.c:126
doublecomplex * doublecomplexMalloc(size_t)
Definition: zmemory.c:680
int zgemm_(const char *, const char *, const int *, const int *, const int *, const doublecomplex *, const doublecomplex *, const int *, const doublecomplex *, const int *, const doublecomplex *, doublecomplex *, const int *)
BLAS.
void zgsrfs(trans_t, SuperMatrix *, SuperMatrix *, SuperMatrix *, int *, int *, char *, double *, double *, SuperMatrix *, SuperMatrix *, double *, double *, SuperLUStat_t *, int *)
Definition: zgsrfs.c:141
void zinf_norm_error(int, SuperMatrix *, doublecomplex *)
Check the inf-norm of the error vector.
Definition: zutil.c:405
int zldperm(int, int, int_t, int_t[], int_t[], doublecomplex[], int[], double[], double[])
void zCreate_CompCol_Matrix(SuperMatrix *, int, int, int_t, doublecomplex *, int_t *, int_t *, Stype_t, Dtype_t, Mtype_t)
Supernodal LU factor related.
Definition: zutil.c:39
void zpruneL(const int, const int *, const int, const int, const int *, const int *, int_t *, GlobalLU_t *)
Definition: zpruneL.c:48
void zFillRHS(trans_t, int, doublecomplex *, int, SuperMatrix *, SuperMatrix *)
Let rhs[i] = sum of i-th row of A, so the solution vector is all 1's.
Definition: zutil.c:368
double zPivotGrowth(int, SuperMatrix *, int *, SuperMatrix *, SuperMatrix *)
Definition: zpivotgrowth.c:59
int ilu_zdrop_row(superlu_options_t *, int, int, double, int, int *, double *, GlobalLU_t *, double *, double *, int)
void zgstrf(superlu_options_t *, SuperMatrix *, int, int, int *, void *, int_t, int *, int *, SuperMatrix *, SuperMatrix *, GlobalLU_t *, SuperLUStat_t *, int_t *info)
Definition: zgstrf.c:200
void zgsitrf(superlu_options_t *, SuperMatrix *, int, int, int *, void *, int_t, int *, int *, SuperMatrix *, SuperMatrix *, GlobalLU_t *, SuperLUStat_t *, int_t *info)
Definition: zgsitrf.c:187
int zgemv_(char *, int *, int *, doublecomplex *, doublecomplex *a, int *, doublecomplex *, int *, doublecomplex *, doublecomplex *, int *)
void zSetRWork(int, int, doublecomplex *, doublecomplex **, doublecomplex **)
Set up pointers for real working arrays.
Definition: zmemory.c:392
int_t zsnode_dfs(const int, const int, const int_t *, const int_t *, const int_t *, int_t *, int *, GlobalLU_t *)
Definition: zsnode_dfs.c:55
void zlaqgs(SuperMatrix *, double *, double *, double, double, double, char *)
Definition: zlaqgs.c:92
void zallocateA(int, int_t, doublecomplex **, int_t **, int_t **)
Allocate storage for original matrix A.
Definition: zmemory.c:672
int print_double_vec(char *, int, double *)
Definition: dutil.c:473
void zreadmt(int *, int *, int_t *, doublecomplex **, int_t **, int_t **)
void zcheck_tempv(int, doublecomplex *)
Check whether tempv[] == 0. This should be true before and after calling any numeric routines,...
Definition: zutil.c:340
void zgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *, char *, double *, double *, SuperMatrix *, SuperMatrix *, void *, int_t lwork, SuperMatrix *, SuperMatrix *, double *, double *, double *, double *, GlobalLU_t *, mem_usage_t *, SuperLUStat_t *, int_t *info)
Definition: zgssvx.c:357
void zCreate_Dense_Matrix(SuperMatrix *, int, int, doublecomplex *, int, Stype_t, Dtype_t, Mtype_t)
Definition: zutil.c:103
int ilu_zpivotL(const int, const double, int *, int *, int, int *, int *, int *, int *, double, milu_t, doublecomplex, GlobalLU_t *, SuperLUStat_t *)
Definition: ilu_zpivotL.c:56
void zpanel_dfs(const int, const int, const int, SuperMatrix *, int *, int *, doublecomplex *, int *, int *, int *, int_t *, int *, int *, int_t *, GlobalLU_t *)
Definition: zpanel_dfs.c:69
void zGenXtrue(int, int, doublecomplex *, int)
Definition: zutil.c:355
int_t zLUMemInit(fact_t, void *, int_t, int, int, int_t, int, double, SuperMatrix *, SuperMatrix *, GlobalLU_t *, int **, doublecomplex **)
Memory-related.
Definition: zmemory.c:188
void zusolve(int, int, doublecomplex *, doublecomplex *)
Solves a dense upper triangular system.
Definition: zmyblas2.c:116
double * doubleCalloc(size_t)
Definition: dmemory.c:689
int ilu_zcolumn_dfs(const int, const int, int *, int *, int *, int *, int *, int *, int *, int_t *, GlobalLU_t *)
Definition: ilu_zcolumn_dfs.c:61
int zpivotL(const int, const double, int *, int *, int *, int *, int *, GlobalLU_t *, SuperLUStat_t *)
Definition: zpivotL.c:66
void zgsequ(SuperMatrix *, double *, double *, double *, double *, double *, int *)
Driver related.
Definition: zgsequ.c:94
void zprint_lu_col(char *, int, int, int_t *, GlobalLU_t *)
Diagnostic print of column "jcol" in the U/L factor.
Definition: zutil.c:299
void ilu_zpanel_dfs(const int, const int, const int, SuperMatrix *, int *, int *, doublecomplex *, double *, int *, int *, int *, int *, int *, int_t *, GlobalLU_t *)
Definition: ilu_zpanel_dfs.c:56
void zreadtriple(int *, int *, int_t *, doublecomplex **, int_t **, int_t **)
Definition: zreadtriple.c:26
int ztrsv_(char *, char *, char *, int *, doublecomplex *, int *, doublecomplex *, int *)
int ztrsm_(char *, char *, char *, char *, int *, int *, doublecomplex *, doublecomplex *, int *, doublecomplex *, int *)
int zsnode_bmod(const int, const int, const int, doublecomplex *, doublecomplex *, GlobalLU_t *, SuperLUStat_t *)
Performs numeric block updates within the relaxed snode.
Definition: zsnode_bmod.c:41
void zCreate_CompRow_Matrix(SuperMatrix *, int, int, int_t, doublecomplex *, int_t *, int_t *, Stype_t, Dtype_t, Mtype_t)
Definition: zutil.c:60
void zPrint_SuperNode_Matrix(char *, SuperMatrix *)
Definition: zutil.c:226
void zgsisx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r, int *etree, char *equed, double *R, double *C, SuperMatrix *L, SuperMatrix *U, void *work, int_t lwork, SuperMatrix *B, SuperMatrix *X, double *recip_pivot_growth, double *rcond, GlobalLU_t *Glu, mem_usage_t *mem_usage, SuperLUStat_t *stat, int_t *info)
Definition: zgsisx.c:404
void zlsolve(int, int, doublecomplex *, doublecomplex *)
Solves a dense UNIT lower triangular system.
Definition: zmyblas2.c:39
void zfill(doublecomplex *, int, doublecomplex)
Fills a doublecomplex precision array with a given value.
Definition: zutil.c:395
Definition: slu_util.h:336
Definition: slu_util.h:321
Definition: supermatrix.h:54
Definition: slu_dcomplex.h:31
Definition: slu_util.h:330
Definition: slu_util.h:277
int64_t int_t
Definition: superlu_config.h:18
trans_t
Definition: superlu_enum_consts.h:34
milu_t
Definition: superlu_enum_consts.h:46
MemType
Definition: superlu_enum_consts.h:38
fact_t
Definition: superlu_enum_consts.h:30
Matrix type definitions.
Mtype_t
Definition: supermatrix.h:42
Dtype_t
Definition: supermatrix.h:35
Stype_t
Definition: supermatrix.h:22