52 typedef
Superlu<Matrix,Vector> type;
56 typedef typename super_type::scalar_type scalar_type;
57 typedef typename super_type::local_ordinal_type local_ordinal_type;
58 typedef typename super_type::global_ordinal_type global_ordinal_type;
59 typedef typename super_type::global_size_type global_size_type;
61 typedef
TypeMap<Amesos2::Superlu,scalar_type> type_map;
68 typedef typename type_map::type slu_type;
69 typedef typename type_map::convert_type slu_convert_type;
70 typedef typename type_map::magnitude_type magnitude_type;
72 typedef
FunctionMap<Amesos2::Superlu,slu_type> function_map;
83 Superlu(Teuchos::RCP<const Matrix> A,
84 Teuchos::RCP<Vector> X,
85 Teuchos::RCP<const Vector> B);
135 int
solve_impl(const Teuchos::Ptr<MultiVecAdapter<Vector> > X,
136 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const;
179 const Teuchos::RCP<Teuchos::ParameterList> & parameterList );
206 const Teuchos::EVerbosityLevel verbLevel) const;
208 typedef Kokkos::DefaultHostExecutionSpace HostExecSpaceType;
211 mutable struct SLUData {
212 SLU::SuperMatrix A, B, X, L, U;
215 SLU::superlu_options_t options;
216 SLU::mem_usage_t mem_usage;
217#ifdef HAVE_AMESOS2_SUPERLU5_API
220 SLU::SuperLUStat_t stat;
224 typedef Kokkos::View<magnitude_type*, HostExecSpaceType> host_mag_array;
225 typedef Kokkos::View<int*, HostExecSpaceType> host_int_array;
228 host_int_array perm_r;
229 host_int_array perm_c;
230 host_int_array etree;
234#if defined(KOKKOSKERNELS_ENABLE_SUPERNODAL_SPTRSV) && defined(KOKKOSKERNELS_ENABLE_TPL_SUPERLU)
235 host_int_array parents;
241 magnitude_type anorm, rcond;
247 typedef int size_type;
248 typedef int ordinal_type;
249 typedef Kokkos::View<size_type*, HostExecSpaceType> host_size_type_array;
250 typedef Kokkos::View<ordinal_type*, HostExecSpaceType> host_ordinal_type_array;
251 typedef Kokkos::View<slu_type*, HostExecSpaceType> host_value_type_array;
256 Teuchos::Array<slu_convert_type> convert_nzvals_;
263 typedef typename Kokkos::View<slu_type**, Kokkos::LayoutLeft, HostExecSpaceType>
268 mutable Teuchos::Array<slu_convert_type> convert_xValues_;
272 mutable Teuchos::Array<slu_convert_type> convert_bValues_;
274#if defined(KOKKOSKERNELS_ENABLE_SUPERNODAL_SPTRSV) && defined(KOKKOSKERNELS_ENABLE_TPL_SUPERLU)
275 typedef Kokkos::DefaultExecutionSpace DeviceExecSpaceType;
277 #ifdef KOKKOS_ENABLE_CUDA
279 typedef typename Kokkos::CudaSpace DeviceMemSpaceType;
281 typedef typename DeviceExecSpaceType::memory_space DeviceMemSpaceType;
284 typedef Kokkos::View<slu_type**, Kokkos::LayoutLeft, DeviceMemSpaceType>
285 device_solve_array_t;
288 mutable device_solve_array_t device_xValues_;
289 mutable device_solve_array_t device_bValues_;
290 typedef Kokkos::View<int*, DeviceMemSpaceType> device_int_array;
291 typedef Kokkos::View<magnitude_type*, DeviceMemSpaceType> device_mag_array;
292 device_int_array device_trsv_perm_r_;
293 device_int_array device_trsv_perm_c_;
294 device_mag_array device_trsv_R_;
295 device_mag_array device_trsv_C_;
296 mutable device_solve_array_t device_trsv_rhs_;
297 mutable device_solve_array_t device_trsv_sol_;
298 typedef KokkosKernels::Experimental::KokkosKernelsHandle <size_type, ordinal_type, slu_type,
299 DeviceExecSpaceType, DeviceMemSpaceType, DeviceMemSpaceType> kernel_handle_type;
300 mutable kernel_handle_type device_khL_;
301 mutable kernel_handle_type device_khU_;
303 bool sptrsv_invert_diag_;
304 bool sptrsv_invert_offdiag_;
305 bool sptrsv_u_in_csr_;
306 bool sptrsv_merge_supernodes_;
307 bool sptrsv_use_spmv_;
341 bool use_triangular_solves_;
343 void triangular_solve_factor();
347 bool symmetrize_metis_;
350 void triangular_solve()
const;