00001
00063 #ifndef __SUPERLU_zSP_DEFS
00064 #define __SUPERLU_zSP_DEFS
00065
00066
00067
00068
00069
00070
00071
00072 #ifdef _CRAY
00073 #include <fortran.h>
00074 #include <string.h>
00075 #endif
00076
00077
00078 typedef int int_t;
00079
00080 #include <math.h>
00081 #include <limits.h>
00082 #include "slu_Cnames.h"
00083 #include "supermatrix.h"
00084 #include "slu_util.h"
00085 #include "slu_dcomplex.h"
00086
00087
00088
00089 typedef struct {
00090 int *xsup;
00091 int *supno;
00092 int *lsub;
00093 int *xlsub;
00094 doublecomplex *lusup;
00095 int *xlusup;
00096 doublecomplex *ucol;
00097 int *usub;
00098 int *xusub;
00099 int nzlmax;
00100 int nzumax;
00101 int nzlumax;
00102 int n;
00103 LU_space_t MemModel;
00104 int num_expansions;
00105 ExpHeader *expanders;
00106 LU_stack_t stack;
00107 } GlobalLU_t;
00108
00109
00110
00111
00112 #ifdef __cplusplus
00113 extern "C" {
00114 #endif
00115
00117 extern void
00118 zgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
00119 SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
00120 extern void
00121 zgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
00122 char *, double *, double *, SuperMatrix *, SuperMatrix *,
00123 void *, int, SuperMatrix *, SuperMatrix *,
00124 double *, double *, double *, double *,
00125 mem_usage_t *, SuperLUStat_t *, int *);
00126
00127 extern void
00128 zgsisv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
00129 SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
00130 extern void
00131 zgsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
00132 char *, double *, double *, SuperMatrix *, SuperMatrix *,
00133 void *, int, SuperMatrix *, SuperMatrix *, double *, double *,
00134 mem_usage_t *, SuperLUStat_t *, int *);
00135
00136
00138 extern void
00139 zCreate_CompCol_Matrix(SuperMatrix *, int, int, int, doublecomplex *,
00140 int *, int *, Stype_t, Dtype_t, Mtype_t);
00141 extern void
00142 zCreate_CompRow_Matrix(SuperMatrix *, int, int, int, doublecomplex *,
00143 int *, int *, Stype_t, Dtype_t, Mtype_t);
00144 extern void
00145 zCopy_CompCol_Matrix(SuperMatrix *, SuperMatrix *);
00146 extern void
00147 zCreate_Dense_Matrix(SuperMatrix *, int, int, doublecomplex *, int,
00148 Stype_t, Dtype_t, Mtype_t);
00149 extern void
00150 zCreate_SuperNode_Matrix(SuperMatrix *, int, int, int, doublecomplex *,
00151 int *, int *, int *, int *, int *,
00152 Stype_t, Dtype_t, Mtype_t);
00153 extern void
00154 zCopy_Dense_Matrix(int, int, doublecomplex *, int, doublecomplex *, int);
00155
00156 extern void countnz (const int, int *, int *, int *, GlobalLU_t *);
00157 extern void ilu_countnz (const int, int *, int *, GlobalLU_t *);
00158 extern void fixupL (const int, const int *, GlobalLU_t *);
00159
00160 extern void zallocateA (int, int, doublecomplex **, int **, int **);
00161 extern void zgstrf (superlu_options_t*, SuperMatrix*,
00162 int, int, int*, void *, int, int *, int *,
00163 SuperMatrix *, SuperMatrix *, SuperLUStat_t*, int *);
00164 extern int zsnode_dfs (const int, const int, const int *, const int *,
00165 const int *, int *, int *, GlobalLU_t *);
00166 extern int zsnode_bmod (const int, const int, const int, doublecomplex *,
00167 doublecomplex *, GlobalLU_t *, SuperLUStat_t*);
00168 extern void zpanel_dfs (const int, const int, const int, SuperMatrix *,
00169 int *, int *, doublecomplex *, int *, int *, int *,
00170 int *, int *, int *, int *, GlobalLU_t *);
00171 extern void zpanel_bmod (const int, const int, const int, const int,
00172 doublecomplex *, doublecomplex *, int *, int *,
00173 GlobalLU_t *, SuperLUStat_t*);
00174 extern int zcolumn_dfs (const int, const int, int *, int *, int *, int *,
00175 int *, int *, int *, int *, int *, GlobalLU_t *);
00176 extern int zcolumn_bmod (const int, const int, doublecomplex *,
00177 doublecomplex *, int *, int *, int,
00178 GlobalLU_t *, SuperLUStat_t*);
00179 extern int zcopy_to_ucol (int, int, int *, int *, int *,
00180 doublecomplex *, GlobalLU_t *);
00181 extern int zpivotL (const int, const double, int *, int *,
00182 int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
00183 extern void zpruneL (const int, const int *, const int, const int,
00184 const int *, const int *, int *, GlobalLU_t *);
00185 extern void zreadmt (int *, int *, int *, doublecomplex **, int **, int **);
00186 extern void zGenXtrue (int, int, doublecomplex *, int);
00187 extern void zFillRHS (trans_t, int, doublecomplex *, int, SuperMatrix *,
00188 SuperMatrix *);
00189 extern void zgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
00190 SuperMatrix *, SuperLUStat_t*, int *);
00191
00192 extern void zgsitrf (superlu_options_t*, SuperMatrix*, int, int, int*,
00193 void *, int, int *, int *, SuperMatrix *, SuperMatrix *,
00194 SuperLUStat_t*, int *);
00195 extern int zldperm(int, int, int, int [], int [], doublecomplex [],
00196 int [], double [], double []);
00197 extern int ilu_zsnode_dfs (const int, const int, const int *, const int *,
00198 const int *, int *, GlobalLU_t *);
00199 extern void ilu_zpanel_dfs (const int, const int, const int, SuperMatrix *,
00200 int *, int *, doublecomplex *, double *, int *, int *,
00201 int *, int *, int *, int *, GlobalLU_t *);
00202 extern int ilu_zcolumn_dfs (const int, const int, int *, int *, int *,
00203 int *, int *, int *, int *, int *,
00204 GlobalLU_t *);
00205 extern int ilu_zcopy_to_ucol (int, int, int *, int *, int *,
00206 doublecomplex *, int, milu_t, double, int,
00207 doublecomplex *, int *, GlobalLU_t *, double *);
00208 extern int ilu_zpivotL (const int, const double, int *, int *, int, int *,
00209 int *, int *, int *, double, milu_t,
00210 doublecomplex, GlobalLU_t *, SuperLUStat_t*);
00211 extern int ilu_zdrop_row (superlu_options_t *, int, int, double,
00212 int, int *, double *, GlobalLU_t *,
00213 double *, double *, int);
00214
00215
00218 extern void zgsequ (SuperMatrix *, double *, double *, double *,
00219 double *, double *, int *);
00220 extern void zlaqgs (SuperMatrix *, double *, double *, double,
00221 double, double, char *);
00222 extern void zgscon (char *, SuperMatrix *, SuperMatrix *,
00223 double, double *, SuperLUStat_t*, int *);
00224 extern double zPivotGrowth(int, SuperMatrix *, int *,
00225 SuperMatrix *, SuperMatrix *);
00226 extern void zgsrfs (trans_t, SuperMatrix *, SuperMatrix *,
00227 SuperMatrix *, int *, int *, char *, double *,
00228 double *, SuperMatrix *, SuperMatrix *,
00229 double *, double *, SuperLUStat_t*, int *);
00230
00231 extern int sp_ztrsv (char *, char *, char *, SuperMatrix *,
00232 SuperMatrix *, doublecomplex *, SuperLUStat_t*, int *);
00233 extern int sp_zgemv (char *, doublecomplex, SuperMatrix *, doublecomplex *,
00234 int, doublecomplex, doublecomplex *, int);
00235
00236 extern int sp_zgemm (char *, char *, int, int, int, doublecomplex,
00237 SuperMatrix *, doublecomplex *, int, doublecomplex,
00238 doublecomplex *, int);
00239 extern double dlamch_(char *);
00240
00241
00243 extern int zLUMemInit (fact_t, void *, int, int, int, int, int,
00244 double, SuperMatrix *, SuperMatrix *,
00245 GlobalLU_t *, int **, doublecomplex **);
00246 extern void zSetRWork (int, int, doublecomplex *, doublecomplex **, doublecomplex **);
00247 extern void zLUWorkFree (int *, doublecomplex *, GlobalLU_t *);
00248 extern int zLUMemXpand (int, int, MemType, int *, GlobalLU_t *);
00249
00250 extern doublecomplex *doublecomplexMalloc(int);
00251 extern doublecomplex *doublecomplexCalloc(int);
00252 extern double *doubleMalloc(int);
00253 extern double *doubleCalloc(int);
00254 extern int zmemory_usage(const int, const int, const int, const int);
00255 extern int zQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
00256 extern int ilu_zQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
00257
00259 extern void zreadhb(int *, int *, int *, doublecomplex **, int **, int **);
00260 extern void zreadrb(int *, int *, int *, doublecomplex **, int **, int **);
00261 extern void zreadtriple(int *, int *, int *, doublecomplex **, int **, int **);
00262 extern void zCompRow_to_CompCol(int, int, int, doublecomplex*, int*, int*,
00263 doublecomplex **, int **, int **);
00264 extern void zfill (doublecomplex *, int, doublecomplex);
00265 extern void zinf_norm_error (int, SuperMatrix *, doublecomplex *);
00266 extern void PrintPerf (SuperMatrix *, SuperMatrix *, mem_usage_t *,
00267 doublecomplex, doublecomplex, doublecomplex *, doublecomplex *, char *);
00268 extern double dqselect(int, double *, int);
00269
00270
00272 extern void zPrint_CompCol_Matrix(char *, SuperMatrix *);
00273 extern void zPrint_SuperNode_Matrix(char *, SuperMatrix *);
00274 extern void zPrint_Dense_Matrix(char *, SuperMatrix *);
00275 extern void zprint_lu_col(char *, int, int, int *, GlobalLU_t *);
00276 extern int print_double_vec(char *, int, double *);
00277 extern void check_tempv(int, doublecomplex *);
00278
00279 #ifdef __cplusplus
00280 }
00281 #endif
00282
00283 #endif
00284