SuperLU 7.0.0
slu_zdefs.h
Go to the documentation of this file.
1
74#ifndef __SUPERLU_zSP_DEFS /* allow multiple inclusions */
75#define __SUPERLU_zSP_DEFS
76
77/*
78 * File name: zsp_defs.h
79 * Purpose: Sparse matrix types and function prototypes
80 * History:
81 */
82
83#ifdef _CRAY
84#include <fortran.h>
85#endif
86
87#include <math.h>
88#include <limits.h>
89#include <stdio.h>
90#include <stdlib.h>
91#include <stdint.h>
92#include <string.h>
93#include "slu_Cnames.h"
94#include "superlu_config.h"
95#include "supermatrix.h"
96#include "slu_util.h"
97#include "slu_dcomplex.h"
98
99
100/* -------- Prototypes -------- */
101
102#ifdef __cplusplus
103extern "C" {
104#endif
105
107extern void
108zgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
110extern void
111zgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
112 char *, double *, double *, SuperMatrix *, SuperMatrix *,
113 void *, int_t lwork, SuperMatrix *, SuperMatrix *,
114 double *, double *, double *, double *,
116 /* ILU */
117extern void
119 SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
120extern void
121zgsisx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
122 int *etree, char *equed, double *R, double *C,
123 SuperMatrix *L, SuperMatrix *U, void *work, int_t lwork,
124 SuperMatrix *B, SuperMatrix *X, double *recip_pivot_growth, double *rcond,
125 GlobalLU_t *Glu, mem_usage_t *mem_usage, SuperLUStat_t *stat, int_t *info);
126
127
129extern void
132extern void
135extern void zCompRow_to_CompCol(int, int, int_t, doublecomplex*, int_t*, int_t*,
136 doublecomplex **, int_t **, int_t **);
137extern void
139extern void
142extern void
144 int_t *, int_t *, int_t *, int *, int *,
146extern void
147zCopy_Dense_Matrix(int, int, doublecomplex *, int, doublecomplex *, int);
148
149extern void zallocateA (int, int_t, doublecomplex **, int_t **, int_t **);
150extern void zgstrf (superlu_options_t*, SuperMatrix*,
151 int, int, int*, void *, int_t, int *, int *,
153 SuperLUStat_t*, int_t *info);
154extern int_t zsnode_dfs (const int, const int, const int_t *, const int_t *,
155 const int_t *, int_t *, int *, GlobalLU_t *);
156extern int zsnode_bmod (const int, const int, const int, doublecomplex *,
158extern void zpanel_dfs (const int, const int, const int, SuperMatrix *,
159 int *, int *, doublecomplex *, int *, int *, int *,
160 int_t *, int *, int *, int_t *, GlobalLU_t *);
161extern void zpanel_bmod (const int, const int, const int, const int,
162 doublecomplex *, doublecomplex *, int *, int *,
164extern int zcolumn_dfs (const int, const int, int *, int *, int *, int *,
165 int *, int_t *, int *, int *, int_t *, GlobalLU_t *);
166extern int zcolumn_bmod (const int, const int, doublecomplex *,
167 doublecomplex *, int *, int *, int,
169extern int zcopy_to_ucol (int, int, int *, int *, int *,
171extern int zpivotL (const int, const double, int *, int *,
172 int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
173extern void zpruneL (const int, const int *, const int, const int,
174 const int *, const int *, int_t *, GlobalLU_t *);
175extern void zreadmt (int *, int *, int_t *, doublecomplex **, int_t **, int_t **);
176extern void zGenXtrue (int, int, doublecomplex *, int);
177extern void zFillRHS (trans_t, int, doublecomplex *, int, SuperMatrix *,
178 SuperMatrix *);
179extern void zgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
180 SuperMatrix *, SuperLUStat_t*, int *);
181/* ILU */
182extern void zgsitrf (superlu_options_t*, SuperMatrix*, int, int, int*,
183 void *, int_t, int *, int *, SuperMatrix *, SuperMatrix *,
184 GlobalLU_t *, SuperLUStat_t*, int_t *info);
185extern int zldperm(int, int, int_t, int_t [], int_t [], doublecomplex [],
186 int [], double [], double []);
187extern int ilu_zsnode_dfs (const int, const int, const int_t *, const int_t *,
188 const int_t *, int *, GlobalLU_t *);
189extern void ilu_zpanel_dfs (const int, const int, const int, SuperMatrix *,
190 int *, int *, doublecomplex *, double *, int *, int *,
191 int *, int *, int *, int_t *, GlobalLU_t *);
192extern int ilu_zcolumn_dfs (const int, const int, int *, int *, int *,
193 int *, int *, int *, int *, int_t *, GlobalLU_t *);
194extern int ilu_zcopy_to_ucol (int, int, int *, int *, int *,
195 doublecomplex *, int, milu_t, double, int,
196 doublecomplex *, int *, GlobalLU_t *, double *);
197extern int ilu_zpivotL (const int, const double, int *, int *, int, int *,
198 int *, int *, int *, double, milu_t,
200extern int ilu_zdrop_row (superlu_options_t *, int, int, double,
201 int, int *, double *, GlobalLU_t *,
202 double *, double *, int);
203
204
207extern void zgsequ (SuperMatrix *, double *, double *, double *,
208 double *, double *, int *);
209extern void zlaqgs (SuperMatrix *, double *, double *, double,
210 double, double, char *);
211extern void zgscon (char *, SuperMatrix *, SuperMatrix *,
212 double, double *, SuperLUStat_t*, int *);
213extern double zPivotGrowth(int, SuperMatrix *, int *,
215extern void zgsrfs (trans_t, SuperMatrix *, SuperMatrix *,
216 SuperMatrix *, int *, int *, char *, double *,
217 double *, SuperMatrix *, SuperMatrix *,
218 double *, double *, SuperLUStat_t*, int *);
219
220extern int sp_ztrsv (char *, char *, char *, SuperMatrix *,
222extern int sp_zgemv (char *, doublecomplex, SuperMatrix *, doublecomplex *,
223 int, doublecomplex, doublecomplex *, int);
224
225extern int sp_zgemm (char *, char *, int, int, int, doublecomplex,
227 doublecomplex *, int);
228extern double dmach(char *); /* from C99 standard, in float.h */
229
231extern int_t zLUMemInit (fact_t, void *, int_t, int, int, int_t, int,
232 double, SuperMatrix *, SuperMatrix *,
233 GlobalLU_t *, int **, doublecomplex **);
234extern void zSetRWork (int, int, doublecomplex *, doublecomplex **, doublecomplex **);
235extern void zLUWorkFree (int *, doublecomplex *, GlobalLU_t *);
236extern int_t zLUMemXpand (int, int_t, MemType, int_t *, GlobalLU_t *);
237
238extern doublecomplex *doublecomplexMalloc(size_t);
239extern doublecomplex *doublecomplexCalloc(size_t);
240extern double *doubleMalloc(size_t);
241extern double *doubleCalloc(size_t);
242extern int_t zmemory_usage(const int_t, const int_t, const int_t, const int);
245
247extern void zreadhb(FILE *, int *, int *, int_t *, doublecomplex **, int_t **, int_t **);
248extern void zreadrb(int *, int *, int_t *, doublecomplex **, int_t **, int_t **);
249extern void zreadtriple(int *, int *, int_t *, doublecomplex **, int_t **, int_t **);
250extern void zreadtriple_noheader(int *, int *, int_t *, doublecomplex **, int_t **, int_t **);
251extern void zreadMM(FILE *, int *, int *, int_t *, doublecomplex **, int_t **, int_t **);
252extern void zfill (doublecomplex *, int, doublecomplex);
253extern void zinf_norm_error (int, SuperMatrix *, doublecomplex *);
254extern double dqselect(int, double *, int);
255
256
258extern void zPrint_CompCol_Matrix(char *, SuperMatrix *);
259extern void zPrint_SuperNode_Matrix(char *, SuperMatrix *);
260extern void zPrint_Dense_Matrix(char *, SuperMatrix *);
261extern void zprint_lu_col(char *, int, int, int_t *, GlobalLU_t *);
262extern int print_double_vec(char *, int, double *);
263extern void zcheck_tempv(int, doublecomplex *);
264
267extern int zgemm_(const char*, const char*, const int*, const int*, const int*,
268 const doublecomplex*, const doublecomplex*, const int*, const doublecomplex*,
269 const int*, const doublecomplex*, doublecomplex*, const int*);
270extern int ztrsv_(char*, char*, char*, int*, doublecomplex*, int*,
271 doublecomplex*, int*);
272extern int ztrsm_(char*, char*, char*, char*, int*, int*,
273 doublecomplex*, doublecomplex*, int*, doublecomplex*, int*);
274extern int zgemv_(char *, int *, int *, doublecomplex *, doublecomplex *a, int *,
275 doublecomplex *, int *, doublecomplex *, doublecomplex *, int *);
276
277extern void zusolve(int, int, doublecomplex*, doublecomplex*);
278extern void zlsolve(int, int, doublecomplex*, doublecomplex*);
279extern void zmatvec(int, int, int, doublecomplex*, doublecomplex*, doublecomplex*);
280
281#ifdef __cplusplus
282 }
283#endif
284
285#endif /* __SUPERLU_zSP_DEFS */
286
#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:689
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:699
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 zreadtriple_noheader(int *, int *, int_t *, doublecomplex **, int_t **, int_t **)
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:713
void zgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *, SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int_t *info)
Driver routines.
Definition: zgssv.c:144
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:85
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:149
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:111
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:689
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:201
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:188
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:681
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:358
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:57
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:190
void zusolve(int, int, doublecomplex *, doublecomplex *)
Solves a dense upper triangular system.
Definition: zmyblas2.c:116
double * doubleCalloc(size_t)
Definition: dmemory.c:699
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:67
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
int int_t
Definition: superlu_config.h:20
trans_t
Definition: superlu_enum_consts.h:34
milu_t
Definition: superlu_enum_consts.h:46
MemType
Definition: superlu_enum_consts.h:37
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