TBCI Numerical high perf. C++ Library
2.8.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
home
abuild
rpmbuild
BUILD
numerix-2.0
lina
interface
superlu
supermatrix.h
Go to the documentation of this file.
1
5
/* $Id: supermatrix.h,v 1.2.2.3 2010/08/26 07:58:23 garloff Exp $ */
6
7
#ifndef __SUPERLU_SUPERMATRIX
/* allow multiple inclusions */
8
#define __SUPERLU_SUPERMATRIX
9
10
/********************************************
11
* The matrix types are defined as follows. *
12
********************************************/
13
typedef
enum
{
14
SLU_NC
,
/* column-wise, no supernode */
15
SLU_NR
,
/* row-wize, no supernode */
16
SLU_SC
,
/* column-wise, supernode */
17
SLU_SR
,
/* row-wise, supernode */
18
SLU_NCP
,
/* column-wise, column-permuted, no supernode
19
(The consecutive columns of nonzeros, after permutation,
20
may not be stored contiguously.) */
21
SLU_DN
/* Fortran style column-wise storage for dense matrix */
22
}
Stype_t
;
23
24
typedef
enum
{
25
SLU_S
,
/* single */
26
SLU_D
,
/* double */
27
SLU_C
,
/* single complex */
28
SLU_Z
/* double complex */
29
}
Dtype_t
;
30
31
typedef
enum
{
32
SLU_GE
,
/* general */
33
SLU_TRLU
,
/* lower triangular, unit diagonal */
34
SLU_TRUU
,
/* upper triangular, unit diagonal */
35
SLU_TRL
,
/* lower triangular */
36
SLU_TRU
,
/* upper triangular */
37
SLU_SYL
,
/* symmetric, store lower half */
38
SLU_SYU
,
/* symmetric, store upper half */
39
SLU_HEL
,
/* Hermitian, store lower half */
40
SLU_HEU
/* Hermitian, store upper half */
41
}
Mtype_t
;
42
43
typedef
struct
{
44
Stype_t
Stype
;
/* Storage type: interprets the storage structure
45
pointed to by *Store. */
46
Dtype_t
Dtype
;
/* Data type. */
47
Mtype_t
Mtype
;
/* Matrix type: describes the mathematical property of
48
the matrix. */
49
int
nrow
;
/* number of rows */
50
int
ncol
;
/* number of columns */
51
void
*
Store
;
/* pointer to the actual storage of the matrix */
52
}
SuperMatrix
;
53
54
/***********************************************
55
* The storage schemes are defined as follows. *
56
***********************************************/
57
58
/* Stype == NC (Also known as Harwell-Boeing sparse matrix format (CCS)) */
59
typedef
struct
{
60
int
nnz
;
/* number of nonzeros in the matrix */
61
void
*
nzval
;
/* pointer to array of nonzero values, packed by column */
62
int
*
rowind
;
/* pointer to array of row indices of the nonzeros */
63
int
*
colptr
;
/* pointer to array of beginning of columns in nzval[]
64
and rowind[] */
65
/* Note:
66
Zero-based indexing is used;
67
colptr[] has ncol+1 entries, the last one pointing
68
beyond the last column, so that colptr[ncol] = nnz. */
69
}
NCformat
;
70
71
/* Stype == NR (Also known as row compressed storage (RCS). */
72
typedef
struct
{
73
int
nnz
;
/* number of nonzeros in the matrix */
74
void
*
nzval
;
/* pointer to array of nonzero values, packed by row */
75
int
*
colind
;
/* pointer to array of column indices of the nonzeros */
76
int
*
rowptr
;
/* pointer to array of beginning of rows in nzval[]
77
and colind[] */
78
/* Note:
79
Zero-based indexing is used;
80
rowptr[] has nrow+1 entries, the last one pointing
81
beyond the last column, so that rowptr[nrow] = nnz. */
82
}
NRformat
;
83
84
/* Stype == SC */
85
typedef
struct
{
86
int
nnz
;
/* number of nonzeros in the matrix */
87
int
nsuper
;
/* number of supernodes, minus 1 */
88
void
*
nzval
;
/* pointer to array of nonzero values, packed by column */
89
int
*
nzval_colptr
;
/* pointer to array of beginning of columns in nzval[] */
90
int
*
rowind
;
/* pointer to array of compressed row indices of
91
rectangular supernodes */
92
int
*
rowind_colptr
;
/* pointer to array of beginning of columns in rowind[] */
93
int
*
col_to_sup
;
/* col_to_sup[j] is the supernode number to which column
94
j belongs; mapping from column to supernode number. */
95
int
*
sup_to_col
;
/* sup_to_col[s] points to the start of the s-th
96
supernode; mapping from supernode number to column.
97
e.g.: col_to_sup: 0 1 2 2 3 3 3 4 4 4 4 4 (ncol=12)
98
sup_to_col: 0 1 2 4 7 12 (nsuper=4) */
99
/* Note:
100
Zero-based indexing is used;
101
nzval_colptr[], rowind_colptr[], col_to_sup and
102
sup_to_col[] have ncol+1 entries, the last one
103
pointing beyond the last column. */
104
}
SCformat
;
105
106
/* Stype == NCP */
107
typedef
struct
{
108
int
nnz
;
/* number of nonzeros in the matrix */
109
void
*
nzval
;
/* pointer to array of nonzero values, packed by column */
110
int
*
rowind
;
/* pointer to array of row indices of the nonzeros */
111
/* Note: nzval[]/rowind[] always have the same length */
112
int
*
colbeg
;
/* colbeg[j] points to the beginning of column j in nzval[]
113
and rowind[] */
114
int
*
colend
;
/* colend[j] points to one past the last element of column
115
j in nzval[] and rowind[] */
116
/* Note:
117
Zero-based indexing is used;
118
The consecutive columns of the nonzeros may not be
119
contiguous in storage, because the matrix has been
120
postmultiplied by a column permutation matrix. */
121
}
NCPformat
;
122
123
/* Stype == DN */
124
typedef
struct
{
125
int
lda
;
/* leading dimension */
126
void
*
nzval
;
/* array of size lda*ncol to represent a dense matrix */
127
}
DNformat
;
128
129
130
131
/*********************************************************
132
* Macros used for easy access of sparse matrix entries. *
133
*********************************************************/
134
#define L_SUB_START(col) ( Lstore->rowind_colptr[col] )
135
#define L_SUB(ptr) ( Lstore->rowind[ptr] )
136
#define L_NZ_START(col) ( Lstore->nzval_colptr[col] )
137
#define L_FST_SUPC(superno) ( Lstore->sup_to_col[superno] )
138
#define U_NZ_START(col) ( Ustore->colptr[col] )
139
#define U_SUB(ptr) ( Ustore->rowind[ptr] )
140
141
#ifndef COLPERM_T_DECLARED
142
typedef
enum
{
NATURAL
,
MMD_ATA
,
MMD_AT_PLUS_A
,
COLAMD
,
MY_PERMC
}
colperm_t
;
143
#define COLPERM_T_DECLARED
144
#endif
145
146
#endif
/* __SUPERLU_SUPERMATRIX */
SLU_SR
Definition:
supermatrix.h:17
DNformat::nzval
void * nzval
Definition:
supermatrix.h:126
SLU_NC
Definition:
supermatrix.h:14
SuperMatrix::Store
void * Store
Definition:
supermatrix.h:51
SCformat::sup_to_col
int * sup_to_col
Definition:
supermatrix.h:95
NCformat::nnz
int nnz
Definition:
supermatrix.h:60
NCPformat
Definition:
supermatrix.h:107
MMD_ATA
Definition:
superlu.h:20
MY_PERMC
Definition:
superlu.h:20
SCformat::nzval_colptr
int * nzval_colptr
Definition:
supermatrix.h:89
NRformat::nnz
int nnz
Definition:
supermatrix.h:73
SLU_TRL
Definition:
supermatrix.h:35
NCPformat::colbeg
int * colbeg
Definition:
supermatrix.h:112
NRformat::colind
int * colind
Definition:
supermatrix.h:75
SuperMatrix
Definition:
supermatrix.h:43
SLU_HEU
Definition:
supermatrix.h:40
NCPformat::rowind
int * rowind
Definition:
supermatrix.h:110
SCformat::rowind
int * rowind
Definition:
supermatrix.h:90
SuperMatrix::Mtype
Mtype_t Mtype
Definition:
supermatrix.h:47
Stype_t
Stype_t
Definition:
supermatrix.h:13
SLU_C
Definition:
supermatrix.h:27
NCformat::nzval
void * nzval
Definition:
supermatrix.h:61
SLU_SYL
Definition:
supermatrix.h:37
SCformat::rowind_colptr
int * rowind_colptr
Definition:
supermatrix.h:92
SuperMatrix::Stype
Stype_t Stype
Definition:
supermatrix.h:44
SLU_SYU
Definition:
supermatrix.h:38
colperm_t
colperm_t
get column permutation vector perm_c[], according to permc_spec: permc_spec = NATURAL(0): use the nat...
Definition:
superlu.h:20
SCformat::nnz
int nnz
Definition:
supermatrix.h:86
NRformat
Definition:
supermatrix.h:72
SuperMatrix::nrow
int nrow
Definition:
supermatrix.h:49
SLU_NR
Definition:
supermatrix.h:15
SLU_NCP
Definition:
supermatrix.h:18
NATURAL
Definition:
superlu.h:20
SCformat::col_to_sup
int * col_to_sup
Definition:
supermatrix.h:93
NCformat::rowind
int * rowind
Definition:
supermatrix.h:62
SLU_HEL
Definition:
supermatrix.h:39
SuperMatrix::Dtype
Dtype_t Dtype
Definition:
supermatrix.h:46
SLU_TRUU
Definition:
supermatrix.h:34
SuperMatrix::ncol
int ncol
Definition:
supermatrix.h:50
SLU_D
Definition:
supermatrix.h:26
MMD_AT_PLUS_A
Definition:
superlu.h:20
NCformat
Definition:
supermatrix.h:59
NCPformat::nnz
int nnz
Definition:
supermatrix.h:108
SCformat
Definition:
supermatrix.h:85
SLU_TRLU
Definition:
supermatrix.h:33
SLU_GE
Definition:
supermatrix.h:32
DNformat::lda
int lda
Definition:
supermatrix.h:125
NCformat::colptr
int * colptr
Definition:
supermatrix.h:63
SLU_S
Definition:
supermatrix.h:25
SLU_TRU
Definition:
supermatrix.h:36
NCPformat::colend
int * colend
Definition:
supermatrix.h:114
Mtype_t
Mtype_t
Definition:
supermatrix.h:31
SLU_Z
Definition:
supermatrix.h:28
SLU_DN
Definition:
supermatrix.h:21
SCformat::nzval
void * nzval
Definition:
supermatrix.h:88
SCformat::nsuper
int nsuper
Definition:
supermatrix.h:87
Dtype_t
Dtype_t
Definition:
supermatrix.h:24
NRformat::rowptr
int * rowptr
Definition:
supermatrix.h:76
DNformat
Definition:
supermatrix.h:124
SLU_SC
Definition:
supermatrix.h:16
NRformat::nzval
void * nzval
Definition:
supermatrix.h:74
COLAMD
Definition:
superlu.h:20
NCPformat::nzval
void * nzval
Definition:
supermatrix.h:109
Generated by
1.8.5