52 using type =
Cholmod<Matrix,Vector>;
56 using scalar_type = typename super_type::scalar_type;
57 using local_ordinal_type = typename super_type::local_ordinal_type;
58 using global_ordinal_type = typename super_type::global_ordinal_type;
59 using global_size_type = typename super_type::global_size_type;
60 using node_type = typename super_type::node_type;
62 using type_map =
TypeMap<Amesos2::Cholmod,scalar_type>;
69 using chol_type = typename type_map::type;
70 using magnitude_type = typename type_map::magnitude_type;
72 using function_map =
FunctionMap<Amesos2::Cholmod,chol_type>;
83 Cholmod(Teuchos::RCP<const Matrix> A,
84 Teuchos::RCP<Vector> X,
85 Teuchos::RCP<const Vector> B);
130 int
solve_impl(const Teuchos::Ptr<MultiVecAdapter<Vector> > X,
131 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const;
156 const Teuchos::RCP<Teuchos::ParameterList> & parameterList );
184 const Teuchos::EVerbosityLevel verbLevel) const;
188 mutable struct CholData {
191 cholmod_dense *Y, *E;
196 typedef Kokkos::DefaultHostExecutionSpace HostExecSpaceType;
197 typedef typename HostExecSpaceType::memory_space HostMemSpaceType;
203 typedef int size_int_type;
204 typedef int ordinal_int_type;
206 typedef long size_long_type;
207 typedef long ordinal_long_type;
209 typedef Kokkos::View<size_long_type*, HostExecSpaceType> host_size_long_type_array;
210 typedef Kokkos::View<ordinal_long_type*, HostExecSpaceType> host_ordinal_long_type_array;
212 typedef Kokkos::View<size_int_type*, HostExecSpaceType> host_size_int_type_array;
213 typedef Kokkos::View<ordinal_int_type*, HostExecSpaceType> host_ordinal_int_type_array;
215 typedef Kokkos::View<chol_type*, HostExecSpaceType> host_value_type_array;
222 host_size_long_type_array host_rows_long_view_;
225 host_ordinal_long_type_array host_col_ptr_long_view_;
227 typedef typename Kokkos::View<chol_type**, Kokkos::LayoutLeft, HostExecSpaceType>
236#if defined(KOKKOSKERNELS_ENABLE_SUPERNODAL_SPTRSV) && defined(KOKKOSKERNELS_ENABLE_TPL_CHOLMOD)
238 using DeviceExecSpaceType= Kokkos::DefaultExecutionSpace;
240 #ifdef KOKKOS_ENABLE_CUDA
242 using DeviceMemSpaceType =
typename Kokkos::CudaSpace;
243 #elif KOKKOS_ENABLE_HIP
245 using DeviceMemSpaceType =
typename Kokkos::HIPSpace;
247 using DeviceMemSpaceType =
typename DeviceExecSpaceType::memory_space;
250 typedef Kokkos::View<chol_type**, Kokkos::LayoutLeft, DeviceMemSpaceType>
251 device_solve_array_t;
254 mutable device_solve_array_t device_xValues_;
255 mutable device_solve_array_t device_bValues_;
256 typedef Kokkos::View<int*, HostMemSpaceType> host_int_array;
257 typedef Kokkos::View<int*, DeviceMemSpaceType> device_int_array;
258 host_int_array host_trsv_etree_;
259 host_int_array host_trsv_perm_;
260 device_int_array device_trsv_perm_;
261 mutable device_solve_array_t device_trsv_rhs_;
262 mutable device_solve_array_t device_trsv_sol_;
263 typedef KokkosKernels::Experimental::KokkosKernelsHandle <size_int_type, ordinal_int_type, chol_type,
264 DeviceExecSpaceType, DeviceMemSpaceType, DeviceMemSpaceType> kernel_handle_int_type;
265 typedef KokkosKernels::Experimental::KokkosKernelsHandle <size_long_type, ordinal_long_type, chol_type,
266 DeviceExecSpaceType, DeviceMemSpaceType, DeviceMemSpaceType> kernel_handle_long_type;
267 mutable kernel_handle_int_type device_int_khL_;
268 mutable kernel_handle_int_type device_int_khU_;
269 mutable kernel_handle_long_type device_long_khL_;
270 mutable kernel_handle_long_type device_long_khU_;
278 Teuchos::RCP<const Tpetra::Map<local_ordinal_type,global_ordinal_type,node_type> > map;
281 bool use_triangular_solves_;
282 bool use_cholmod_int_type_;
284 void triangular_solve_symbolic();
285 void triangular_solve_numeric();
288 void triangular_solve()
const;