55 #ifndef AMESOS2_NEWSOLVER_FUNCTIONMAP_HPP
56 #define AMESOS2_NEWSOLVER_FUNCTIONMAP_HPP
58 #ifdef HAVE_TEUCHOS_COMPLEX
63 #include "Amesos2_Cholmod_TypeMap.hpp"
69 # include "cholmod_core.h"
75 struct FunctionMap<Cholmod,double>
78 static void cholmod_init_sparse(
size_t nrow,
size_t ncol,
size_t nzmax,
79 int sorted,
void *p,
void *x,
void *i,
80 CHOL::cholmod_sparse *sparse)
84 sparse->nzmax = nzmax;
86 sparse->itype = CHOLMOD_INT;
89 sparse->xtype = CHOLMOD_REAL;
90 sparse->dtype = CHOLMOD_DOUBLE;
96 static void cholmod_init_dense(
int nrow,
int ncol,
int d,
void *x,
97 CHOL::cholmod_dense *dense)
102 dense->xtype = CHOLMOD_REAL;
103 dense->dtype = CHOLMOD_DOUBLE;
109 struct FunctionMap<Cholmod,float>
111 static void cholmod_init_sparse(
size_t nrow,
size_t ncol,
size_t nzmax,
112 int sorted,
void *p,
void *x,
void*i,
113 CHOL::cholmod_sparse* sparse)
117 sparse->nzmax = nzmax;
119 sparse->itype = CHOLMOD_INT;
122 sparse->xtype = CHOLMOD_REAL;
123 sparse->dtype = CHOLMOD_SINGLE;
130 static void cholmod_init_dense(
int nrow,
int ncol,
int d,
void *x,
131 CHOL::cholmod_dense *dense)
136 dense->xtype = CHOLMOD_REAL;
137 dense->dtype = CHOLMOD_SINGLE;
142 #ifdef HAVE_TEUCHOS_COMPLEX
144 struct FunctionMap<Cholmod,CHOL::complex>
147 static void cholmod_init_sparse(
size_t nrow,
size_t ncol,
size_t nzmax,
148 int sorted,
void *p,
void *x,
void *i,
149 CHOL::cholmod_sparse* sparse)
153 sparse->nzmax = nzmax;
155 sparse->itype = CHOLMOD_INT;
158 sparse->xtype = CHOLMOD_COMPLEX;
165 static void cholmod_init_dense(
int nrow,
int ncol,
int d,
void *x,
166 CHOL::cholmod_dense *dense)
171 dense->xtype = CHOLMOD_COMPLEX;
179 #endif // AMESOS2_CHOLMOD_FUNCTIONMAP_HPP
Declaration of Function mapping class for Amesos2.