Skip to content

Commit 34b7bd0

Browse files
committed
sptrsv: move KokkosSparse::Experimental::SPTRSVAlgorithm to KokkosSparse::SPTRSVAlgorithm
Signed-off-by: Junchao Zhang <[email protected]>
1 parent 64e3a89 commit 34b7bd0

7 files changed

+56
-53
lines changed

sparse/impl/KokkosSparse_sptrsv_solve_impl.hpp

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

12921292
#if defined(KOKKOSKERNELS_ENABLE_SUPERNODAL_SPTRSV)
1293-
using namespace KokkosSparse::Experimental;
1293+
using KokkosSparse::SPTRSVAlgorithm;
12941294
using device_t = Kokkos::Device<execution_space, temp_mem_space>;
12951295
using integer_view_host_t = typename TriSolveHandle::integer_view_host_t;
12961296
using row_map_host_view_t = Kokkos::View<size_type *, Kokkos::HostSpace>;
@@ -1348,14 +1348,14 @@ struct SptrsvWrap {
13481348
#if defined(KOKKOS_ENABLE_CUDA) && defined(KOKKOSPSTRSV_SOLVE_IMPL_PROFILE)
13491349
cudaProfilerStart();
13501350
#endif
1351-
if (thandle.get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_RP) {
1351+
if (thandle.get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_RP) {
13521352
LowerRPFunc lrpp(row_map, entries, values, lhs, rhs, nodes_grouped_by_level, block_size);
13531353

13541354
Kokkos::parallel_for("parfor_fixed_lvl",
13551355
Kokkos::Experimental::require(range_policy(space, node_count, node_count + lvl_nodes),
13561356
Kokkos::Experimental::WorkItemProperty::HintLightWeight),
13571357
lrpp);
1358-
} else if (thandle.get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_TP1) {
1358+
} else if (thandle.get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1) {
13591359
LowerTPFunc ltpp(row_map, entries, values, lhs, rhs, nodes_grouped_by_level, node_count, block_size);
13601360
int team_size = thandle.get_team_size();
13611361
auto tp =
@@ -1551,7 +1551,7 @@ struct SptrsvWrap {
15511551
cudaProfilerStop();
15521552
#endif
15531553
} // end if
1554-
} // end for lvl
1554+
} // end for lvl
15551555

15561556
#ifdef profile_supernodal_etree
15571557
Kokkos::fence();
@@ -1586,7 +1586,7 @@ struct SptrsvWrap {
15861586
using UpperTPFunc = FunctorTypeMacro(TriLvlSchedTP1SolverFunctor, false, BlockEnabled);
15871587

15881588
#if defined(KOKKOSKERNELS_ENABLE_SUPERNODAL_SPTRSV)
1589-
using namespace KokkosSparse::Experimental;
1589+
using KokkosSparse::SPTRSVAlgorithm;
15901590
using integer_view_host_t = typename TriSolveHandle::integer_view_host_t;
15911591
using row_map_host_view_t = Kokkos::View<size_type *, Kokkos::HostSpace>;
15921592

@@ -1644,13 +1644,13 @@ struct SptrsvWrap {
16441644
cudaProfilerStart();
16451645
#endif
16461646

1647-
if (thandle.get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_RP) {
1647+
if (thandle.get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_RP) {
16481648
UpperRPFunc urpp(row_map, entries, values, lhs, rhs, nodes_grouped_by_level, block_size);
16491649
Kokkos::parallel_for("parfor_fixed_lvl",
16501650
Kokkos::Experimental::require(range_policy(space, node_count, node_count + lvl_nodes),
16511651
Kokkos::Experimental::WorkItemProperty::HintLightWeight),
16521652
urpp);
1653-
} else if (thandle.get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_TP1) {
1653+
} else if (thandle.get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1) {
16541654
UpperTPFunc utpp(row_map, entries, values, lhs, rhs, nodes_grouped_by_level, node_count, block_size);
16551655
int team_size = thandle.get_team_size();
16561656
auto tp =
@@ -1955,7 +1955,7 @@ struct SptrsvWrap {
19551955
cudaProfilerStop();
19561956
#endif
19571957
} // end if
1958-
} // end for lvl
1958+
} // end for lvl
19591959
#ifdef profile_supernodal_etree
19601960
Kokkos::fence();
19611961
double sptrsv_time_seconds = sptrsv_timer.seconds();
@@ -2116,12 +2116,12 @@ struct SptrsvWrap {
21162116
const auto block_enabled = thandle_v[i]->is_block_enabled();
21172117
KK_REQUIRE(block_enabled == BlockEnabled);
21182118
if (lvl_nodes != 0) {
2119-
if (thandle_v[i]->get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_RP) {
2119+
if (thandle_v[i]->get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_RP) {
21202120
Kokkos::parallel_for("parfor_fixed_lvl",
21212121
range_policy(execspace_v[i], node_count_v[i], node_count_v[i] + lvl_nodes),
21222122
RPFunctor(row_map_v[i], entries_v[i], values_v[i], lhs_v[i], rhs_v[i],
21232123
nodes_grouped_by_level_v[i], block_size));
2124-
} else if (thandle_v[i]->get_algorithm() == KokkosSparse::Experimental::SPTRSVAlgorithm::SEQLVLSCHD_TP1) {
2124+
} else if (thandle_v[i]->get_algorithm() == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1) {
21252125
int team_size = thandle_v[i]->get_team_size();
21262126
auto tp = team_size == -1 ? team_policy(execspace_v[i], lvl_nodes, Kokkos::AUTO)
21272127
: team_policy(execspace_v[i], lvl_nodes, team_size);
@@ -2137,10 +2137,10 @@ struct SptrsvWrap {
21372137
}
21382138
node_count_v[i] += lvl_nodes;
21392139
} // 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
2140+
} // end if (lvl < nlevels_v[i])
2141+
} // end for streams
2142+
} // end for lvl
2143+
} // end tri_solve_streams
21442144

21452145
}; // struct SptrsvWrap
21462146

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ class KokkosKernelsHandle {
657657
auto gs2 = get_twostage_gs_handle();
658658
gs2->setTwoStage(two_stage);
659659
if (!two_stage) {
660-
using namespace KokkosSparse::Experimental;
660+
using KokkosSparse::SPTRSVAlgorithm;
661661
#if defined(KOKKOSKERNELS_ENABLE_TPL_CUSPARSE)
662662
// NOTE: we call CuSPARSE on GPU, if possible
663663
if (std::is_same<size_type, int>::value && std::is_same<nnz_lno_t, int>::value &&
@@ -721,13 +721,13 @@ class KokkosKernelsHandle {
721721
// Handles for Classical GS (inner SpTRSV)
722722
TwoStageGaussSeidelSPTRSVHandleType *get_gs_sptrsvL_handle() { return this->gs_sptrsvLHandle; }
723723
TwoStageGaussSeidelSPTRSVHandleType *get_gs_sptrsvU_handle() { return this->gs_sptrsvUHandle; }
724-
void create_gs_sptrsvL_handle(KokkosSparse::Experimental::SPTRSVAlgorithm algm, size_type nrows) {
724+
void create_gs_sptrsvL_handle(KokkosSparse::SPTRSVAlgorithm algm, size_type nrows) {
725725
this->destroy_gs_sptrsvL_handle();
726726
this->is_owner_of_the_gs_sptrsvL_handle = true;
727727
this->gs_sptrsvLHandle = new TwoStageGaussSeidelSPTRSVHandleType();
728728
this->gs_sptrsvLHandle->create_sptrsv_handle(algm, nrows, true);
729729
}
730-
void create_gs_sptrsvU_handle(KokkosSparse::Experimental::SPTRSVAlgorithm algm, size_type nrows) {
730+
void create_gs_sptrsvU_handle(KokkosSparse::SPTRSVAlgorithm algm, size_type nrows) {
731731
this->destroy_gs_sptrsvU_handle();
732732
this->is_owner_of_the_gs_sptrsvU_handle = true;
733733
this->gs_sptrsvUHandle = new TwoStageGaussSeidelSPTRSVHandleType();
@@ -762,7 +762,7 @@ class KokkosKernelsHandle {
762762

763763
SPTRSVHandleType *get_sptrsv_handle() { return this->sptrsvHandle; }
764764

765-
void create_sptrsv_handle(KokkosSparse::Experimental::SPTRSVAlgorithm algm, size_type nrows, bool lower_tri,
765+
void create_sptrsv_handle(KokkosSparse::SPTRSVAlgorithm algm, size_type nrows, bool lower_tri,
766766
size_type block_size = 0) {
767767
this->destroy_sptrsv_handle();
768768
this->is_owner_of_the_sptrsv_handle = true;
@@ -773,7 +773,7 @@ class KokkosKernelsHandle {
773773

774774
#ifdef KOKKOSKERNELS_ENABLE_SUPERNODAL_SPTRSV
775775
// default SpMV option
776-
using namespace KokkosSparse::Experimental;
776+
using KokkosSparse::SPTRSVAlgorithm;
777777
if (algm == SPTRSVAlgorithm::SUPERNODAL_SPMV || algm == SPTRSVAlgorithm::SUPERNODAL_SPMV_DAG) {
778778
this->set_sptrsv_column_major(true);
779779
}
@@ -800,7 +800,7 @@ class KokkosKernelsHandle {
800800

801801
void set_sptrsv_invert_diagonal(bool flag) {
802802
auto algo = this->sptrsvHandle->get_algorithm();
803-
using namespace KokkosSparse::Experimental;
803+
using KokkosSparse::SPTRSVAlgorithm;
804804
if (!flag && (algo == SPTRSVAlgorithm::SUPERNODAL_SPMV || algo == SPTRSVAlgorithm::SUPERNODAL_SPMV_DAG)) {
805805
std::cout << std::endl
806806
<< " ** 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)