55 #ifndef AMESOS2_CHOLMOD_FUNCTIONMAP_HPP
56 #define AMESOS2_CHOLMOD_FUNCTIONMAP_HPP
58 #ifdef HAVE_TEUCHOS_COMPLEX
70 struct FunctionMap<Cholmod,double>
73 static void cholmod_init_sparse(
size_t nrow,
size_t ncol,
size_t nzmax,
74 int sorted,
void *p,
void *x,
void *i,
75 cholmod_sparse *sparse)
79 sparse->nzmax = nzmax;
81 sparse->itype = CHOLMOD_LONG;
84 sparse->xtype = CHOLMOD_REAL;
85 sparse->dtype = CHOLMOD_DOUBLE;
91 static void cholmod_init_dense(
int nrow,
int ncol,
int d,
void *x,
97 dense->xtype = CHOLMOD_REAL;
98 dense->dtype = CHOLMOD_DOUBLE;
106 struct FunctionMap<Cholmod,float>
108 static void cholmod_init_sparse(
size_t nrow,
size_t ncol,
size_t nzmax,
109 int sorted,
void *p,
void *x,
void*i,
110 cholmod_sparse* sparse)
114 sparse->nzmax = nzmax;
116 sparse->itype = CHOLMOD_LONG;
119 sparse->xtype = CHOLMOD_REAL;
120 sparse->dtype = CHOLMOD_SINGLE;
127 static void cholmod_init_dense(
int nrow,
int ncol,
int d,
void *x,
128 cholmod_dense *dense)
133 dense->xtype = CHOLMOD_REAL;
134 dense->dtype = CHOLMOD_SINGLE;
141 #ifdef HAVE_TEUCHOS_COMPLEX
143 struct FunctionMap<Cholmod,Kokkos::complex<double>>
146 static void cholmod_init_sparse(
size_t nrow,
size_t ncol,
size_t nzmax,
147 int sorted,
void *p,
void *x,
void *i,
148 cholmod_sparse* sparse)
152 sparse->nzmax = nzmax;
154 sparse->itype = CHOLMOD_LONG;
157 sparse->xtype = CHOLMOD_COMPLEX;
158 sparse->dtype = CHOLMOD_DOUBLE;
165 static void cholmod_init_dense(
int nrow,
int ncol,
int d,
void *x,
166 cholmod_dense *dense)
171 dense->xtype = CHOLMOD_COMPLEX;
172 dense->dtype = CHOLMOD_DOUBLE;
180 struct FunctionMap<Cholmod,Kokkos::complex<float>>
183 static void cholmod_init_sparse(
size_t nrow,
size_t ncol,
size_t nzmax,
184 int sorted,
void *p,
void *x,
void *i,
185 cholmod_sparse* sparse)
189 sparse->nzmax = nzmax;
191 sparse->itype = CHOLMOD_LONG;
194 sparse->xtype = CHOLMOD_COMPLEX;
195 sparse->dtype = CHOLMOD_SINGLE;
202 static void cholmod_init_dense(
int nrow,
int ncol,
int d,
void *x,
203 cholmod_dense *dense)
208 dense->xtype = CHOLMOD_COMPLEX;
209 dense->dtype = CHOLMOD_SINGLE;
219 #endif // AMESOS2_CHOLMOD_FUNCTIONMAP_HPP
Declaration of Function mapping class for Amesos2.
Provides definition of Cholmod types as well as conversions and type traits.