SRC/slu_cdefs.h

Go to the documentation of this file.
00001 
00063 #ifndef __SUPERLU_cSP_DEFS /* allow multiple inclusions */
00064 #define __SUPERLU_cSP_DEFS
00065 
00066 /*
00067  * File name:           csp_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 "slu_Cnames.h"
00081 #include "supermatrix.h"
00082 #include "slu_util.h"
00083 #include "slu_scomplex.h"
00084 
00085 
00086 
00087 typedef struct {
00088     int     *xsup;    /* supernode and column mapping */
00089     int     *supno;   
00090     int     *lsub;    /* compressed L subscripts */
00091     int     *xlsub;
00092     complex  *lusup;   /* L supernodes */
00093     int     *xlusup;
00094     complex  *ucol;    /* U columns */
00095     int     *usub;
00096     int     *xusub;
00097     int     nzlmax;   /* current max size of lsub */
00098     int     nzumax;   /*    "    "    "      ucol */
00099     int     nzlumax;  /*    "    "    "     lusup */
00100     int     n;        /* number of columns in the matrix */
00101     LU_space_t MemModel; /* 0 - system malloc'd; 1 - user provided */
00102 } GlobalLU_t;
00103 
00104 
00105 /* -------- Prototypes -------- */
00106 
00107 #ifdef __cplusplus
00108 extern "C" {
00109 #endif
00110 
00112 extern void
00113 cgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
00114       SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
00115 extern void
00116 cgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
00117        char *, float *, float *, SuperMatrix *, SuperMatrix *,
00118        void *, int, SuperMatrix *, SuperMatrix *,
00119        float *, float *, float *, float *,
00120        mem_usage_t *, SuperLUStat_t *, int *);
00121 
00123 extern void
00124 cCreate_CompCol_Matrix(SuperMatrix *, int, int, int, complex *,
00125                        int *, int *, Stype_t, Dtype_t, Mtype_t);
00126 extern void
00127 cCreate_CompRow_Matrix(SuperMatrix *, int, int, int, complex *,
00128                        int *, int *, Stype_t, Dtype_t, Mtype_t);
00129 extern void
00130 cCopy_CompCol_Matrix(SuperMatrix *, SuperMatrix *);
00131 extern void
00132 cCreate_Dense_Matrix(SuperMatrix *, int, int, complex *, int,
00133                      Stype_t, Dtype_t, Mtype_t);
00134 extern void
00135 cCreate_SuperNode_Matrix(SuperMatrix *, int, int, int, complex *, 
00136                          int *, int *, int *, int *, int *,
00137                          Stype_t, Dtype_t, Mtype_t);
00138 extern void
00139 cCopy_Dense_Matrix(int, int, complex *, int, complex *, int);
00140 
00141 extern void    countnz (const int, int *, int *, int *, GlobalLU_t *);
00142 extern void    fixupL (const int, const int *, GlobalLU_t *);
00143 
00144 extern void    callocateA (int, int, complex **, int **, int **);
00145 extern void    cgstrf (superlu_options_t*, SuperMatrix*, float, 
00146                        int, int, int*, void *, int, int *, int *, 
00147                        SuperMatrix *, SuperMatrix *, SuperLUStat_t*, int *);
00148 extern int     csnode_dfs (const int, const int, const int *, const int *,
00149                              const int *, int *, int *, GlobalLU_t *);
00150 extern int     csnode_bmod (const int, const int, const int, complex *,
00151                               complex *, GlobalLU_t *, SuperLUStat_t*);
00152 extern void    cpanel_dfs (const int, const int, const int, SuperMatrix *,
00153                            int *, int *, complex *, int *, int *, int *,
00154                            int *, int *, int *, int *, GlobalLU_t *);
00155 extern void    cpanel_bmod (const int, const int, const int, const int,
00156                            complex *, complex *, int *, int *,
00157                            GlobalLU_t *, SuperLUStat_t*);
00158 extern int     ccolumn_dfs (const int, const int, int *, int *, int *, int *,
00159                            int *, int *, int *, int *, int *, GlobalLU_t *);
00160 extern int     ccolumn_bmod (const int, const int, complex *,
00161                            complex *, int *, int *, int,
00162                            GlobalLU_t *, SuperLUStat_t*);
00163 extern int     ccopy_to_ucol (int, int, int *, int *, int *,
00164                               complex *, GlobalLU_t *);         
00165 extern int     cpivotL (const int, const float, int *, int *, 
00166                          int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
00167 extern void    cpruneL (const int, const int *, const int, const int,
00168                           const int *, const int *, int *, GlobalLU_t *);
00169 extern void    creadmt (int *, int *, int *, complex **, int **, int **);
00170 extern void    cGenXtrue (int, int, complex *, int);
00171 extern void    cFillRHS (trans_t, int, complex *, int, SuperMatrix *,
00172                           SuperMatrix *);
00173 extern void    cgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
00174                         SuperMatrix *, SuperLUStat_t*, int *);
00175 
00176 
00179 extern void    cgsequ (SuperMatrix *, float *, float *, float *,
00180                         float *, float *, int *);
00181 extern void    claqgs (SuperMatrix *, float *, float *, float,
00182                         float, float, char *);
00183 extern void    cgscon (char *, SuperMatrix *, SuperMatrix *, 
00184                          float, float *, SuperLUStat_t*, int *);
00185 extern float   cPivotGrowth(int, SuperMatrix *, int *, 
00186                             SuperMatrix *, SuperMatrix *);
00187 extern void    cgsrfs (trans_t, SuperMatrix *, SuperMatrix *,
00188                        SuperMatrix *, int *, int *, char *, float *, 
00189                        float *, SuperMatrix *, SuperMatrix *,
00190                        float *, float *, SuperLUStat_t*, int *);
00191 
00192 extern int     sp_ctrsv (char *, char *, char *, SuperMatrix *,
00193                         SuperMatrix *, complex *, SuperLUStat_t*, int *);
00194 extern int     sp_cgemv (char *, complex, SuperMatrix *, complex *,
00195                         int, complex, complex *, int);
00196 
00197 extern int     sp_cgemm (char *, char *, int, int, int, complex,
00198                         SuperMatrix *, complex *, int, complex, 
00199                         complex *, int);
00200 
00202 extern int     cLUMemInit (fact_t, void *, int, int, int, int, int,
00203                              SuperMatrix *, SuperMatrix *,
00204                              GlobalLU_t *, int **, complex **);
00205 extern void    cSetRWork (int, int, complex *, complex **, complex **);
00206 extern void    cLUWorkFree (int *, complex *, GlobalLU_t *);
00207 extern int     cLUMemXpand (int, int, MemType, int *, GlobalLU_t *);
00208 
00209 extern complex  *complexMalloc(int);
00210 extern complex  *complexCalloc(int);
00211 extern float  *floatMalloc(int);
00212 extern float  *floatCalloc(int);
00213 extern int     cmemory_usage(const int, const int, const int, const int);
00214 extern int     cQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
00215 
00217 extern void    creadhb(int *, int *, int *, complex **, int **, int **);
00218 extern void    cCompRow_to_CompCol(int, int, int, complex*, int*, int*,
00219                                    complex **, int **, int **);
00220 extern void    cfill (complex *, int, complex);
00221 extern void    cinf_norm_error (int, SuperMatrix *, complex *);
00222 extern void    PrintPerf (SuperMatrix *, SuperMatrix *, mem_usage_t *,
00223                          complex, complex, complex *, complex *, char *);
00224 
00226 extern void    cPrint_CompCol_Matrix(char *, SuperMatrix *);
00227 extern void    cPrint_SuperNode_Matrix(char *, SuperMatrix *);
00228 extern void    cPrint_Dense_Matrix(char *, SuperMatrix *);
00229 extern void    print_lu_col(char *, int, int, int *, GlobalLU_t *);
00230 extern void    check_tempv(int, complex *);
00231 
00232 #ifdef __cplusplus
00233   }
00234 #endif
00235 
00236 #endif /* __SUPERLU_cSP_DEFS */
00237 

Generated on Fri Aug 1 22:40:39 2008 for SuperLU by  doxygen 1.4.6