kusano 7d535a
kusano 7d535a
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
kusano 7d535a
<title>SuperLU: SRC/supermatrix.h Source File</title>
kusano 7d535a
<link href="doxygen.css" rel="stylesheet" type="text/css">
kusano 7d535a
<link href="tabs.css" rel="stylesheet" type="text/css">
kusano 7d535a
kusano 7d535a
kusano 7d535a
kusano 7d535a
  
kusano 7d535a
    
    kusano 7d535a
          
  • Main Page
  • kusano 7d535a
          
  • Data Structures
  • kusano 7d535a
          
  • Files
  • kusano 7d535a
        
    kusano 7d535a
      
    kusano 7d535a

    SRC/supermatrix.h

    Go to the documentation of this file.
    00001 
    kusano 7d535a
    00004 #ifndef __SUPERLU_SUPERMATRIX /* allow multiple inclusions */
    kusano 7d535a
    00005 #define __SUPERLU_SUPERMATRIX
    kusano 7d535a
    00006 
    kusano 7d535a
    00007 
    kusano 7d535a
    00008 /********************************************
    kusano 7d535a
    00009  * The matrix types are defined as follows. *
    kusano 7d535a
    00010  ********************************************/
    kusano 7d535a
    00011 typedef enum {
    kusano 7d535a
    00012     SLU_NC,    /* column-wise, no supernode */
    kusano 7d535a
    00013     SLU_NCP,   /* column-wise, column-permuted, no supernode 
    kusano 7d535a
    00014                   (The consecutive columns of nonzeros, after permutation,
    kusano 7d535a
    00015                    may not be stored  contiguously.) */
    kusano 7d535a
    00016     SLU_NR,    /* row-wize, no supernode */
    kusano 7d535a
    00017     SLU_SC,    /* column-wise, supernode */
    kusano 7d535a
    00018     SLU_SCP,   /* supernode, column-wise, permuted */    
    kusano 7d535a
    00019     SLU_SR,    /* row-wise, supernode */
    kusano 7d535a
    00020     SLU_DN,     /* Fortran style column-wise storage for dense matrix */
    kusano 7d535a
    00021     SLU_NR_loc  /* distributed compressed row format  */ 
    kusano 7d535a
    00022 } Stype_t;
    kusano 7d535a
    00023 
    kusano 7d535a
    00024 typedef enum {
    kusano 7d535a
    00025     SLU_S,     /* single */
    kusano 7d535a
    00026     SLU_D,     /* double */
    kusano 7d535a
    00027     SLU_C,     /* single complex */
    kusano 7d535a
    00028     SLU_Z      /* double complex */
    kusano 7d535a
    00029 } Dtype_t;
    kusano 7d535a
    00030 
    kusano 7d535a
    00031 typedef enum {
    kusano 7d535a
    00032     SLU_GE,    /* general */
    kusano 7d535a
    00033     SLU_TRLU,  /* lower triangular, unit diagonal */
    kusano 7d535a
    00034     SLU_TRUU,  /* upper triangular, unit diagonal */
    kusano 7d535a
    00035     SLU_TRL,   /* lower triangular */
    kusano 7d535a
    00036     SLU_TRU,   /* upper triangular */
    kusano 7d535a
    00037     SLU_SYL,   /* symmetric, store lower half */
    kusano 7d535a
    00038     SLU_SYU,   /* symmetric, store upper half */
    kusano 7d535a
    00039     SLU_HEL,   /* Hermitian, store lower half */
    kusano 7d535a
    00040     SLU_HEU    /* Hermitian, store upper half */
    kusano 7d535a
    00041 } Mtype_t;
    kusano 7d535a
    00042 
    kusano 7d535a
    00043 typedef struct {
    kusano 7d535a
    00044         Stype_t Stype; /* Storage type: interprets the storage structure 
    kusano 7d535a
    00045                           pointed to by *Store. */
    kusano 7d535a
    00046         Dtype_t Dtype; /* Data type. */
    kusano 7d535a
    00047         Mtype_t Mtype; /* Matrix type: describes the mathematical property of 
    kusano 7d535a
    00048                           the matrix. */
    kusano 7d535a
    00049         int_t  nrow;   /* number of rows */
    kusano 7d535a
    00050         int_t  ncol;   /* number of columns */
    kusano 7d535a
    00051         void *Store;   /* pointer to the actual storage of the matrix */
    kusano 7d535a
    00052 } SuperMatrix;
    kusano 7d535a
    00053 
    kusano 7d535a
    00054 /***********************************************
    kusano 7d535a
    00055  * The storage schemes are defined as follows. *
    kusano 7d535a
    00056  ***********************************************/
    kusano 7d535a
    00057 
    kusano 7d535a
    00058 /* Stype == SLU_NC (Also known as Harwell-Boeing sparse matrix format) */
    kusano 7d535a
    00059 typedef struct {
    kusano 7d535a
    00060     int_t  nnz;     /* number of nonzeros in the matrix */
    kusano 7d535a
    00061     void *nzval;    /* pointer to array of nonzero values, packed by column */
    kusano 7d535a
    00062     int_t  *rowind; /* pointer to array of row indices of the nonzeros */
    kusano 7d535a
    00063     int_t  *colptr; /* pointer to array of beginning of columns in nzval[] 
    kusano 7d535a
    00064                        and rowind[]  */
    kusano 7d535a
    00065                     /* Note:
    kusano 7d535a
    00066                        Zero-based indexing is used;
    kusano 7d535a
    00067                        colptr[] has ncol+1 entries, the last one pointing
    kusano 7d535a
    00068                        beyond the last column, so that colptr[ncol] = nnz. */
    kusano 7d535a
    00069 } NCformat;
    kusano 7d535a
    00070 
    kusano 7d535a
    00071 /* Stype == SLU_NR */
    kusano 7d535a
    00072 typedef struct {
    kusano 7d535a
    00073     int_t  nnz;     /* number of nonzeros in the matrix */
    kusano 7d535a
    00074     void *nzval;    /* pointer to array of nonzero values, packed by raw */
    kusano 7d535a
    00075     int_t  *colind; /* pointer to array of columns indices of the nonzeros */
    kusano 7d535a
    00076     int_t  *rowptr; /* pointer to array of beginning of rows in nzval[] 
    kusano 7d535a
    00077                        and colind[]  */
    kusano 7d535a
    00078                     /* Note:
    kusano 7d535a
    00079                        Zero-based indexing is used;
    kusano 7d535a
    00080                        rowptr[] has nrow+1 entries, the last one pointing
    kusano 7d535a
    00081                        beyond the last row, so that rowptr[nrow] = nnz. */
    kusano 7d535a
    00082 } NRformat;
    kusano 7d535a
    00083 
    kusano 7d535a
    00084 /* Stype == SLU_SC */
    kusano 7d535a
    00085 typedef struct {
    kusano 7d535a
    00086   int_t  nnz;        /* number of nonzeros in the matrix */
    kusano 7d535a
    00087   int_t  nsuper;     /* number of supernodes, minus 1 */
    kusano 7d535a
    00088   void *nzval;       /* pointer to array of nonzero values, packed by column */
    kusano 7d535a
    00089   int_t *nzval_colptr;/* pointer to array of beginning of columns in nzval[] */
    kusano 7d535a
    00090   int_t *rowind;     /* pointer to array of compressed row indices of 
    kusano 7d535a
    00091                         rectangular supernodes */
    kusano 7d535a
    00092   int_t *rowind_colptr;/* pointer to array of beginning of columns in rowind[] */
    kusano 7d535a
    00093   int_t *col_to_sup;   /* col_to_sup[j] is the supernode number to which column 
    kusano 7d535a
    00094                         j belongs; mapping from column to supernode number. */
    kusano 7d535a
    00095   int_t *sup_to_col;   /* sup_to_col[s] points to the start of the s-th 
    kusano 7d535a
    00096                         supernode; mapping from supernode number to column.
    kusano 7d535a
    00097                         e.g.: col_to_sup: 0 1 2 2 3 3 3 4 4 4 4 4 4 (ncol=12)
    kusano 7d535a
    00098                               sup_to_col: 0 1 2 4 7 12           (nsuper=4) */
    kusano 7d535a
    00099                      /* Note:
    kusano 7d535a
    00100                         Zero-based indexing is used;
    kusano 7d535a
    00101                         nzval_colptr[], rowind_colptr[], col_to_sup and
    kusano 7d535a
    00102                         sup_to_col[] have ncol+1 entries, the last one
    kusano 7d535a
    00103                         pointing beyond the last column.
    kusano 7d535a
    00104                         For col_to_sup[], only the first ncol entries are
    kusano 7d535a
    00105                         defined. For sup_to_col[], only the first nsuper+2
    kusano 7d535a
    00106                         entries are defined. */
    kusano 7d535a
    00107 } SCformat;
    kusano 7d535a
    00108 
    kusano 7d535a
    00109 /* Stype == SLU_SCP */
    kusano 7d535a
    00110 typedef struct {
    kusano 7d535a
    00111   int_t  nnz;        /* number of nonzeros in the matrix */
    kusano 7d535a
    00112   int_t  nsuper;     /* number of supernodes */
    kusano 7d535a
    00113   void *nzval;       /* pointer to array of nonzero values, packed by column */
    kusano 7d535a
    00114   int_t  *nzval_colbeg;/* nzval_colbeg[j] points to beginning of column j
    kusano 7d535a
    00115                           in nzval[] */
    kusano 7d535a
    00116   int_t  *nzval_colend;/* nzval_colend[j] points to one past the last element
    kusano 7d535a
    00117                           of column j in nzval[] */
    kusano 7d535a
    00118   int_t  *rowind;      /* pointer to array of compressed row indices of 
    kusano 7d535a
    00119                           rectangular supernodes */
    kusano 7d535a
    00120   int_t *rowind_colbeg;/* rowind_colbeg[j] points to beginning of column j
    kusano 7d535a
    00121                           in rowind[] */
    kusano 7d535a
    00122   int_t *rowind_colend;/* rowind_colend[j] points to one past the last element
    kusano 7d535a
    00123                           of column j in rowind[] */
    kusano 7d535a
    00124   int_t *col_to_sup;   /* col_to_sup[j] is the supernode number to which column
    kusano 7d535a
    00125                           j belongs; mapping from column to supernode. */
    kusano 7d535a
    00126   int_t *sup_to_colbeg; /* sup_to_colbeg[s] points to the start of the s-th 
    kusano 7d535a
    00127                            supernode; mapping from supernode to column.*/
    kusano 7d535a
    00128   int_t *sup_to_colend; /* sup_to_colend[s] points to one past the end of the
    kusano 7d535a
    00129                            s-th supernode; mapping from supernode number to
    kusano 7d535a
    00130                            column.
    kusano 7d535a
    00131                         e.g.: col_to_sup: 0 1 2 2 3 3 3 4 4 4 4 4 4 (ncol=12)
    kusano 7d535a
    00132                               sup_to_colbeg: 0 1 2 4 7              (nsuper=4)
    kusano 7d535a
    00133                               sup_to_colend: 1 2 4 7 12                    */
    kusano 7d535a
    00134                      /* Note:
    kusano 7d535a
    00135                         Zero-based indexing is used;
    kusano 7d535a
    00136                         nzval_colptr[], rowind_colptr[], col_to_sup and
    kusano 7d535a
    00137                         sup_to_col[] have ncol+1 entries, the last one
    kusano 7d535a
    00138                         pointing beyond the last column.         */
    kusano 7d535a
    00139 } SCPformat;
    kusano 7d535a
    00140 
    kusano 7d535a
    00141 /* Stype == SLU_NCP */
    kusano 7d535a
    00142 typedef struct {
    kusano 7d535a
    00143     int_t nnz;    /* number of nonzeros in the matrix */
    kusano 7d535a
    00144     void *nzval;  /* pointer to array of nonzero values, packed by column */
    kusano 7d535a
    00145     int_t *rowind;/* pointer to array of row indices of the nonzeros */
    kusano 7d535a
    00146                   /* Note: nzval[]/rowind[] always have the same length */
    kusano 7d535a
    00147     int_t *colbeg;/* colbeg[j] points to the beginning of column j in nzval[] 
    kusano 7d535a
    00148                      and rowind[]  */
    kusano 7d535a
    00149     int_t *colend;/* colend[j] points to one past the last element of column
    kusano 7d535a
    00150                      j in nzval[] and rowind[]  */
    kusano 7d535a
    00151                   /* Note:
    kusano 7d535a
    00152                      Zero-based indexing is used;
    kusano 7d535a
    00153                      The consecutive columns of the nonzeros may not be 
    kusano 7d535a
    00154                      contiguous in storage, because the matrix has been 
    kusano 7d535a
    00155                      postmultiplied by a column permutation matrix. */
    kusano 7d535a
    00156 } NCPformat;
    kusano 7d535a
    00157 
    kusano 7d535a
    00158 /* Stype == SLU_DN */
    kusano 7d535a
    00159 typedef struct {
    kusano 7d535a
    00160     int_t lda;    /* leading dimension */
    kusano 7d535a
    00161     void *nzval;  /* array of size lda*ncol to represent a dense matrix */
    kusano 7d535a
    00162 } DNformat;
    kusano 7d535a
    00163 
    kusano 7d535a
    00164 /* Stype == SLU_NR_loc (Distributed Compressed Row Format) */
    kusano 7d535a
    00165 typedef struct {
    kusano 7d535a
    00166     int_t nnz_loc;   /* number of nonzeros in the local submatrix */
    kusano 7d535a
    00167     int_t m_loc;     /* number of rows local to this processor */
    kusano 7d535a
    00168     int_t fst_row;   /* global index of the first row */
    kusano 7d535a
    00169     void  *nzval;    /* pointer to array of nonzero values, packed by row */
    kusano 7d535a
    00170     int_t *rowptr;   /* pointer to array of beginning of rows in nzval[] 
    kusano 7d535a
    00171                         and colind[]  */
    kusano 7d535a
    00172     int_t *colind;   /* pointer to array of column indices of the nonzeros */
    kusano 7d535a
    00173                      /* Note:
    kusano 7d535a
    00174                         Zero-based indexing is used;
    kusano 7d535a
    00175                         rowptr[] has n_loc + 1 entries, the last one pointing
    kusano 7d535a
    00176                         beyond the last row, so that rowptr[n_loc] = nnz_loc.*/
    kusano 7d535a
    00177 } NRformat_loc;
    kusano 7d535a
    00178 
    kusano 7d535a
    00179 
    kusano 7d535a
    00180 #endif  /* __SUPERLU_SUPERMATRIX */
    kusano 7d535a
    kusano 7d535a

    <address style="text-align: right;"><small>Generated on Mon Nov 22 10:23:47 2010 for SuperLU by </small></address>
    kusano 7d535a
    kusano 7d535a
    doxygen 1.5.5 
    kusano 7d535a
    kusano 7d535a