38 typedef
cuSOLVER<Matrix,Vector> type;
41 typedef typename super_type::scalar_type scalar_type;
42 typedef typename super_type::local_ordinal_type local_ordinal_type;
43 typedef typename super_type::global_ordinal_type global_ordinal_type;
44 typedef typename super_type::global_size_type global_size_type;
45 typedef typename super_type::node_type node_type;
47 typedef
TypeMap<Amesos2::cuSOLVER,scalar_type> type_map;
49 typedef typename type_map::type cusolver_type;
50 typedef typename type_map::magnitude_type magnitude_type;
52 typedef
FunctionMap<Amesos2::cuSOLVER,cusolver_type> function_map;
54 #ifdef KOKKOS_ENABLE_CUDA
56 typedef Kokkos::Device<Kokkos::Cuda, Kokkos::CudaSpace> device_type;
58 typedef Kokkos::DefaultExecutionSpace::device_type device_type;
61 typedef int size_type;
62 typedef int ordinal_type;
63 typedef Kokkos::View<size_type*, device_type> device_size_type_array;
64 typedef Kokkos::View<ordinal_type*, device_type> device_ordinal_type_array;
65 typedef Kokkos::View<cusolver_type*, device_type> device_value_type_array;
76 cuSOLVER(Teuchos::RCP<const Matrix> A,
77 Teuchos::RCP<Vector> X,
78 Teuchos::RCP<const Vector> B);
127 int
solve_impl(const Teuchos::Ptr<MultiVecAdapter<Vector> > X,
128 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const;
141 const Teuchos::RCP<Teuchos::ParameterList> & parameterList );
166 const Teuchos::EVerbosityLevel verbLevel) const;
174 mutable struct cuSolverData {
175 cusolverDnHandle_t dn_handle;
176 cusolverSpHandle_t sp_handle;
177 csrcholInfo_t chol_info;
178 cusparseMatDescr_t desc;
179 cublasHandle_t blas_handle;
180 bool bReorder =
false;
181 int small_matrix_threshold = 2500;
184 typedef Kokkos::View<cusolver_type**, Kokkos::LayoutLeft, device_type>
185 device_value_type_matrix;
187 typedef Kokkos::View<cusolver_type**, Kokkos::LayoutLeft, device_type>
188 device_solve_array_t;
191 mutable device_value_type_matrix device_matrix_;
194 mutable device_value_type_matrix device_inverse_;
197 mutable Kokkos::View<int*, device_type> device_ipiv_;
200 mutable Kokkos::View<int, device_type> device_info_;
203 mutable device_value_type_array buffer_;
206 mutable device_solve_array_t xValues_;
207 mutable device_solve_array_t bValues_;
209 device_value_type_array device_nzvals_view_;
210 device_size_type_array device_row_ptr_view_;
211 device_ordinal_type_array device_cols_view_;
215 typedef Kokkos::View<ordinal_type*, device_type> permute_array_t;
216 permute_array_t device_perm_;
217 permute_array_t device_peri_;
218 mutable device_solve_array_t permute_result_;
222 mutable Teuchos::RCP<
const Tpetra::Map<local_ordinal_type,