21 #ifndef AMESOS2_CHOLMOD_FUNCTIONMAP_HPP
22 #define AMESOS2_CHOLMOD_FUNCTIONMAP_HPP
24 #ifdef HAVE_TEUCHOS_COMPLEX
36 struct FunctionMap<Cholmod,double>
39 static void cholmod_init_sparse(
size_t nrow,
size_t ncol,
size_t nzmax,
40 int sorted,
void *p,
void *x,
void *i,
41 cholmod_sparse *sparse,
int cholmod_itype)
45 sparse->nzmax = nzmax;
47 sparse->itype = cholmod_itype;
50 sparse->xtype = CHOLMOD_REAL;
51 sparse->dtype = CHOLMOD_DOUBLE;
57 static void cholmod_init_dense(
int nrow,
int ncol,
int d,
void *x,
63 dense->xtype = CHOLMOD_REAL;
64 dense->dtype = CHOLMOD_DOUBLE;
72 struct FunctionMap<Cholmod,float>
74 static void cholmod_init_sparse(
size_t nrow,
size_t ncol,
size_t nzmax,
75 int sorted,
void *p,
void *x,
void*i,
76 cholmod_sparse* sparse,
int cholmod_itype)
80 sparse->nzmax = nzmax;
82 sparse->itype = cholmod_itype;
85 sparse->xtype = CHOLMOD_REAL;
86 sparse->dtype = CHOLMOD_SINGLE;
93 static void cholmod_init_dense(
int nrow,
int ncol,
int d,
void *x,
99 dense->xtype = CHOLMOD_REAL;
100 dense->dtype = CHOLMOD_SINGLE;
107 #ifdef HAVE_TEUCHOS_COMPLEX
109 struct FunctionMap<Cholmod,Kokkos::complex<double>>
112 static void cholmod_init_sparse(
size_t nrow,
size_t ncol,
size_t nzmax,
113 int sorted,
void *p,
void *x,
void *i,
114 cholmod_sparse* sparse,
int cholmod_itype)
118 sparse->nzmax = nzmax;
120 sparse->itype = cholmod_itype;
123 sparse->xtype = CHOLMOD_COMPLEX;
124 sparse->dtype = CHOLMOD_DOUBLE;
131 static void cholmod_init_dense(
int nrow,
int ncol,
int d,
void *x,
132 cholmod_dense *dense)
137 dense->xtype = CHOLMOD_COMPLEX;
138 dense->dtype = CHOLMOD_DOUBLE;
146 struct FunctionMap<Cholmod,Kokkos::complex<float>>
149 static void cholmod_init_sparse(
size_t nrow,
size_t ncol,
size_t nzmax,
150 int sorted,
void *p,
void *x,
void *i,
151 cholmod_sparse* sparse,
int cholmod_itype)
155 sparse->nzmax = nzmax;
157 sparse->itype = cholmod_itype;
160 sparse->xtype = CHOLMOD_COMPLEX;
161 sparse->dtype = CHOLMOD_SINGLE;
168 static void cholmod_init_dense(
int nrow,
int ncol,
int d,
void *x,
169 cholmod_dense *dense)
174 dense->xtype = CHOLMOD_COMPLEX;
175 dense->dtype = CHOLMOD_SINGLE;
185 #endif // AMESOS2_CHOLMOD_FUNCTIONMAP_HPP
Declaration of Function mapping class for Amesos2.
Provides definition of Cholmod types as well as conversions and type traits.