43 #ifndef IFPACK_IKLU_UTILS_H
44 #define IFPACK_IKLU_UTILS_H
75 void *
csr_realloc (
void *p,
int n,
size_t size,
int *ok) ;
78 csr *
csr_spalloc (
int m,
int n,
int nzmax,
int values,
int triplet) ;
136 int csr_dfs (
int j,
csr *G,
int top,
int *xi,
int *pstack,
const int *pinv);
138 int csr_scatter (
const csr *
A,
int j,
double beta,
int *w,
double *x,
int mark,
142 double *x,
const int *pinv,
int up);
143 int csr_tdfs (
int j,
int k,
int *head,
const int *next,
int *post,
153 int csr_fkeep (
csr *
A,
int (*fkeep) (
int,
int,
double,
void *),
void *other);
155 #define CS_MAX(a,b) (((a) > (b)) ? (a) : (b))
156 #define CS_MIN(a,b) (((a) < (b)) ? (a) : (b))
157 #define CS_FLIP(i) (-(i)-2)
158 #define CS_UNFLIP(i) (((i) < 0) ? CS_FLIP(i) : (i))
159 #define CS_MARKED(w,j) (w [j] < 0)
160 #define CS_MARK(w,j) { w [j] = CS_FLIP (w [j]) ; }
161 #define CS_CSC(A) (A && (A->nz == -1))
162 #define CS_TRIPLET(A) (A && (A->nz >= 0))
164 #endif // IFPACK_IKLU_UTILS_H
int * csr_amd(int order, const csr *A)
csrn * csr_lu(const csr *A, const css *S, double tol)
csrd * csr_dfree(csrd *D)
csrd * csr_dalloc(int m, int n)
csrn * csr_ndone(csrn *N, csr *C, void *w, void *x, int ok)
csr * csr_spalloc(int m, int n, int nzmax, int values, int triplet)
int csr_sprealloc(csr *A, int nzmax)
int csr_tdfs(int j, int k, int *head, const int *next, int *post, int *stack)
csrd * csr_ddone(csrd *D, csr *C, void *w, int ok)
struct csr_dmperm_results csrd
int csr_droptol(csr *A, double tol)
csr * csr_permute(const csr *A, const int *pinv, const int *q, int values)
void * csr_realloc(void *p, int n, size_t size, int *ok)
int csr_dropzeros(csr *A)
int csr_dfs(int j, csr *G, int top, int *xi, int *pstack, const int *pinv)
int csr_print(const csr *A, int brief)
csrn * csr_nfree(csrn *N)
csr * csr_done(csr *C, void *w, void *x, int ok)
csr * csr_add(const csr *A, const csr *B, double alpha, double beta)
int csr_fkeep(csr *A, int(*fkeep)(int, int, double, void *), void *other)
csr * csr_transpose(const csr *A, int values)
int * csr_idone(int *p, csr *C, void *w, int ok)
double csr_norm(const csr *A)
int csr_scatter(const csr *B, int i, double alpha, int *w, double *x, int mark, csr *C, int nz)
css * csr_sqr(int order, const csr *A)
int csr_usolve(const csr *U, double *x)
double csr_cumsum(int *p, int *c, int n)
int csr_spsolve(csr *G, const csr *B, int k, int *xi, double *x, const int *pinv, int up)
csr * csr_multiply(const csr *A, const csr *B)
int csr_reach(csr *G, const csr *B, int k, int *xi, const int *pinv)
int csr_lsolve(const csr *L, double *x)