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