SuperLU: SRC/slu_ddefs.h Source File

- Main Page
- Data Structures
- Files

# SRC/slu_ddefs.h

Go to the documentation of this file.

    00001
    00063 #ifndef __SUPERLU_dSP_DEFS /* allow multiple inclusions */
    00064 #define __SUPERLU_dSP_DEFS
    00065
    00066 /*
    00067  * File name:           dsp_defs.h
    00068  * Purpose:             Sparse matrix types and function prototypes
    00069  * History:
    00070  */
    00071
    00072 #ifdef _CRAY
    00073 #include <fortran.h>
    00074 #include <string.h>
    00075 #endif
    00076
    00077 /* Define my integer type int_t */
    00078 typedef int int_t; /* default */
    00079
    00080 #include <math.h>
    00081 #include <limits.h>
    00082 #include "slu_Cnames.h"
    00083 #include "supermatrix.h"
    00084 #include "slu_util.h"
    00085
    00086
    00087
    00088 typedef struct {
    00089     int     *xsup;    /* supernode and column mapping */
    00090     int     *supno;
    00091     int     *lsub;    /* compressed L subscripts */
    00092     int     *xlsub;
    00093     double  *lusup;   /* L supernodes */
    00094     int     *xlusup;
    00095     double  *ucol;    /* U columns */
    00096     int     *usub;
    00097     int     *xusub;
    00098     int     nzlmax;   /* current max size of lsub */
    00099     int     nzumax;   /*    "    "    "      ucol */
    00100     int     nzlumax;  /*    "    "    "     lusup */
    00101     int     n;        /* number of columns in the matrix */
    00102     LU_space_t MemModel; /* 0 - system malloc'd; 1 - user provided */
    00103     int     num_expansions;
    00104     ExpHeader *expanders; /* Array of pointers to 4 types of memory */
    00105     LU_stack_t stack;     /* use user supplied memory */
    00106 } GlobalLU_t;
    00107
    00108
    00109 /* -------- Prototypes -------- */
    00110
    00111 #ifdef __cplusplus
    00112 extern "C" {
    00113 #endif
    00114
    00116 extern void
    00117 dgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
    00118       SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
    00119 extern void
    00120 dgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
    00121        char *, double *, double *, SuperMatrix *, SuperMatrix *,
    00122        void *, int, SuperMatrix *, SuperMatrix *,
    00123        double *, double *, double *, double *,
    00124        mem_usage_t *, SuperLUStat_t *, int *);
    00125     /* ILU */
    00126 extern void
    00127 dgsisv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
    00128       SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
    00129 extern void
    00130 dgsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
    00131        char *, double *, double *, SuperMatrix *, SuperMatrix *,
    00132        void *, int, SuperMatrix *, SuperMatrix *, double *, double *,
    00133        mem_usage_t *, SuperLUStat_t *, int *);
    00134
    00135
    00137 extern void
    00138 dCreate_CompCol_Matrix(SuperMatrix *, int, int, int, double *,
    00139                        int *, int *, Stype_t, Dtype_t, Mtype_t);
    00140 extern void
    00141 dCreate_CompRow_Matrix(SuperMatrix *, int, int, int, double *,
    00142                        int *, int *, Stype_t, Dtype_t, Mtype_t);
    00143 extern void
    00144 dCopy_CompCol_Matrix(SuperMatrix *, SuperMatrix *);
    00145 extern void
    00146 dCreate_Dense_Matrix(SuperMatrix *, int, int, double *, int,
    00147                      Stype_t, Dtype_t, Mtype_t);
    00148 extern void
    00149 dCreate_SuperNode_Matrix(SuperMatrix *, int, int, int, double *,
    00150                          int *, int *, int *, int *, int *,
    00151                          Stype_t, Dtype_t, Mtype_t);
    00152 extern void
    00153 dCopy_Dense_Matrix(int, int, double *, int, double *, int);
    00154
    00155 extern void    countnz (const int, int *, int *, int *, GlobalLU_t *);
    00156 extern void    ilu_countnz (const int, int *, int *, GlobalLU_t *);
    00157 extern void    fixupL (const int, const int *, GlobalLU_t *);
    00158
    00159 extern void    dallocateA (int, int, double **, int **, int **);
    00160 extern void    dgstrf (superlu_options_t*, SuperMatrix*,
    00161                        int, int, int*, void *, int, int *, int *,
    00162                        SuperMatrix *, SuperMatrix *, SuperLUStat_t*, int *);
    00163 extern int     dsnode_dfs (const int, const int, const int *, const int *,
    00164                              const int *, int *, int *, GlobalLU_t *);
    00165 extern int     dsnode_bmod (const int, const int, const int, double *,
    00166                               double *, GlobalLU_t *, SuperLUStat_t*);
    00167 extern void    dpanel_dfs (const int, const int, const int, SuperMatrix *,
    00168                            int *, int *, double *, int *, int *, int *,
    00169                            int *, int *, int *, int *, GlobalLU_t *);
    00170 extern void    dpanel_bmod (const int, const int, const int, const int,
    00171                            double *, double *, int *, int *,
    00172                            GlobalLU_t *, SuperLUStat_t*);
    00173 extern int     dcolumn_dfs (const int, const int, int *, int *, int *, int *,
    00174                            int *, int *, int *, int *, int *, GlobalLU_t *);
    00175 extern int     dcolumn_bmod (const int, const int, double *,
    00176                            double *, int *, int *, int,
    00177                            GlobalLU_t *, SuperLUStat_t*);
    00178 extern int     dcopy_to_ucol (int, int, int *, int *, int *,
    00179                               double *, GlobalLU_t *);
    00180 extern int     dpivotL (const int, const double, int *, int *,
    00181                          int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
    00182 extern void    dpruneL (const int, const int *, const int, const int,
    00183                           const int *, const int *, int *, GlobalLU_t *);
    00184 extern void    dreadmt (int *, int *, int *, double **, int **, int **);
    00185 extern void    dGenXtrue (int, int, double *, int);
    00186 extern void    dFillRHS (trans_t, int, double *, int, SuperMatrix *,
    00187                           SuperMatrix *);
    00188 extern void    dgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
    00189                         SuperMatrix *, SuperLUStat_t*, int *);
    00190 /* ILU */
    00191 extern void    dgsitrf (superlu_options_t*, SuperMatrix*, int, int, int*,
    00192                         void *, int, int *, int *, SuperMatrix *, SuperMatrix *,
    00193                         SuperLUStat_t*, int *);
    00194 extern int     dldperm(int, int, int, int [], int [], double [],
    00195                         int [], double [], double []);
    00196 extern int     ilu_dsnode_dfs (const int, const int, const int *, const int *,
    00197                                const int *, int *, GlobalLU_t *);
    00198 extern void    ilu_dpanel_dfs (const int, const int, const int, SuperMatrix *,
    00199                                int *, int *, double *, double *, int *, int *,
    00200                                int *, int *, int *, int *, GlobalLU_t *);
    00201 extern int     ilu_dcolumn_dfs (const int, const int, int *, int *, int *,
    00202                                 int *, int *, int *, int *, int *,
    00203                                 GlobalLU_t *);
    00204 extern int     ilu_dcopy_to_ucol (int, int, int *, int *, int *,
    00205                                   double *, int, milu_t, double, int,
    00206                                   double *, int *, GlobalLU_t *, double *);
    00207 extern int     ilu_dpivotL (const int, const double, int *, int *, int, int *,
    00208                             int *, int *, int *, double, milu_t,
    00209                             double, GlobalLU_t *, SuperLUStat_t*);
    00210 extern int     ilu_ddrop_row (superlu_options_t *, int, int, double,
    00211                               int, int *, double *, GlobalLU_t *,
    00212                               double *, double *, int);
    00213
    00214
    00217 extern void    dgsequ (SuperMatrix *, double *, double *, double *,
    00218                         double *, double *, int *);
    00219 extern void    dlaqgs (SuperMatrix *, double *, double *, double,
    00220                         double, double, char *);
    00221 extern void    dgscon (char *, SuperMatrix *, SuperMatrix *,
    00222                          double, double *, SuperLUStat_t*, int *);
    00223 extern double   dPivotGrowth(int, SuperMatrix *, int *,
    00224                             SuperMatrix *, SuperMatrix *);
    00225 extern void    dgsrfs (trans_t, SuperMatrix *, SuperMatrix *,
    00226                        SuperMatrix *, int *, int *, char *, double *,
    00227                        double *, SuperMatrix *, SuperMatrix *,
    00228                        double *, double *, SuperLUStat_t*, int *);
    00229
    00230 extern int     sp_dtrsv (char *, char *, char *, SuperMatrix *,
    00231                         SuperMatrix *, double *, SuperLUStat_t*, int *);
    00232 extern int     sp_dgemv (char *, double, SuperMatrix *, double *,
    00233                         int, double, double *, int);
    00234
    00235 extern int     sp_dgemm (char *, char *, int, int, int, double,
    00236                         SuperMatrix *, double *, int, double,
    00237                         double *, int);
    00238 extern         double dlamch_(char *);
    00239
    00240
    00242 extern int     dLUMemInit (fact_t, void *, int, int, int, int, int,
    00243                             double, SuperMatrix *, SuperMatrix *,
    00244                             GlobalLU_t *, int **, double **);
    00245 extern void    dSetRWork (int, int, double *, double **, double **);
    00246 extern void    dLUWorkFree (int *, double *, GlobalLU_t *);
    00247 extern int     dLUMemXpand (int, int, MemType, int *, GlobalLU_t *);
    00248
    00249 extern double  *doubleMalloc(int);
    00250 extern double  *doubleCalloc(int);
    00251 extern int     dmemory_usage(const int, const int, const int, const int);
    00252 extern int     dQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
    00253 extern int     ilu_dQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
    00254
    00256 extern void    dreadhb(int *, int *, int *, double **, int **, int **);
    00257 extern void    dreadrb(int *, int *, int *, double **, int **, int **);
    00258 extern void    dreadtriple(int *, int *, int *, double **, int **, int **);
    00259 extern void    dCompRow_to_CompCol(int, int, int, double*, int*, int*,
    00260                                    double **, int **, int **);
    00261 extern void    dfill (double *, int, double);
    00262 extern void    dinf_norm_error (int, SuperMatrix *, double *);
    00263 extern void    PrintPerf (SuperMatrix *, SuperMatrix *, mem_usage_t *,
    00264                          double, double, double *, double *, char *);
    00265 extern double  dqselect(int, double *, int);
    00266
    00267
    00269 extern void    dPrint_CompCol_Matrix(char *, SuperMatrix *);
    00270 extern void    dPrint_SuperNode_Matrix(char *, SuperMatrix *);
    00271 extern void    dPrint_Dense_Matrix(char *, SuperMatrix *);
    00272 extern void    dprint_lu_col(char *, int, int, int *, GlobalLU_t *);
    00273 extern int     print_double_vec(char *, int, double *);
    00274 extern void    check_tempv(int, double *);
    00275
    00276 #ifdef __cplusplus
    00277   }
    00278 #endif
    00279
    00280 #endif /* __SUPERLU_dSP_DEFS */
    00281