Skip to content

Commit f81d64c

Browse files
committed
Make a character table for BLAS, cleanup
1 parent a832fb2 commit f81d64c

File tree

2 files changed

+109
-86
lines changed

2 files changed

+109
-86
lines changed

base/linalg/blas.jl

Lines changed: 77 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -524,23 +524,24 @@ end
524524
"""
525525
gemv!(tA, alpha, A, x, beta, y)
526526
527-
Update the vector `y` as `alpha*A*x + beta*y` or `alpha*A'x + beta*y` according to `tA`
528-
(transpose `A`). `alpha` and `beta` are scalars. Returns the updated `y`.
527+
Update the vector `y` as `alpha*A*x + beta*y` or `alpha*A'x + beta*y`
528+
according to [`tA`](@ref stdlib-blas-trans).
529+
`alpha` and `beta` are scalars. Returns the updated `y`.
529530
"""
530531
gemv!
531532

532533
"""
533534
gemv(tA, alpha, A, x)
534535
535-
Returns `alpha*A*x` or `alpha*A'x` according to `tA` (transpose `A`).
536+
Returns `alpha*A*x` or `alpha*A'x` according to [`tA`](@ref stdlib-blas-trans).
536537
`alpha` is a scalar.
537538
"""
538539
gemv(tA, alpha, A, x)
539540

540541
"""
541542
gemv(tA, A, x)
542543
543-
Returns `A*x` or `A'x` according to `tA` (transpose `A`).
544+
Returns `A*x` or `A'x` according to [`tA`](@ref stdlib-blas-trans).
544545
"""
545546
gemv(tA, A, x)
546547

@@ -549,16 +550,16 @@ gemv(tA, A, x)
549550
"""
550551
gbmv!(trans, m, kl, ku, alpha, A, x, beta, y)
551552
552-
Update vector `y` as `alpha*A*x + beta*y` or `alpha*A'*x + beta*y` according to `trans` (`'N'` (meaning not transposed)
553-
or `'T'` (meaning transposed)). The matrix `A` is a general band matrix of dimension `m` by `size(A,2)` with `kl`
553+
Update vector `y` as `alpha*A*x + beta*y` or `alpha*A'*x + beta*y` according to [`trans`](@ref stdlib-blas-trans).
554+
The matrix `A` is a general band matrix of dimension `m` by `size(A,2)` with `kl`
554555
sub-diagonals and `ku` super-diagonals. `alpha` and `beta` are scalars. Returns the updated `y`.
555556
"""
556557
function gbmv! end
557558

558559
"""
559560
gbmv(trans, m, kl, ku, alpha, A, x, beta, y)
560561
561-
Returns `alpha*A*x` or `alpha*A'*x` according to `trans` (`'N'` (meaning not transposed) or `'T'` (meaning transposed)).
562+
Returns `alpha*A*x` or `alpha*A'*x` according to [`trans`](@ref stdlib-blas-trans).
562563
The matrix `A` is a general band matrix of dimension `m` by `size(A,2)` with `kl` sub-diagonals and `ku`
563564
super-diagonals. `alpha` and `beta` are scalars.
564565
"""
@@ -603,8 +604,9 @@ end
603604
"""
604605
symv!(ul, alpha, A, x, beta, y)
605606
606-
Update the vector `y` as `alpha*A*x + beta*y`. `A` is assumed to be symmetric. Only the `ul`
607-
triangle of `A` is used. `alpha` and `beta` are scalars. Returns the updated `y`.
607+
Update the vector `y` as `alpha*A*x + beta*y`. `A` is assumed to be symmetric.
608+
Only the [`ul`](@ref stdlib-blas-uplo) triangle of `A` is used.
609+
`alpha` and `beta` are scalars. Returns the updated `y`.
608610
"""
609611
function symv! end
610612

@@ -654,7 +656,7 @@ end
654656
symv(ul, alpha, A, x)
655657
656658
Returns `alpha*A*x`. `A` is assumed to be symmetric.
657-
Only the `ul` (`'U'` for upper, `'L'` for lower) triangle of `A` is used.
659+
Only the [`ul`](@ref stdlib-blas-uplo) triangle of `A` is used.
658660
`alpha` is a scalar.
659661
"""
660662
symv(ul, alpha, A, x)
@@ -663,7 +665,7 @@ symv(ul, alpha, A, x)
663665
symv(ul, A, x)
664666
665667
Returns `A*x`. `A` is assumed to be symmetric.
666-
Only the `ul` (`'U'` for upper, `'L'` for lower) triangle of `A` is used.
668+
Only the [`ul`](@ref stdlib-blas-uplo) triangle of `A` is used.
667669
"""
668670
symv(ul, A, x)
669671

@@ -739,7 +741,7 @@ end
739741
740742
Returns `alpha*A*x` where `A` is a symmetric band matrix of order `size(A,2)` with `k`
741743
super-diagonals stored in the argument `A`.
742-
Only the `uplo` (`'U'` for upper, `'L'` for lower) triangle of `A` is used.
744+
Only the [`uplo`](@ref stdlib-blas-uplo) triangle of `A` is used.
743745
"""
744746
sbmv(uplo, k, alpha, A, x)
745747

@@ -748,7 +750,7 @@ sbmv(uplo, k, alpha, A, x)
748750
749751
Returns `A*x` where `A` is a symmetric band matrix of order `size(A,2)` with `k`
750752
super-diagonals stored in the argument `A`.
751-
Only the `uplo` (`'U'` for upper, `'L'` for lower) triangle of `A` is used.
753+
Only the [`uplo`](@ref stdlib-blas-uplo) triangle of `A` is used.
752754
"""
753755
sbmv(uplo, k, A, x)
754756

@@ -759,7 +761,7 @@ Update vector `y` as `alpha*A*x + beta*y` where `A` is a a symmetric band matrix
759761
`size(A,2)` with `k` super-diagonals stored in the argument `A`. The storage layout for `A`
760762
is described the reference BLAS module, level-2 BLAS at
761763
<http://www.netlib.org/lapack/explore-html/>.
762-
Only the `uplo` (`'U'` for upper, `'L'` for lower) triangle of `A` is used.
764+
Only the [`uplo`](@ref stdlib-blas-uplo) triangle of `A` is used.
763765
764766
Returns the updated `y`.
765767
"""
@@ -801,26 +803,20 @@ end
801803
"""
802804
trmv(ul, tA, dA, A, b)
803805
804-
Returns `op(A)*b`, where `op` is determined by `tA`
805-
(`'N'` for identity, `'T'` for transpose `A`, and `'C'` for conjugate
806-
transpose `A`). Only the `ul` triangle (`'U'` for upper, `'L'`
807-
for lower) of `A` is used.
808-
The diagonal is assumed to be all ones if `dA` is `'U'`, or the
809-
diagonal values are read from
810-
`A` if `dA` is `'N'`.
806+
Returns `op(A)*b`, where `op` is determined by [`tA`](@ref stdlib-blas-trans).
807+
Only the [`ul`](@ref stdlib-blas-uplo) triangle of `A` is used.
808+
[`dA`](@ref stdlib-blas-diag) determines if the diagonal values are read or
809+
are assumed to be all ones.
811810
"""
812811
function trmv end
813812

814813
"""
815814
trmv!(ul, tA, dA, A, b)
816815
817-
Returns `op(A)*b`, where `op` is determined by `tA`
818-
(`'N'` for identity, `'T'` for transpose `A`, and `'C'` for conjugate
819-
transpose `A`). Only the `ul` triangle (`'U'` for upper, `'L'`
820-
for lower) of `A` is used.
821-
The diagonal is assumed to be all ones if `dA` is `'U'`, or the
822-
diagonal values are read from
823-
`A` if `dA` is `'N'`.
816+
Returns `op(A)*b`, where `op` is determined by [`tA`](@ref stdlib-blas-trans).
817+
Only the [`ul`](@ref stdlib-blas-uplo) triangle of `A` is used.
818+
[`dA`](@ref stdlib-blas-diag) determines if the diagonal values are read or
819+
are assumed to be all ones.
824820
The multiplication occurs in-place on `b`.
825821
"""
826822
function trmv! end
@@ -860,21 +856,20 @@ end
860856
trsv!(ul, tA, dA, A, b)
861857
862858
Overwrite `b` with the solution to `A*x = b` or one of the other two variants determined by
863-
`tA` (transpose `A` if `'T'`, `A` if `'N'`, conjugate-transpose if `'C'`)
864-
and `ul` (triangle of `A` used, `'U'` for upper, `'L`' for lower).
865-
The diagonal is assumed to be all ones if `dA` is `'U'`, or the diagonal values are read from
866-
`A` if `dA` is `'N'`.
859+
[`tA`](@ref stdlib-blas-trans) and [`ul`](@ref stdlib-blas-uplo).
860+
[`dA`](@ref stdlib-blas-diag) determines if the diagonal values are read or
861+
are assumed to be all ones.
867862
Returns the updated `b`.
868863
"""
869864
function trsv! end
870865

871866
"""
872867
trsv(ul, tA, dA, A, b)
873868
874-
Returns the solution to `A*x = b` or one of the other two variants determined by `tA`
875-
(transpose `A`) and `ul` (triangle of `A` is used.) `dA` indicates if `A` is unit-triangular
876-
(the diagonal is assumed to be all ones if `dA` is `'U'`, or the diagonal values are read from
877-
`A` if `dA` is `'N'`).
869+
Returns the solution to `A*x = b` or one of the other two variants determined by
870+
[`tA`](@ref stdlib-blas-trans) and [`ul`](@ref stdlib-blas-uplo).
871+
[`dA`](@ref stdlib-blas-diag) determines if the diagonal values are read or
872+
are assumed to be all ones.
878873
"""
879874
function trsv end
880875

@@ -943,8 +938,8 @@ end
943938
"""
944939
syr!(uplo, alpha, x, A)
945940
946-
Rank-1 update of the symmetric matrix `A` with vector `x` as `alpha*x*x.' + A`. When `uplo`
947-
is `'U'` the upper triangle of `A` is updated (`'L'` for lower triangle). Returns `A`.
941+
Rank-1 update of the symmetric matrix `A` with vector `x` as `alpha*x*x.' + A`.
942+
[`uplo`](@ref stdlib-blas-uplo) controls which triangle of `A` is updated. Returns `A`.
948943
"""
949944
function syr! end
950945

@@ -974,8 +969,8 @@ end
974969
her!(uplo, alpha, x, A)
975970
976971
Methods for complex arrays only. Rank-1 update of the Hermitian matrix `A` with vector `x`
977-
as `alpha*x*x' + A`. When `uplo` is `'U'` the upper triangle of `A` is updated (`'L'` for lower
978-
triangle). Returns `A`.
972+
as `alpha*x*x' + A`.
973+
[`uplo`](@ref stdlib-blas-uplo) controls which triangle of `A` is updated. Returns `A`.
979974
"""
980975
function her! end
981976

@@ -1003,8 +998,8 @@ end
1003998
"""
1004999
gemm!(tA, tB, alpha, A, B, beta, C)
10051000
1006-
Update `C` as `alpha*A*B + beta*C` or the other three variants according to `tA` (transpose
1007-
`A`) and `tB`. Returns the updated `C`.
1001+
Update `C` as `alpha*A*B + beta*C` or the other three variants according to
1002+
[`tA`](@ref stdlib-blas-trans) and `tB`. Returns the updated `C`.
10081003
"""
10091004
function gemm! end
10101005

@@ -1055,14 +1050,14 @@ end
10551050
"""
10561051
gemm(tA, tB, alpha, A, B)
10571052
1058-
Returns `alpha*A*B` or the other three variants according to `tA` (transpose `A`) and `tB`.
1053+
Returns `alpha*A*B` or the other three variants according to [`tA`](@ref stdlib-blas-trans) and `tB`.
10591054
"""
10601055
gemm(tA, tB, alpha, A, B)
10611056

10621057
"""
10631058
gemm(tA, tB, A, B)
10641059
1065-
Returns `A*B` or the other three variants according to `tA` (transpose `A`) and `tB`.
1060+
Returns `A*B` or the other three variants according to [`tA`](@ref stdlib-blas-trans) and `tB`.
10661061
"""
10671062
gemm(tA, tB, A, B)
10681063

@@ -1110,31 +1105,26 @@ end
11101105
"""
11111106
symm(side, ul, alpha, A, B)
11121107
1113-
Returns `alpha*A*B` or `alpha*B*A` according to `side`. `A` is assumed to be symmetric. Only
1114-
the `ul` triangle (`'U'` for upper, `'L'` for lower) of `A` is used.
1108+
Returns `alpha*A*B` or `alpha*B*A` according to [`side`](@ref stdlib-blas-side).
1109+
`A` is assumed to be symmetric. Only
1110+
the [`ul`](@ref stdlib-blas-uplo) triangle of `A` is used.
11151111
"""
11161112
symm(side, ul, alpha, A, B)
11171113

11181114
"""
11191115
symm(side, ul, A, B)
11201116
1121-
Returns `A*B` or `B*A` according to `side`. `A` is assumed to be symmetric. Only the `ul`
1122-
triangle (`'U'` for upper, `'L'` for lower) of `A` is used.
1117+
Returns `A*B` or `B*A` according to [`side`](@ref stdlib-blas-side).
1118+
`A` is assumed to be symmetric. Only the [`ul`](@ref stdlib-blas-uplo)
1119+
triangle of `A` is used.
11231120
"""
11241121
symm(side, ul, A, B)
11251122

1126-
"""
1127-
symm(tA, tB, alpha, A, B)
1128-
1129-
Returns `alpha*A*B` or the other three variants according to `tA` (transpose `A`) and `tB`.
1130-
"""
1131-
symm(tA::Char, tB::Char, alpha, A, B)
1132-
11331123
"""
11341124
symm!(side, ul, alpha, A, B, beta, C)
11351125
1136-
Update `C` as `alpha*A*B + beta*C` or `alpha*B*A + beta*C` according to `side`. `A` is
1137-
assumed to be symmetric. Only the `ul` (`'U'` for upper, `'L'` for lower) triangle of
1126+
Update `C` as `alpha*A*B + beta*C` or `alpha*B*A + beta*C` according to [`side`](@ref stdlib-blas-side).
1127+
`A` is assumed to be symmetric. Only the [`ul`](@ref stdlib-blas-uplo) triangle of
11381128
`A` is used. Returns the updated `C`.
11391129
"""
11401130
symm!
@@ -1183,16 +1173,18 @@ end
11831173
syrk!(uplo, trans, alpha, A, beta, C)
11841174
11851175
Rank-k update of the symmetric matrix `C` as `alpha*A*A.' + beta*C` or `alpha*A.'*A +
1186-
beta*C` according to whether `trans` is `'N'` or `'T'`. When `uplo` is `'U'` the upper triangle of
1187-
`C` is updated (`'L'` for lower triangle). Returns `C`.
1176+
beta*C` according to [`trans`](@ref stdlib-blas-trans).
1177+
Only the [`uplo`](@ref stdlib-blas-uplo) triangle of `C` is used. Returns `C`.
11881178
"""
11891179
function syrk! end
11901180

11911181
"""
11921182
syrk(uplo, trans, alpha, A)
11931183
1194-
Returns either the upper triangle or the lower triangle, according to `uplo` (`'U'` or `'L'`),
1195-
of `alpha*A*A.'` or `alpha*A.'*A`, according to `trans` (`'N'` or `'T'`).
1184+
Returns either the upper triangle or the lower triangle of `A`,
1185+
according to [`uplo`](@ref stdlib-blas-uplo),
1186+
of `alpha*A*A.'` or `alpha*A.'*A`,
1187+
according to [`trans`](@ref stdlib-blas-trans).
11961188
"""
11971189
function syrk end
11981190

@@ -1237,17 +1229,18 @@ syrk(uplo::Char, trans::Char, A::StridedVecOrMat) = syrk(uplo, trans, one(eltype
12371229
herk!(uplo, trans, alpha, A, beta, C)
12381230
12391231
Methods for complex arrays only. Rank-k update of the Hermitian matrix `C` as `alpha*A*A' +
1240-
beta*C` or `alpha*A'*A + beta*C` according to whether `trans` is `'N'` or `'T'`. When `uplo` is
1241-
`'U'` the upper triangle of `C` is updated (`'L'` for lower triangle). Returns `C`.
1232+
beta*C` or `alpha*A'*A + beta*C` according to [`trans`](@ref stdlib-blas-trans).
1233+
Only the [`uplo`](@ref stdlib-blas-uplo) triangle of `C` is updated.
1234+
Returns `C`.
12421235
"""
12431236
function herk! end
12441237

12451238
"""
12461239
herk(uplo, trans, alpha, A)
12471240
1248-
Methods for complex arrays only. Returns either the upper triangle or the lower triangle,
1249-
according to `uplo` ('U' or 'L'), of `alpha*A*A'` or `alpha*A'*A`, according to `trans` ('N'
1250-
or 'T').
1241+
Methods for complex arrays only.
1242+
Returns the [`uplo`](@ref stdlib-blas-uplo) triangle of `alpha*A*A'` or `alpha*A'*A`,
1243+
according to [`trans`](@ref stdlib-blas-trans).
12511244
"""
12521245
function herk end
12531246

@@ -1368,35 +1361,34 @@ end
13681361
"""
13691362
trmm!(side, ul, tA, dA, alpha, A, B)
13701363
1371-
Update `B` as `alpha*A*B` or one of the other three variants determined by `side` (`'L'` for `A` on
1372-
left, `'R'` for `A` on right) and `tA` (transpose `A`). Only the `ul` (`'U'` for upper, `'L'` for lower)
1373-
triangle of `A` is used.
1374-
The diagonal is assumed to be all ones if `dA` is `'U'`, or the diagonal values are read from
1375-
`A` if `dA` is `'N'`.
1364+
Update `B` as `alpha*A*B` or one of the other three variants determined by
1365+
[`side`](@ref stdlib-blas-side) and [`tA`](@ref stdlib-blas-trans).
1366+
Only the [`ul`](@ref stdlib-blas-uplo) triangle of `A` is used.
1367+
[`dA`](@ref stdlib-blas-diag) determines if the diagonal values are read or
1368+
are assumed to be all ones.
13761369
Returns the updated `B`.
13771370
"""
13781371
function trmm! end
13791372

13801373
"""
13811374
trmm(side, ul, tA, dA, alpha, A, B)
13821375
1383-
Returns `alpha*A*B` or one of the other three variants determined by `side` (`'L'` for `A` on left,
1384-
`'R'` for `A` on right) and `tA` (transpose `A`).
1385-
Only the `ul` (`'U'` for upper, `'L'` for lower) triangle of `A` is used.
1386-
The diagonal is assumed to be all ones if `dA` is `'U'`, or the diagonal values are read from
1387-
`A` if `dA` is `'N'`.
1376+
Returns `alpha*A*B` or one of the other three variants determined by
1377+
[`side`](@ref stdlib-blas-side) and [`tA`](@ref stdlib-blas-trans).
1378+
Only the [`ul`](@ref stdlib-blas-uplo) triangle of `A` is used.
1379+
[`dA`](@ref stdlib-blas-diag) determines if the diagonal values are read or
1380+
are assumed to be all ones.
13881381
"""
13891382
function trmm end
13901383

13911384
"""
13921385
trsm!(side, ul, tA, dA, alpha, A, B)
13931386
13941387
Overwrite `B` with the solution to `A*X = alpha*B` or one of the other three variants
1395-
determined by `side` (`'L'` for `A` on left of `X`, `'R'` for `A` on right of `X`)
1396-
and `tA` (transpose `A`).
1397-
Only the `ul` (`'U'` for upper, `'L'` for lower) triangle of `A` is used.
1398-
The diagonal is assumed to be all ones if `dA` is `'U'`, or the diagonal values are read from
1399-
`A` if `dA` is `'N'`.
1388+
determined by [`side`](@ref stdlib-blas-side) and [`tA`](@ref stdlib-blas-trans).
1389+
Only the [`ul`](@ref stdlib-blas-uplo) triangle of `A` is used.
1390+
[`dA`](@ref stdlib-blas-diag) determines if the diagonal values are read or
1391+
are assumed to be all ones.
14001392
Returns the updated `B`.
14011393
"""
14021394
function trsm! end
@@ -1405,11 +1397,10 @@ function trsm! end
14051397
trsm(side, ul, tA, dA, alpha, A, B)
14061398
14071399
Returns the solution to `A*X = alpha*B` or one of the other three variants determined by
1408-
determined by `side` (`'L'` for `A` on left of `X`, `'R'` for `A` on right of `X`)
1409-
and `tA` (transpose `A`).
1410-
Only the `ul` (`'U'` for upper, `'L'` for lower) triangle of `A` is used.
1411-
The diagonal is assumed to be all ones if `dA` is `'U'`, or the diagonal values are read from
1412-
`A` if `dA` is `'N'`.
1400+
determined by [`side`](@ref stdlib-blas-side) and [`tA`](@ref stdlib-blas-trans).
1401+
Only the [`ul`](@ref stdlib-blas-uplo) triangle of `A` is used.
1402+
[`dA`](@ref stdlib-blas-diag) determines if the diagonal values are read or
1403+
are assumed to be all ones.
14131404
"""
14141405
function trsm end
14151406

0 commit comments

Comments
 (0)