43 #ifndef IFPACK_IKLU_UTILS_H
44 #define IFPACK_IKLU_UTILS_H
46 #if defined(Ifpack_SHOW_DEPRECATED_WARNINGS)
48 #warning "The Ifpack package is deprecated"
74 csr *csr_add (
const csr *A,
const csr *B,
double alpha,
double beta) ;
75 csr *csr_multiply (
const csr *A,
const csr *B) ;
76 double csr_norm (
const csr *A) ;
77 int csr_print (
const csr *A,
int brief) ;
78 csr *csr_transpose (
const csr *A,
int values) ;
81 void *csr_realloc (
void *p,
int n,
size_t size,
int *ok) ;
84 csr *csr_spalloc (
int m,
int n,
int nzmax,
int values,
int triplet) ;
86 int csr_sprealloc (
csr *A,
int nzmax) ;
123 int *csr_amd (
int order,
const csr *A) ;
125 int csr_droptol (
csr *A,
double tol);
126 int csr_dropzeros (
csr *A);
127 int csr_lsolve (
const csr *L,
double *x);
128 csrn *csr_lu (
const csr *A,
const css *S,
double tol);
129 csr *csr_permute (
const csr *A,
const int *pinv,
const int *q,
int values);
130 css *csr_sqr (
int order,
const csr *A);
131 int csr_usolve (
const csr *U,
double *x);
141 double csr_cumsum (
int *p,
int *c,
int n) ;
142 int csr_dfs (
int j,
csr *G,
int top,
int *xi,
int *pstack,
const int *pinv);
143 int csr_reach (
csr *G,
const csr *B,
int k,
int *xi,
const int *pinv);
144 int csr_scatter (
const csr *A,
int j,
double beta,
int *w,
double *x,
int mark,
147 int csr_spsolve (
csr *G,
const csr *B,
int k,
int *xi,
148 double *x,
const int *pinv,
int up);
149 int csr_tdfs (
int j,
int k,
int *head,
const int *next,
int *post,
152 csrd *csr_dalloc (
int m,
int n);
154 csrd *csr_ddone (
csrd *D,
csr *C,
void *w,
int ok) ;
155 csr *csr_done (
csr *C,
void *w,
void *x,
int ok) ;
156 int *csr_idone (
int *p,
csr *C,
void *w,
int ok) ;
157 csrn *csr_ndone (
csrn *N,
csr *C,
void *w,
void *x,
int ok) ;
159 int csr_fkeep (
csr *A,
int (*fkeep) (
int,
int,
double,
void *),
void *other);
161 #define CS_MAX(a,b) (((a) > (b)) ? (a) : (b))
162 #define CS_MIN(a,b) (((a) < (b)) ? (a) : (b))
163 #define CS_FLIP(i) (-(i)-2)
164 #define CS_UNFLIP(i) (((i) < 0) ? CS_FLIP(i) : (i))
165 #define CS_MARKED(w,j) (w [j] < 0)
166 #define CS_MARK(w,j) { w [j] = CS_FLIP (w [j]) ; }
167 #define CS_CSC(A) (A && (A->nz == -1))
168 #define CS_TRIPLET(A) (A && (A->nz >= 0))
170 #endif // IFPACK_IKLU_UTILS_H