13 auto num_rows = A.numRows();
14 auto num_cols = A.numCols();
15 auto num_non_zero = A.nnz();
17 auto values = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), A.values);
18 auto row_ptrs = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), A.graph.row_map);
19 auto col_inds = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), A.graph.entries);
21 auto& options = dss_handle.get_options();
23 auto& stat = dss_handle.get_stat();
24 auto& L = dss_handle.get_L();
25 auto& U = dss_handle.get_U();
26 auto& perm_r = dss_handle.get_perm_r();
27 auto& perm_c = dss_handle.get_perm_c();
28 auto& etree = dss_handle.get_etree();
29 auto& colcnt_h = dss_handle.get_colcnt_h();
30 auto& part_super_h = dss_handle.get_part_super_h();
31 auto& work = dss_handle.get_work();
33 StatAlloc(num_cols, options.nprocs, options.panel_size, options.relax, &stat);
34 StatInit(num_cols, options.nprocs, &stat);
36 perm_r.resize(
static_cast<size_t>(num_rows));
37 perm_c.resize(
static_cast<size_t>(num_cols));
38 etree.resize(
static_cast<size_t>(num_rows));
39 colcnt_h.resize(
static_cast<size_t>(num_cols));
40 part_super_h.resize(
static_cast<size_t>(num_cols));
41 options.perm_c = perm_c.data();
42 options.perm_r = perm_r.data();
43 options.etree = etree.data();
44 options.colcnt_h = colcnt_h.data();
45 options.part_super_h = part_super_h.data();
48 dCreate_CompCol_Matrix(
49 &Amatrix, num_rows, num_cols, num_non_zero, values.data(), col_inds.data(),
50 const_cast<int*
>(row_ptrs.data()), SLU_NC, SLU_D, SLU_GE
52 get_perm_c(0, &Amatrix, perm_c.data());
57 sp_colorder(&Amatrix, options.perm_c, &options, &AC);
60 pdgstrf(&options, &AC, options.perm_r, &L, &U, &stat, &info);
62 if (
static_cast<size_t>(info) > work.size()) {
63 work.resize(
static_cast<size_t>(1.2 * info));
64 options.work = work.data();