Skip to content

Commit 1d0c1e2

Browse files
author
Yuuichi Asahi
committed
Add docstring and assertion for ArgAlgo parameter in gbtrf
Signed-off-by: Yuuichi Asahi <y.asahi@nr.titech.ac.jp>
1 parent f062507 commit 1d0c1e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

batched/dense/src/KokkosBatched_Gbtrf.hpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,24 @@ namespace KokkosBatched {
2525
/// \brief Serial Batched Gbtrf:
2626
/// Compute a LU factorization of a m-by-n band matrix A using partial
2727
/// pivoting with row interchanges.
28+
/// \tparam ArgAlgo: Type indicating the blocked (KokkosBatched::Algo::Gbtrf::Blocked) or unblocked
29+
/// (KokkosBatched::Algo::Gbtrf::Unblocked) algorithm to be used
30+
///
2831
/// \tparam ABViewType: Input type for the matrix, needs to be a 2D view
2932
/// \tparam PivViewType: Input type for the pivot indices, needs to be a 1D view
3033
///
3134
/// \param Ab [inout]: A is a ldab by n band matrix, a rank 2 view
3235
/// \param piv [out]: On exit, the pivot indices, a rank 1 view
3336
/// \param kl [in]: The number of subdiagonals within the band of A. kl >= 0
3437
/// \param ku [in]: The number of superdiagonals within the band of A. ku >= 0
35-
/// \param m [in]: The number of rows of the matrix A. (optional)
38+
/// \param m [in]: The number of rows of the matrix A. (optional, default is -1, corresponding to m == n)
3639
///
3740
/// No nested parallel_for is used inside of the function.
3841
///
3942

4043
template <typename ArgAlgo>
4144
struct SerialGbtrf {
45+
static_assert(std::is_same_v<ArgAlgo, Algo::Gbtrf::Unblocked>, "KokkosBatched::gbtrf: Use Algo::Gbtrf::Unblocked");
4246
template <typename ABViewType, typename PivViewType>
4347
KOKKOS_INLINE_FUNCTION static int invoke(const ABViewType &Ab, const PivViewType &piv, const int kl, const int ku,
4448
const int m = -1);

0 commit comments

Comments
 (0)