00001
00063 #ifndef __SUPERLU_cSP_DEFS
00064 #define __SUPERLU_cSP_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_scomplex.h"
00086
00087
00088
00089 typedef struct {
00090 int *xsup;
00091 int *supno;
00092 int *lsub;
00093 int *xlsub;
00094 complex *lusup;
00095 int *xlusup;
00096 complex *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 cgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
00119 SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
00120 extern void
00121 cgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
00122 char *, float *, float *, SuperMatrix *, SuperMatrix *,
00123 void *, int, SuperMatrix *, SuperMatrix *,
00124 float *, float *, float *, float *,
00125 mem_usage_t *, SuperLUStat_t *, int *);
00126
00127 extern void
00128 cgsisv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
00129 SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
00130 extern void
00131 cgsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
00132 char *, float *, float *, SuperMatrix *, SuperMatrix *,
00133 void *, int, SuperMatrix *, SuperMatrix *, float *, float *,
00134 mem_usage_t *, SuperLUStat_t *, int *);
00135
00136
00138 extern void
00139 cCreate_CompCol_Matrix(SuperMatrix *, int, int, int, complex *,
00140 int *, int *, Stype_t, Dtype_t, Mtype_t);
00141 extern void
00142 cCreate_CompRow_Matrix(SuperMatrix *, int, int, int, complex *,
00143 int *, int *, Stype_t, Dtype_t, Mtype_t);
00144 extern void
00145 cCopy_CompCol_Matrix(SuperMatrix *, SuperMatrix *);
00146 extern void
00147 cCreate_Dense_Matrix(SuperMatrix *, int, int, complex *, int,
00148 Stype_t, Dtype_t, Mtype_t);
00149 extern void
00150 cCreate_SuperNode_Matrix(SuperMatrix *, int, int, int, complex *,
00151 int *, int *, int *, int *, int *,
00152 Stype_t, Dtype_t, Mtype_t);
00153 extern void
00154 cCopy_Dense_Matrix(int, int, complex *, int, complex *, 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 callocateA (int, int, complex **, int **, int **);
00161 extern void cgstrf (superlu_options_t*, SuperMatrix*,
00162 int, int, int*, void *, int, int *, int *,
00163 SuperMatrix *, SuperMatrix *, SuperLUStat_t*, int *);
00164 extern int csnode_dfs (const int, const int, const int *, const int *,
00165 const int *, int *, int *, GlobalLU_t *);
00166 extern int csnode_bmod (const int, const int, const int, complex *,
00167 complex *, GlobalLU_t *, SuperLUStat_t*);
00168 extern void cpanel_dfs (const int, const int, const int, SuperMatrix *,
00169 int *, int *, complex *, int *, int *, int *,
00170 int *, int *, int *, int *, GlobalLU_t *);
00171 extern void cpanel_bmod (const int, const int, const int, const int,
00172 complex *, complex *, int *, int *,
00173 GlobalLU_t *, SuperLUStat_t*);
00174 extern int ccolumn_dfs (const int, const int, int *, int *, int *, int *,
00175 int *, int *, int *, int *, int *, GlobalLU_t *);
00176 extern int ccolumn_bmod (const int, const int, complex *,
00177 complex *, int *, int *, int,
00178 GlobalLU_t *, SuperLUStat_t*);
00179 extern int ccopy_to_ucol (int, int, int *, int *, int *,
00180 complex *, GlobalLU_t *);
00181 extern int cpivotL (const int, const double, int *, int *,
00182 int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
00183 extern void cpruneL (const int, const int *, const int, const int,
00184 const int *, const int *, int *, GlobalLU_t *);
00185 extern void creadmt (int *, int *, int *, complex **, int **, int **);
00186 extern void cGenXtrue (int, int, complex *, int);
00187 extern void cFillRHS (trans_t, int, complex *, int, SuperMatrix *,
00188 SuperMatrix *);
00189 extern void cgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
00190 SuperMatrix *, SuperLUStat_t*, int *);
00191
00192 extern void cgsitrf (superlu_options_t*, SuperMatrix*, int, int, int*,
00193 void *, int, int *, int *, SuperMatrix *, SuperMatrix *,
00194 SuperLUStat_t*, int *);
00195 extern int cldperm(int, int, int, int [], int [], complex [],
00196 int [], float [], float []);
00197 extern int ilu_csnode_dfs (const int, const int, const int *, const int *,
00198 const int *, int *, GlobalLU_t *);
00199 extern void ilu_cpanel_dfs (const int, const int, const int, SuperMatrix *,
00200 int *, int *, complex *, float *, int *, int *,
00201 int *, int *, int *, int *, GlobalLU_t *);
00202 extern int ilu_ccolumn_dfs (const int, const int, int *, int *, int *,
00203 int *, int *, int *, int *, int *,
00204 GlobalLU_t *);
00205 extern int ilu_ccopy_to_ucol (int, int, int *, int *, int *,
00206 complex *, int, milu_t, double, int,
00207 complex *, int *, GlobalLU_t *, float *);
00208 extern int ilu_cpivotL (const int, const double, int *, int *, int, int *,
00209 int *, int *, int *, double, milu_t,
00210 complex, GlobalLU_t *, SuperLUStat_t*);
00211 extern int ilu_cdrop_row (superlu_options_t *, int, int, double,
00212 int, int *, double *, GlobalLU_t *,
00213 float *, float *, int);
00214
00215
00218 extern void cgsequ (SuperMatrix *, float *, float *, float *,
00219 float *, float *, int *);
00220 extern void claqgs (SuperMatrix *, float *, float *, float,
00221 float, float, char *);
00222 extern void cgscon (char *, SuperMatrix *, SuperMatrix *,
00223 float, float *, SuperLUStat_t*, int *);
00224 extern float cPivotGrowth(int, SuperMatrix *, int *,
00225 SuperMatrix *, SuperMatrix *);
00226 extern void cgsrfs (trans_t, SuperMatrix *, SuperMatrix *,
00227 SuperMatrix *, int *, int *, char *, float *,
00228 float *, SuperMatrix *, SuperMatrix *,
00229 float *, float *, SuperLUStat_t*, int *);
00230
00231 extern int sp_ctrsv (char *, char *, char *, SuperMatrix *,
00232 SuperMatrix *, complex *, SuperLUStat_t*, int *);
00233 extern int sp_cgemv (char *, complex, SuperMatrix *, complex *,
00234 int, complex, complex *, int);
00235
00236 extern int sp_cgemm (char *, char *, int, int, int, complex,
00237 SuperMatrix *, complex *, int, complex,
00238 complex *, int);
00239 extern float slamch_(char *);
00240
00241
00243 extern int cLUMemInit (fact_t, void *, int, int, int, int, int,
00244 float, SuperMatrix *, SuperMatrix *,
00245 GlobalLU_t *, int **, complex **);
00246 extern void cSetRWork (int, int, complex *, complex **, complex **);
00247 extern void cLUWorkFree (int *, complex *, GlobalLU_t *);
00248 extern int cLUMemXpand (int, int, MemType, int *, GlobalLU_t *);
00249
00250 extern complex *complexMalloc(int);
00251 extern complex *complexCalloc(int);
00252 extern float *floatMalloc(int);
00253 extern float *floatCalloc(int);
00254 extern int cmemory_usage(const int, const int, const int, const int);
00255 extern int cQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
00256 extern int ilu_cQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
00257
00259 extern void creadhb(int *, int *, int *, complex **, int **, int **);
00260 extern void creadrb(int *, int *, int *, complex **, int **, int **);
00261 extern void creadtriple(int *, int *, int *, complex **, int **, int **);
00262 extern void cCompRow_to_CompCol(int, int, int, complex*, int*, int*,
00263 complex **, int **, int **);
00264 extern void cfill (complex *, int, complex);
00265 extern void cinf_norm_error (int, SuperMatrix *, complex *);
00266 extern void PrintPerf (SuperMatrix *, SuperMatrix *, mem_usage_t *,
00267 complex, complex, complex *, complex *, char *);
00268 extern float sqselect(int, float *, int);
00269
00270
00272 extern void cPrint_CompCol_Matrix(char *, SuperMatrix *);
00273 extern void cPrint_SuperNode_Matrix(char *, SuperMatrix *);
00274 extern void cPrint_Dense_Matrix(char *, SuperMatrix *);
00275 extern void cprint_lu_col(char *, int, int, int *, GlobalLU_t *);
00276 extern int print_double_vec(char *, int, double *);
00277 extern void check_tempv(int, complex *);
00278
00279 #ifdef __cplusplus
00280 }
00281 #endif
00282
00283 #endif
00284