35
35
#endif
36
36
37
37
namespace KokkosSparse {
38
- namespace Experimental {
39
-
40
38
// TODO TP2 algorithm had issues with some offset-ordinal combo to be addressed
41
39
// when compiled in Trilinos...
42
40
enum class SPTRSVAlgorithm {
@@ -51,6 +49,12 @@ enum class SPTRSVAlgorithm {
51
49
SUPERNODAL_SPMV_DAG
52
50
};
53
51
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
+
54
58
template <class size_type_ , class lno_t_ , class scalar_t_ , class ExecutionSpace , class TemporaryMemorySpace ,
55
59
class PersistentMemorySpace >
56
60
class SPTRSVHandle {
@@ -268,7 +272,7 @@ class SPTRSVHandle {
268
272
269
273
bool lower_tri;
270
274
271
- SPTRSVAlgorithm algm;
275
+ KokkosSparse:: SPTRSVAlgorithm algm;
272
276
273
277
// Symbolic: Level scheduling data
274
278
signed_nnz_lno_view_t level_list;
@@ -300,14 +304,14 @@ class SPTRSVHandle {
300
304
bool require_symbolic_chain_phase;
301
305
302
306
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
305
309
/* || algm == SPTRSVAlgorithm::SEQLVLSCHED_TP2*/
306
- || algm == SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN
310
+ || algm == KokkosSparse:: SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN
307
311
#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
311
315
#endif
312
316
) {
313
317
require_symbolic_lvlsched_phase = true ;
@@ -317,7 +321,7 @@ class SPTRSVHandle {
317
321
}
318
322
319
323
void set_if_algm_require_symb_chain () {
320
- if (algm == KokkosSparse::Experimental:: SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN) {
324
+ if (algm == KokkosSparse::SPTRSVAlgorithm::SEQLVLSCHD_TP1CHAIN) {
321
325
require_symbolic_chain_phase = true ;
322
326
} else {
323
327
require_symbolic_chain_phase = false ;
@@ -400,7 +404,7 @@ class SPTRSVHandle {
400
404
#endif
401
405
402
406
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 ,
404
408
bool symbolic_complete_ = false , bool numeric_complete_ = false )
405
409
:
406
410
#ifdef KOKKOSKERNELS_SPTRSV_CUDAGRAPHSUPPORT
@@ -457,7 +461,7 @@ class SPTRSVHandle {
457
461
458
462
// Check a few prerequisites before allowing users
459
463
// to run with the cusparse implementation of sptrsv.
460
- if (algm == SPTRSVAlgorithm::SPTRSV_CUSPARSE) {
464
+ if (algm == KokkosSparse:: SPTRSVAlgorithm::SPTRSV_CUSPARSE) {
461
465
#if !defined(KOKKOSKERNELS_ENABLE_TPL_CUSPARSE)
462
466
throw (
463
467
std::runtime_error (" sptrsv handle: SPTRSV_CUSPARSE requested but "
@@ -472,7 +476,7 @@ class SPTRSVHandle {
472
476
}
473
477
474
478
#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 &&
476
480
std::is_same_v<execution_space, Kokkos::Cuda> && block_size_ != 0 ) {
477
481
throw (std::runtime_error (
478
482
" sptrsv handle: SPTRSV may not work with blocks+clang+cuda+complex due to a compiler bug" ));
@@ -845,14 +849,14 @@ class SPTRSVHandle {
845
849
846
850
// Can change the algorithm to a "Compatible algorithms" - for ease in some
847
851
// testing cases
848
- void set_algorithm (SPTRSVAlgorithm choice) {
852
+ void set_algorithm (KokkosSparse:: SPTRSVAlgorithm choice) {
849
853
if (algm != choice) {
850
854
algm = choice;
851
855
}
852
856
}
853
857
854
858
KOKKOS_INLINE_FUNCTION
855
- SPTRSVAlgorithm get_algorithm () { return algm; }
859
+ KokkosSparse:: SPTRSVAlgorithm get_algorithm () { return algm; }
856
860
857
861
KOKKOS_INLINE_FUNCTION
858
862
signed_nnz_lno_view_t get_level_list () const { return level_list; }
@@ -965,15 +969,15 @@ class SPTRSVHandle {
965
969
std::string ret_string;
966
970
967
971
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 ;
977
981
default : KK_REQUIRE_MSG (false , " Unhandled sptrsv algorithm: " << static_cast <int >(algm));
978
982
}
979
983
0 commit comments