Skip to content

Commit b261e66

Browse files
authored
[Docs] batched serial tbsv (#2796)
* fix syr routine name Signed-off-by: yasahi-hpc <y.asahi6412@gmail.com> * Add batched serial tbsv docs Signed-off-by: yasahi-hpc <y.asahi6412@gmail.com> --------- Signed-off-by: yasahi-hpc <y.asahi6412@gmail.com>
1 parent b54f6e2 commit b261e66

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

docs/source/API/batched/dense-index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ API: Batched Dense (DLA)
55
:maxdepth: 2
66
:hidden:
77

8+
dense/batched_tbsv
89
dense/batched_ger
910
dense/batched_syr
1011
dense/batched_getrf
@@ -196,7 +197,7 @@ BLAS 2
196197
- `TeamTrsv`
197198
- `TeamVectorTrsv`
198199
* - TBSV
199-
- `SerialTbsv`
200+
- :doc:`SerialTbsv <dense/batched_tbsv>`
200201
- --
201202
- --
202203
* - TPSV

docs/source/API/batched/dense/batched_syr.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Perform a symmetric rank-1 update of matrix :math:`A` by vector :math:`x` with s
2020
A &= A + \alpha (x * x^H) \: \text{(if ArgTrans == KokkosBatched::Trans::ConjTranspose)}
2121
\end{align}
2222
23-
1. If ``ArgTrans == KokkosBatched::Trans::Transpose``, this operation is equivalent to the BLAS routine ``SSYR`` (``CSYR``) or ``DGER`` (``ZSYR``) for single or double precision for real (complex) matrix.
23+
1. If ``ArgTrans == KokkosBatched::Trans::Transpose``, this operation is equivalent to the BLAS routine ``SSYR`` (``CSYR``) or ``DSYR`` (``ZSYR``) for single or double precision for real (complex) matrix.
2424

2525
2. If ``ArgTrans == KokkosBatched::Trans::ConjTranspose``, this operation is equivalent to the BLAS routine ``CHER`` or ``ZHER`` for single or double precision for complex matrix.
2626

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
KokkosBatched::Tbsv
2+
###################
3+
4+
Defined in header: :code:`KokkosBatched_Tbsv.hpp`
5+
6+
.. code:: c++
7+
8+
template <typename ArgUplo, typename ArgTrans, typename ArgDiag, typename ArgAlgo>
9+
struct SerialTbsv {
10+
template <typename AViewType, typename XViewType>
11+
KOKKOS_INLINE_FUNCTION static int invoke(const AViewType &A, const XViewType &X, const int k);
12+
};
13+
14+
15+
Solves a system of the linear equations :math:`A \cdot X = B` or :math:`A^T \cdot X = B` or :math:`A^H \cdot X = B` where :math:`A` is an n-by-n unit or non-unit, upper or lower triangular band matrix with :math:`(k + 1)` diagonals.
16+
17+
1. For a real band matrix :math:`A`, this solves a system of the linear equations :math:`A \cdot X = B` or :math:`A^T \cdot X = B`.
18+
This operation is equivalent to the BLAS routine ``STBSV`` or ``DTBSV`` for single or double precision.
19+
20+
2. For a complex band matrix :math:`A`, this solves a system of the linear equations :math:`A \cdot X = B` or :math:`A^T \cdot X = B` or :math:`A^H \cdot X = B`.
21+
This operation is equivalent to the BLAS routine ``CTBSV`` or ``ZTBSV`` for single or double precision.
22+
23+
.. note::
24+
25+
No test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine.
26+
27+
Parameters
28+
==========
29+
30+
:A: Input view containing the upper or lower triangular band matrix. See `LAPACK reference <https://www.netlib.org/lapack/lug/node124.html>`_ for the band storage format.
31+
:X: Input/output view containing the right-hand side on input and the solution on output.
32+
:k: The number of superdiagonals or subdiagonals within the band of :math:`A`. :math:`k >= 0`
33+
34+
35+
Type Requirements
36+
-----------------
37+
38+
- ``ArgUplo`` must be one of the following:
39+
- ``KokkosBatched::Uplo::Upper`` for upper triangular solve
40+
- ``KokkosBatched::Uplo::Lower`` for lower triangular solve
41+
42+
- ``ArgTrans`` must be one of the following:
43+
- ``KokkosBatched::Trans::NoTranspose`` to solve a system :math:`A \cdot X = B`
44+
- ``KokkosBatched::Trans::Transpose`` to solve a system :math:`A^T \cdot X = B`
45+
- ``KokkosBatched::Trans::ConjTranspose`` to solve a system :math:`A^H \cdot X = B`
46+
47+
- ``ArgDiag`` must be one of the following:
48+
- ``KokkosBatched::Diag::Unit`` for the unit triangular matrix :math:`A`
49+
- ``KokkosBatched::Diag::NonUnit`` for the non-unit triangular matrix :math:`A`
50+
51+
- ``ArgAlgo`` must be ``KokkosBatched::Algo::tbsv::Unblocked`` for the unblocked algorithm
52+
- ``AViewType`` must be a Kokkos `View <https://kokkos.org/kokkos-core-wiki/API/core/view/view.html>`_ of rank 2 containing the band matrix A
53+
- ``XViewType`` must be a Kokkos `View <https://kokkos.org/kokkos-core-wiki/API/core/view/view.html>`_ of rank 1 containing the right-hand side that satisfies
54+
- ``std::is_same_v<typename XViewType::value_type, typename XViewType::non_const_value_type> == true``
55+
56+
Example
57+
=======
58+
59+
.. literalinclude:: ../../../../../example/batched_solve/serial_tbsv.cpp
60+
:language: c++
61+
62+
output:
63+
64+
.. code::
65+
66+
tbsv works correctly!

0 commit comments

Comments
 (0)