00001
00063 #ifndef __SUPERLU_sSP_DEFS
00064 #define __SUPERLU_sSP_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
00089
00090
00091 typedef struct {
00092 int *xsup;
00093 int *supno;
00094 int *lsub;
00095 int *xlsub;
00096 float *lusup;
00097 int *xlusup;
00098 float *ucol;
00099 int *usub;
00100 int *xusub;
00101 int nzlmax;
00102 int nzumax;
00103 int nzlumax;
00104 int n;
00105 LU_space_t MemModel;
00106 int num_expansions;
00107 ExpHeader *expanders;
00108 LU_stack_t stack;
00109 } GlobalLU_t;
00110
00111
00112
00113
00114 #ifdef __cplusplus
00115 extern "C" {
00116 #endif
00117
00119 extern void
00120 sgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
00121 SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
00122 extern void
00123 sgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
00124 char *, float *, float *, SuperMatrix *, SuperMatrix *,
00125 void *, int, SuperMatrix *, SuperMatrix *,
00126 float *, float *, float *, float *,
00127 GlobalLU_t *, mem_usage_t *, SuperLUStat_t *, int *);
00128
00129 extern void
00130 sgsisv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
00131 SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
00132 extern void
00133 sgsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
00134 char *, float *, float *, SuperMatrix *, SuperMatrix *,
00135 void *, int, SuperMatrix *, SuperMatrix *, float *, float *,
00136 GlobalLU_t *, mem_usage_t *, SuperLUStat_t *, int *);
00137
00138
00140 extern void
00141 sCreate_CompCol_Matrix(SuperMatrix *, int, int, int, float *,
00142 int *, int *, Stype_t, Dtype_t, Mtype_t);
00143 extern void
00144 sCreate_CompRow_Matrix(SuperMatrix *, int, int, int, float *,
00145 int *, int *, Stype_t, Dtype_t, Mtype_t);
00146 extern void
00147 sCopy_CompCol_Matrix(SuperMatrix *, SuperMatrix *);
00148 extern void
00149 sCreate_Dense_Matrix(SuperMatrix *, int, int, float *, int,
00150 Stype_t, Dtype_t, Mtype_t);
00151 extern void
00152 sCreate_SuperNode_Matrix(SuperMatrix *, int, int, int, float *,
00153 int *, int *, int *, int *, int *,
00154 Stype_t, Dtype_t, Mtype_t);
00155 extern void
00156 sCopy_Dense_Matrix(int, int, float *, int, float *, int);
00157
00158 extern void countnz (const int, int *, int *, int *, GlobalLU_t *);
00159 extern void ilu_countnz (const int, int *, int *, GlobalLU_t *);
00160 extern void fixupL (const int, const int *, GlobalLU_t *);
00161
00162 extern void sallocateA (int, int, float **, int **, int **);
00163 extern void sgstrf (superlu_options_t*, SuperMatrix*,
00164 int, int, int*, void *, int, int *, int *,
00165 SuperMatrix *, SuperMatrix *, GlobalLU_t *,
00166 SuperLUStat_t*, int *);
00167 extern int ssnode_dfs (const int, const int, const int *, const int *,
00168 const int *, int *, int *, GlobalLU_t *);
00169 extern int ssnode_bmod (const int, const int, const int, float *,
00170 float *, GlobalLU_t *, SuperLUStat_t*);
00171 extern void spanel_dfs (const int, const int, const int, SuperMatrix *,
00172 int *, int *, float *, int *, int *, int *,
00173 int *, int *, int *, int *, GlobalLU_t *);
00174 extern void spanel_bmod (const int, const int, const int, const int,
00175 float *, float *, int *, int *,
00176 GlobalLU_t *, SuperLUStat_t*);
00177 extern int scolumn_dfs (const int, const int, int *, int *, int *, int *,
00178 int *, int *, int *, int *, int *, GlobalLU_t *);
00179 extern int scolumn_bmod (const int, const int, float *,
00180 float *, int *, int *, int,
00181 GlobalLU_t *, SuperLUStat_t*);
00182 extern int scopy_to_ucol (int, int, int *, int *, int *,
00183 float *, GlobalLU_t *);
00184 extern int spivotL (const int, const double, int *, int *,
00185 int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
00186 extern void spruneL (const int, const int *, const int, const int,
00187 const int *, const int *, int *, GlobalLU_t *);
00188 extern void sreadmt (int *, int *, int *, float **, int **, int **);
00189 extern void sGenXtrue (int, int, float *, int);
00190 extern void sFillRHS (trans_t, int, float *, int, SuperMatrix *,
00191 SuperMatrix *);
00192 extern void sgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
00193 SuperMatrix *, SuperLUStat_t*, int *);
00194
00195 extern void sgsitrf (superlu_options_t*, SuperMatrix*, int, int, int*,
00196 void *, int, int *, int *, SuperMatrix *, SuperMatrix *,
00197 GlobalLU_t *, SuperLUStat_t*, int *);
00198 extern int sldperm(int, int, int, int [], int [], float [],
00199 int [], float [], float []);
00200 extern int ilu_ssnode_dfs (const int, const int, const int *, const int *,
00201 const int *, int *, GlobalLU_t *);
00202 extern void ilu_spanel_dfs (const int, const int, const int, SuperMatrix *,
00203 int *, int *, float *, float *, int *, int *,
00204 int *, int *, int *, int *, GlobalLU_t *);
00205 extern int ilu_scolumn_dfs (const int, const int, int *, int *, int *,
00206 int *, int *, int *, int *, int *,
00207 GlobalLU_t *);
00208 extern int ilu_scopy_to_ucol (int, int, int *, int *, int *,
00209 float *, int, milu_t, double, int,
00210 float *, int *, GlobalLU_t *, float *);
00211 extern int ilu_spivotL (const int, const double, int *, int *, int, int *,
00212 int *, int *, int *, double, milu_t,
00213 float, GlobalLU_t *, SuperLUStat_t*);
00214 extern int ilu_sdrop_row (superlu_options_t *, int, int, double,
00215 int, int *, double *, GlobalLU_t *,
00216 float *, float *, int);
00217
00218
00221 extern void sgsequ (SuperMatrix *, float *, float *, float *,
00222 float *, float *, int *);
00223 extern void slaqgs (SuperMatrix *, float *, float *, float,
00224 float, float, char *);
00225 extern void sgscon (char *, SuperMatrix *, SuperMatrix *,
00226 float, float *, SuperLUStat_t*, int *);
00227 extern float sPivotGrowth(int, SuperMatrix *, int *,
00228 SuperMatrix *, SuperMatrix *);
00229 extern void sgsrfs (trans_t, SuperMatrix *, SuperMatrix *,
00230 SuperMatrix *, int *, int *, char *, float *,
00231 float *, SuperMatrix *, SuperMatrix *,
00232 float *, float *, SuperLUStat_t*, int *);
00233
00234 extern int sp_strsv (char *, char *, char *, SuperMatrix *,
00235 SuperMatrix *, float *, SuperLUStat_t*, int *);
00236 extern int sp_sgemv (char *, float, SuperMatrix *, float *,
00237 int, float, float *, int);
00238
00239 extern int sp_sgemm (char *, char *, int, int, int, float,
00240 SuperMatrix *, float *, int, float,
00241 float *, int);
00242 extern float slamch_(char *);
00243 extern float smach(char *);
00244
00246 extern int sLUMemInit (fact_t, void *, int, int, int, int, int,
00247 float, SuperMatrix *, SuperMatrix *,
00248 GlobalLU_t *, int **, float **);
00249 extern void sSetRWork (int, int, float *, float **, float **);
00250 extern void sLUWorkFree (int *, float *, GlobalLU_t *);
00251 extern int sLUMemXpand (int, int, MemType, int *, GlobalLU_t *);
00252
00253 extern float *floatMalloc(int);
00254 extern float *floatCalloc(int);
00255 extern int smemory_usage(const int, const int, const int, const int);
00256 extern int sQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
00257 extern int ilu_sQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
00258
00260 extern void sreadhb(FILE *, int *, int *, int *, float **, int **, int **);
00261 extern void sreadrb(int *, int *, int *, float **, int **, int **);
00262 extern void sreadtriple(int *, int *, int *, float **, int **, int **);
00263 extern void sCompRow_to_CompCol(int, int, int, float*, int*, int*,
00264 float **, int **, int **);
00265 extern void sfill (float *, int, float);
00266 extern void sinf_norm_error (int, SuperMatrix *, float *);
00267 extern void PrintPerf (SuperMatrix *, SuperMatrix *, mem_usage_t *,
00268 float, float, float *, float *, char *);
00269 extern float sqselect(int, float *, int);
00270
00271
00273 extern void sPrint_CompCol_Matrix(char *, SuperMatrix *);
00274 extern void sPrint_SuperNode_Matrix(char *, SuperMatrix *);
00275 extern void sPrint_Dense_Matrix(char *, SuperMatrix *);
00276 extern void sprint_lu_col(char *, int, int, int *, GlobalLU_t *);
00277 extern int print_double_vec(char *, int, double *);
00278 extern void check_tempv(int, float *);
00279
00282 extern int sgemm_(const char*, const char*, const int*, const int*, const int*,
00283 const float*, const float*, const int*, const float*,
00284 const int*, const float*, float*, const int*);
00285 extern int strsv_(char*, char*, char*, int*, float*, int*,
00286 float*, int*);
00287 extern int strsm_(char*, char*, char*, char*, int*, int*,
00288 float*, float*, int*, float*, int*);
00289 extern int sgemv_(char *, int *, int *, float *, float *a, int *,
00290 float *, int *, float *, float *, int *);
00291
00292 #ifdef __cplusplus
00293 }
00294 #endif
00295
00296 #endif
00297