Skip to content

Commit 0e71cb9

Browse files
committed
sptrsv: move KokkosSparse::Experimental::SPTRSVAlgorithm to KokkosSparse::SPTRSVAlgorithm
Signed-off-by: Junchao Zhang <[email protected]>
1 parent 813c10d commit 0e71cb9

7 files changed

+53
-53
lines changed

sparse/impl/KokkosSparse_sptrsv_solve_impl.hpp

+12-14
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,6 @@ struct SptrsvWrap {
12901290
using LowerTPFunc = FunctorTypeMacro(TriLvlSchedTP1SolverFunctor, true, BlockEnabled);
12911291

12921292
#if defined(KOKKOSKERNELS_ENABLE_SUPERNODAL_SPTRSV)
1293-
using namespace KokkosSparse::Experimental;
12941293
using device_t = Kokkos::Device<execution_space, temp_mem_space>;
12951294
using integer_view_host_t = typename TriSolveHandle::integer_view_host_t;
12961295
using row_map_host_view_t = Kokkos::View<size_type *, Kokkos::HostSpace>;
@@ -1348,14 +1347,14 @@ struct SptrsvWrap {
13481347
#if defined(KOKKOS_ENABLE_CUDA) && defined(KOKKOSPSTRSV_SOLVE_IMPL_PROFILE)
13491348
cudaProfilerStart();
13501349
#endif
1351-
if (thandle.get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_RP) {
1350+
if (thandle.get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_RP) {
13521351
LowerRPFunc lrpp(row_map, entries, values, lhs, rhs, nodes_grouped_by_level, block_size);
13531352

13541353
Kokkos::parallel_for("parfor_fixed_lvl",
13551354
Kokkos::Experimental::require(range_policy(space, node_count, node_count + lvl_nodes),
13561355
Kokkos::Experimental::WorkItemProperty::HintLightWeight),
13571356
lrpp);
1358-
} else if (thandle.get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_TP1) {
1357+
} else if (thandle.get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1) {
13591358
LowerTPFunc ltpp(row_map, entries, values, lhs, rhs, nodes_grouped_by_level, node_count, block_size);
13601359
int team_size = thandle.get_team_size();
13611360
auto tp =
@@ -1551,7 +1550,7 @@ struct SptrsvWrap {
15511550
cudaProfilerStop();
15521551
#endif
15531552
} // end if
1554-
} // end for lvl
1553+
} // end for lvl
15551554

15561555
#ifdef profile_supernodal_etree
15571556
Kokkos::fence();
@@ -1586,7 +1585,6 @@ struct SptrsvWrap {
15861585
using UpperTPFunc = FunctorTypeMacro(TriLvlSchedTP1SolverFunctor, false, BlockEnabled);
15871586

15881587
#if defined(KOKKOSKERNELS_ENABLE_SUPERNODAL_SPTRSV)
1589-
using namespace KokkosSparse::Experimental;
15901588
using integer_view_host_t = typename TriSolveHandle::integer_view_host_t;
15911589
using row_map_host_view_t = Kokkos::View<size_type *, Kokkos::HostSpace>;
15921590

@@ -1644,13 +1642,13 @@ struct SptrsvWrap {
16441642
cudaProfilerStart();
16451643
#endif
16461644

1647-
if (thandle.get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_RP) {
1645+
if (thandle.get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_RP) {
16481646
UpperRPFunc urpp(row_map, entries, values, lhs, rhs, nodes_grouped_by_level, block_size);
16491647
Kokkos::parallel_for("parfor_fixed_lvl",
16501648
Kokkos::Experimental::require(range_policy(space, node_count, node_count + lvl_nodes),
16511649
Kokkos::Experimental::WorkItemProperty::HintLightWeight),
16521650
urpp);
1653-
} else if (thandle.get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_TP1) {
1651+
} else if (thandle.get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1) {
16541652
UpperTPFunc utpp(row_map, entries, values, lhs, rhs, nodes_grouped_by_level, node_count, block_size);
16551653
int team_size = thandle.get_team_size();
16561654
auto tp =
@@ -1955,7 +1953,7 @@ struct SptrsvWrap {
19551953
cudaProfilerStop();
19561954
#endif
19571955
} // end if
1958-
} // end for lvl
1956+
} // end for lvl
19591957
#ifdef profile_supernodal_etree
19601958
Kokkos::fence();
19611959
double sptrsv_time_seconds = sptrsv_timer.seconds();
@@ -2116,12 +2114,12 @@ struct SptrsvWrap {
21162114
const auto block_enabled = thandle_v[i]->is_block_enabled();
21172115
KK_REQUIRE(block_enabled == BlockEnabled);
21182116
if (lvl_nodes != 0) {
2119-
if (thandle_v[i]->get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_RP) {
2117+
if (thandle_v[i]->get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_RP) {
21202118
Kokkos::parallel_for("parfor_fixed_lvl",
21212119
range_policy(execspace_v[i], node_count_v[i], node_count_v[i] + lvl_nodes),
21222120
RPFunctor(row_map_v[i], entries_v[i], values_v[i], lhs_v[i], rhs_v[i],
21232121
nodes_grouped_by_level_v[i], block_size));
2124-
} else if (thandle_v[i]->get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_TP1) {
2122+
} else if (thandle_v[i]->get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1) {
21252123
int team_size = thandle_v[i]->get_team_size();
21262124
auto tp = team_size == -1 ? team_policy(execspace_v[i], lvl_nodes, Kokkos::AUTO)
21272125
: team_policy(execspace_v[i], lvl_nodes, team_size);
@@ -2137,10 +2135,10 @@ struct SptrsvWrap {
21372135
}
21382136
node_count_v[i] += lvl_nodes;
21392137
} // end if (lvl_nodes != 0)
2140-
} // end if (lvl < nlevels_v[i])
2141-
} // end for streams
2142-
} // end for lvl
2143-
} // end tri_solve_streams
2138+
} // end if (lvl < nlevels_v[i])
2139+
} // end for streams
2140+
} // end for lvl
2141+
} // end tri_solve_streams
21442142

21452143
}; // struct SptrsvWrap
21462144

sparse/impl/KokkosSparse_sptrsv_solve_spec.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ struct SPTRSV_SOLVE<ExecutionSpace, KernelHandle, RowMapType, EntriesType, Value
111111
if (sptrsv_handle->is_symbolic_complete() == false) {
112112
Experimental::lower_tri_symbolic(space, *sptrsv_handle, row_map, entries);
113113
}
114-
if (sptrsv_handle->get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN) {
114+
if (sptrsv_handle->get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN) {
115115
Sptrsv::template tri_solve_chain<true>(space, *sptrsv_handle, row_map, entries, values, b, x);
116116
} else {
117117
#ifdef KOKKOSKERNELS_SPTRSV_CUDAGRAPHSUPPORT
@@ -133,7 +133,7 @@ struct SPTRSV_SOLVE<ExecutionSpace, KernelHandle, RowMapType, EntriesType, Value
133133
if (sptrsv_handle->is_symbolic_complete() == false) {
134134
Experimental::upper_tri_symbolic(space, *sptrsv_handle, row_map, entries);
135135
}
136-
if (sptrsv_handle->get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN) {
136+
if (sptrsv_handle->get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN) {
137137
Sptrsv::template tri_solve_chain<false>(space, *sptrsv_handle, row_map, entries, values, b, x);
138138
} else {
139139
#ifdef KOKKOSKERNELS_SPTRSV_CUDAGRAPHSUPPORT

sparse/impl/KokkosSparse_sptrsv_symbolic_impl.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void lower_tri_symbolic(ExecSpaceIn& space, TriSolveHandle& thandle, const RowMa
149149
Kokkos::Timer timer;
150150
#endif
151151

152-
using namespace KokkosSparse::Experimental;
152+
using KokkosSparse::SPTRSVAlgorithm;
153153
if (thandle.get_algorithm() == SPTRSVAlgorithm::SEQLVLSCHD_RP ||
154154
thandle.get_algorithm() == SPTRSVAlgorithm::SEQLVLSCHD_TP1 ||
155155
/*thandle.get_algorithm () == SPTRSVAlgorithm::SEQLVLSCHED_TP2*/
@@ -575,7 +575,7 @@ void upper_tri_symbolic(ExecutionSpace& space, TriSolveHandle& thandle, const Ro
575575
Kokkos::Timer timer;
576576
#endif
577577

578-
using namespace KokkosSparse::Experimental;
578+
using KokkosSparse::SPTRSVAlgorithm;
579579
if (thandle.get_algorithm() == SPTRSVAlgorithm::SEQLVLSCHD_RP ||
580580
thandle.get_algorithm() == SPTRSVAlgorithm::SEQLVLSCHD_TP1 ||
581581
/*thandle.get_algorithm () == SPTRSVAlgorithm::SEQLVLSCHED_TP2*/

sparse/impl/KokkosSparse_twostage_gauss_seidel_impl.hpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,6 @@ class TwostageGaussSeidel {
684684

685685
if (!(gsHandle->isTwoStage())) {
686686
// create SpTRSV handles for classical GS
687-
using namespace KokkosSparse::Experimental;
688687
auto sptrsv_algo = handle->get_gs_sptrsvL_handle()->get_sptrsv_handle()->get_algorithm();
689688
if (sptrsv_algo != SPTRSVAlgorithm::SPTRSV_CUSPARSE) { // symbolic with CuSparse needs
690689
// values
@@ -753,7 +752,7 @@ class TwostageGaussSeidel {
753752
if (!(gsHandle->isTwoStage())) {
754753
using namespace KokkosSparse::Experimental;
755754
auto sptrsv_algo = handle->get_gs_sptrsvL_handle()->get_sptrsv_handle()->get_algorithm();
756-
if (sptrsv_algo == SPTRSVAlgorithm::SPTRSV_CUSPARSE) { // symbolic with CuSparse needs
755+
if (sptrsv_algo == KokkosSparse::SPTRSVAlgorithm::SPTRSV_CUSPARSE) { // symbolic with CuSparse needs
757756
// values
758757
// CuSparse needs matrix sorted by column indexes for each row
759758
// TODO: may need to move this to symbolic/numeric of sptrsv

sparse/src/KokkosKernels_Handle.hpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,6 @@ class KokkosKernelsHandle {
657657
auto gs2 = get_twostage_gs_handle();
658658
gs2->setTwoStage(two_stage);
659659
if (!two_stage) {
660-
using namespace KokkosSparse::Experimental;
661660
#if defined(KOKKOSKERNELS_ENABLE_TPL_CUSPARSE)
662661
// NOTE: we call CuSPARSE on GPU, if possible
663662
if (std::is_same<size_type, int>::value && std::is_same<nnz_lno_t, int>::value &&
@@ -721,13 +720,13 @@ class KokkosKernelsHandle {
721720
// Handles for Classical GS (inner SpTRSV)
722721
TwoStageGaussSeidelSPTRSVHandleType *get_gs_sptrsvL_handle() { return this->gs_sptrsvLHandle; }
723722
TwoStageGaussSeidelSPTRSVHandleType *get_gs_sptrsvU_handle() { return this->gs_sptrsvUHandle; }
724-
void create_gs_sptrsvL_handle(KokkosSparse::Experimental::SPTRSVAlgorithm algm, size_type nrows) {
723+
void create_gs_sptrsvL_handle(KokkosSparse::SPTRSVAlgorithm algm, size_type nrows) {
725724
this->destroy_gs_sptrsvL_handle();
726725
this->is_owner_of_the_gs_sptrsvL_handle = true;
727726
this->gs_sptrsvLHandle = new TwoStageGaussSeidelSPTRSVHandleType();
728727
this->gs_sptrsvLHandle->create_sptrsv_handle(algm, nrows, true);
729728
}
730-
void create_gs_sptrsvU_handle(KokkosSparse::Experimental::SPTRSVAlgorithm algm, size_type nrows) {
729+
void create_gs_sptrsvU_handle(KokkosSparse::SPTRSVAlgorithm algm, size_type nrows) {
731730
this->destroy_gs_sptrsvU_handle();
732731
this->is_owner_of_the_gs_sptrsvU_handle = true;
733732
this->gs_sptrsvUHandle = new TwoStageGaussSeidelSPTRSVHandleType();
@@ -762,7 +761,7 @@ class KokkosKernelsHandle {
762761

763762
SPTRSVHandleType *get_sptrsv_handle() { return this->sptrsvHandle; }
764763

765-
void create_sptrsv_handle(KokkosSparse::Experimental::SPTRSVAlgorithm algm, size_type nrows, bool lower_tri,
764+
void create_sptrsv_handle(KokkosSparse::SPTRSVAlgorithm algm, size_type nrows, bool lower_tri,
766765
size_type block_size = 0) {
767766
this->destroy_sptrsv_handle();
768767
this->is_owner_of_the_sptrsv_handle = true;
@@ -773,7 +772,7 @@ class KokkosKernelsHandle {
773772

774773
#ifdef KOKKOSKERNELS_ENABLE_SUPERNODAL_SPTRSV
775774
// default SpMV option
776-
using namespace KokkosSparse::Experimental;
775+
using KokkosSparse::SPTRSVAlgorithm;
777776
if (algm == SPTRSVAlgorithm::SUPERNODAL_SPMV || algm == SPTRSVAlgorithm::SUPERNODAL_SPMV_DAG) {
778777
this->set_sptrsv_column_major(true);
779778
}
@@ -800,7 +799,7 @@ class KokkosKernelsHandle {
800799

801800
void set_sptrsv_invert_diagonal(bool flag) {
802801
auto algo = this->sptrsvHandle->get_algorithm();
803-
using namespace KokkosSparse::Experimental;
802+
using KokkosSparse::SPTRSVAlgorithm;
804803
if (!flag && (algo == SPTRSVAlgorithm::SUPERNODAL_SPMV || algo == SPTRSVAlgorithm::SUPERNODAL_SPMV_DAG)) {
805804
std::cout << std::endl
806805
<< " ** Supernodal SpTRSV with SpMV require diagonal inversion **" << std::endl

sparse/src/KokkosSparse_sptrsv.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void sptrsv_symbolic(ExecutionSpace &space, KernelHandle *handle, lno_row_view_t
176176
Kokkos::Timer timer_sptrsv;
177177
#endif
178178
auto sptrsv_handle = handle->get_sptrsv_handle();
179-
if (sptrsv_handle->get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SPTRSV_CUSPARSE) {
179+
if (sptrsv_handle->get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SPTRSV_CUSPARSE) {
180180
#ifdef KOKKOSKERNELS_ENABLE_TPL_CUSPARSE
181181
if constexpr (std::is_same_v<ExecutionSpace, Kokkos::Cuda>) {
182182
using RowMap_Internal =
@@ -351,7 +351,7 @@ void sptrsv_solve(ExecutionSpace &space, KernelHandle *handle, lno_row_view_t_ r
351351
XType_Internal x_i = x;
352352

353353
auto sptrsv_handle = handle->get_sptrsv_handle();
354-
if (sptrsv_handle->get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SPTRSV_CUSPARSE) {
354+
if (sptrsv_handle->get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SPTRSV_CUSPARSE) {
355355
#ifdef KOKKOSKERNELS_ENABLE_TPL_CUSPARSE
356356
if constexpr (std::is_same_v<ExecutionSpace, Kokkos::Cuda>) {
357357
typedef typename KernelHandle::SPTRSVHandleType sptrsvHandleType;
@@ -673,7 +673,7 @@ void sptrsv_solve_streams(const std::vector<ExecutionSpace> &execspace_v, const
673673
}
674674

675675
if (handle_v[0]->get_sptrsv_handle()->get_algorithm() ==
676-
KokkosSparse::Experimental::SPTRSVAlgorithm::SPTRSV_CUSPARSE) {
676+
KokkosSparse::SPTRSVAlgorithm::SPTRSV_CUSPARSE) {
677677
#ifdef KOKKOSKERNELS_ENABLE_TPL_CUSPARSE
678678
// NOTE: assume all streams use the same SPTRSV_CUSPARSE algo.
679679
KokkosSparse::Impl::sptrsvcuSPARSE_solve_streams<ExecutionSpace, const_handle_type, RowMap_Internal,

sparse/src/KokkosSparse_sptrsv_handle.hpp

+28-24
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
#endif
3636

3737
namespace KokkosSparse {
38-
namespace Experimental {
39-
4038
// TODO TP2 algorithm had issues with some offset-ordinal combo to be addressed
4139
// when compiled in Trilinos...
4240
enum class SPTRSVAlgorithm {
@@ -51,6 +49,12 @@ enum class SPTRSVAlgorithm {
5149
SUPERNODAL_SPMV_DAG
5250
};
5351

52+
namespace Experimental {
53+
54+
using SPTRSVAlgorithm
55+
[[deprecated("KokkosSparse::Experimental::SPTRSVAlgorithm has been moved to KokkosSparse::SPTRSVAlgorithm. Use KokkosSparse::SPTRSVAlgorithm instead.")]]
56+
= KokkosSparse::SPTRSVAlgorithm;
57+
5458
template <class size_type_, class lno_t_, class scalar_t_, class ExecutionSpace, class TemporaryMemorySpace,
5559
class PersistentMemorySpace>
5660
class SPTRSVHandle {
@@ -268,7 +272,7 @@ class SPTRSVHandle {
268272

269273
bool lower_tri;
270274

271-
SPTRSVAlgorithm algm;
275+
KokkosSparse::SPTRSVAlgorithm algm;
272276

273277
// Symbolic: Level scheduling data
274278
signed_nnz_lno_view_t level_list;
@@ -300,14 +304,14 @@ class SPTRSVHandle {
300304
bool require_symbolic_chain_phase;
301305

302306
void set_if_algm_require_symb_lvlsched() {
303-
if (algm == SPTRSVAlgorithm::SEQLVLSCHD_RP ||
304-
algm == SPTRSVAlgorithm::SEQLVLSCHD_TP1
307+
if (algm == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_RP ||
308+
algm == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1
305309
/*|| algm == SPTRSVAlgorithm::SEQLVLSCHED_TP2*/
306-
|| algm == SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN
310+
|| algm == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN
307311
#ifdef KOKKOSKERNELS_ENABLE_SUPERNODAL_SPTRSV
308-
|| algm == SPTRSVAlgorithm::SUPERNODAL_NAIVE || algm == SPTRSVAlgorithm::SUPERNODAL_ETREE ||
309-
algm == SPTRSVAlgorithm::SUPERNODAL_DAG || algm == SPTRSVAlgorithm::SUPERNODAL_SPMV ||
310-
algm == SPTRSVAlgorithm::SUPERNODAL_SPMV_DAG
312+
|| algm == KokkosSparse::SPTRSVAlgorithm::SUPERNODAL_NAIVE || algm == KokkosSparse::SPTRSVAlgorithm::SUPERNODAL_ETREE ||
313+
algm == KokkosSparse::SPTRSVAlgorithm::SUPERNODAL_DAG || algm == KokkosSparse::SPTRSVAlgorithm::SUPERNODAL_SPMV ||
314+
algm == KokkosSparse::SPTRSVAlgorithm::SUPERNODAL_SPMV_DAG
311315
#endif
312316
) {
313317
require_symbolic_lvlsched_phase = true;
@@ -317,7 +321,7 @@ class SPTRSVHandle {
317321
}
318322

319323
void set_if_algm_require_symb_chain() {
320-
if (algm == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN) {
324+
if (algm == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN) {
321325
require_symbolic_chain_phase = true;
322326
} else {
323327
require_symbolic_chain_phase = false;
@@ -400,7 +404,7 @@ class SPTRSVHandle {
400404
#endif
401405

402406
public:
403-
SPTRSVHandle(SPTRSVAlgorithm choice, const size_type nrows_, bool lower_tri_, const size_type block_size_ = 0,
407+
SPTRSVHandle(KokkosSparse::SPTRSVAlgorithm choice, const size_type nrows_, bool lower_tri_, const size_type block_size_ = 0,
404408
bool symbolic_complete_ = false, bool numeric_complete_ = false)
405409
:
406410
#ifdef KOKKOSKERNELS_SPTRSV_CUDAGRAPHSUPPORT
@@ -457,7 +461,7 @@ class SPTRSVHandle {
457461

458462
// Check a few prerequisites before allowing users
459463
// to run with the cusparse implementation of sptrsv.
460-
if (algm == SPTRSVAlgorithm::SPTRSV_CUSPARSE) {
464+
if (algm == KokkosSparse::SPTRSVAlgorithm::SPTRSV_CUSPARSE) {
461465
#if !defined(KOKKOSKERNELS_ENABLE_TPL_CUSPARSE)
462466
throw(
463467
std::runtime_error("sptrsv handle: SPTRSV_CUSPARSE requested but "
@@ -472,7 +476,7 @@ class SPTRSVHandle {
472476
}
473477

474478
#if defined(__clang__) && defined(KOKKOS_ENABLE_CUDA)
475-
if (algm == SPTRSVAlgorithm::SEQLVLSCHD_TP1 && Kokkos::ArithTraits<scalar_t>::isComplex &&
479+
if (algm == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1 && Kokkos::ArithTraits<scalar_t>::isComplex &&
476480
std::is_same_v<execution_space, Kokkos::Cuda> && block_size_ != 0) {
477481
throw(std::runtime_error(
478482
"sptrsv handle: SPTRSV may not work with blocks+clang+cuda+complex due to a compiler bug"));
@@ -845,14 +849,14 @@ class SPTRSVHandle {
845849

846850
// Can change the algorithm to a "Compatible algorithms" - for ease in some
847851
// testing cases
848-
void set_algorithm(SPTRSVAlgorithm choice) {
852+
void set_algorithm(KokkosSparse::SPTRSVAlgorithm choice) {
849853
if (algm != choice) {
850854
algm = choice;
851855
}
852856
}
853857

854858
KOKKOS_INLINE_FUNCTION
855-
SPTRSVAlgorithm get_algorithm() { return algm; }
859+
KokkosSparse::SPTRSVAlgorithm get_algorithm() { return algm; }
856860

857861
KOKKOS_INLINE_FUNCTION
858862
signed_nnz_lno_view_t get_level_list() const { return level_list; }
@@ -965,15 +969,15 @@ class SPTRSVHandle {
965969
std::string ret_string;
966970

967971
switch (algm) {
968-
case SPTRSVAlgorithm::SEQLVLSCHD_RP: ret_string = "SEQLVLSCHD_RP"; break;
969-
case SPTRSVAlgorithm::SEQLVLSCHD_TP1: ret_string = "SEQLVLSCHD_TP1"; break;
970-
case SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN: ret_string = "SEQLVLSCHD_TP1CHAIN"; break;
971-
case SPTRSVAlgorithm::SPTRSV_CUSPARSE: ret_string = "SPTRSV_CUSPARSE"; break;
972-
case SPTRSVAlgorithm::SUPERNODAL_NAIVE: ret_string = "SUPERNODAL_NAIVE"; break;
973-
case SPTRSVAlgorithm::SUPERNODAL_ETREE: ret_string = "SUPERNODAL_ETREE"; break;
974-
case SPTRSVAlgorithm::SUPERNODAL_DAG: ret_string = "SUPERNODAL_DAG"; break;
975-
case SPTRSVAlgorithm::SUPERNODAL_SPMV: ret_string = "SUPERNODAL_SPMV"; break;
976-
case SPTRSVAlgorithm::SUPERNODAL_SPMV_DAG: ret_string = "SUPERNODAL_SPMV_DAG"; break;
972+
case KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_RP: ret_string = "SEQLVLSCHD_RP"; break;
973+
case KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1: ret_string = "SEQLVLSCHD_TP1"; break;
974+
case KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN: ret_string = "SEQLVLSCHD_TP1CHAIN"; break;
975+
case KokkosSparse::SPTRSVAlgorithm::SPTRSV_CUSPARSE: ret_string = "SPTRSV_CUSPARSE"; break;
976+
case KokkosSparse::SPTRSVAlgorithm::SUPERNODAL_NAIVE: ret_string = "SUPERNODAL_NAIVE"; break;
977+
case KokkosSparse::SPTRSVAlgorithm::SUPERNODAL_ETREE: ret_string = "SUPERNODAL_ETREE"; break;
978+
case KokkosSparse::SPTRSVAlgorithm::SUPERNODAL_DAG: ret_string = "SUPERNODAL_DAG"; break;
979+
case KokkosSparse::SPTRSVAlgorithm::SUPERNODAL_SPMV: ret_string = "SUPERNODAL_SPMV"; break;
980+
case KokkosSparse::SPTRSVAlgorithm::SUPERNODAL_SPMV_DAG: ret_string = "SUPERNODAL_SPMV_DAG"; break;
977981
default: KK_REQUIRE_MSG(false, "Unhandled sptrsv algorithm: " << static_cast<int>(algm));
978982
}
979983

0 commit comments

Comments
 (0)