3535#endif
3636
3737namespace KokkosSparse {
38- namespace Experimental {
39-
4038// TODO TP2 algorithm had issues with some offset-ordinal combo to be addressed
4139// when compiled in Trilinos...
4240enum 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+
5458template <class size_type_ , class lno_t_ , class scalar_t_ , class ExecutionSpace , class TemporaryMemorySpace ,
5559 class PersistentMemorySpace >
5660class 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