@@ -217,20 +217,41 @@ scal(n, DA, DX, incx) = scal!(n, DA, copy(DX), incx)
217
217
218
218
Dot product of two vectors consisting of `n` elements of array `X` with stride `incx` and
219
219
`n` elements of array `Y` with stride `incy`.
220
+
221
+ # Example:
222
+ ```jldoctest
223
+ julia> dot(10, ones(10), 1, ones(20), 2)
224
+ 10.0
225
+ ```
220
226
"""
221
227
function dot end
222
228
223
229
"""
224
230
dotc(n, X, incx, U, incy)
225
231
226
- Dot function for two complex vectors conjugating the first vector.
232
+ Dot function for two complex vectors, consisting of `n` elements of array `X`
233
+ with stride `incx` and `n` elements of array `U` with stride `incy`,
234
+ conjugating the first vector.
235
+
236
+ # Example:
237
+ ```jldoctest
238
+ julia> Base.BLAS.dotc(10, im*ones(10), 1, complex(ones(20), ones(20)), 2)
239
+ 10.0 - 10.0im
240
+ ```
227
241
"""
228
242
function dotc end
229
243
230
244
"""
231
245
dotu(n, X, incx, Y, incy)
232
246
233
- Dot function for two complex vectors.
247
+ Dot function for two complex vectors consisting of `n` elements of array `X`
248
+ with stride `incx` and `n` elements of array `Y` with stride `incy`.
249
+
250
+ # Example:
251
+ ```jldoctest
252
+ julia> Base.BLAS.dotu(10, im*ones(10), 1, complex(ones(20), ones(20)), 2)
253
+ -10.0 + 10.0im
254
+ ```
234
255
"""
235
256
function dotu end
236
257
314
335
nrm2(n, X, incx)
315
336
316
337
2-norm of a vector consisting of `n` elements of array `X` with stride `incx`.
338
+
339
+ # Example:
340
+ ```jldoctest
341
+ julia> Base.BLAS.nrm2(4, ones(8), 2)
342
+ 2.0
343
+
344
+ julia> Base.BLAS.nrm2(1, ones(8), 2)
345
+ 1.0
346
+ ```
317
347
"""
318
348
function nrm2 end
319
349
@@ -339,6 +369,15 @@ nrm2(x::Array) = nrm2(length(x), pointer(x), 1)
339
369
asum(n, X, incx)
340
370
341
371
Sum of the absolute values of the first `n` elements of array `X` with stride `incx`.
372
+
373
+ # Example:
374
+ ```jldoctest
375
+ julia> Base.BLAS.asum(5, im*ones(10), 2)
376
+ 5.0
377
+
378
+ julia> Base.BLAS.asum(2, im*ones(10), 5)
379
+ 2.0
380
+ ```
342
381
"""
343
382
function asum end
344
383
@@ -363,7 +402,20 @@ asum(x::Array) = asum(length(x), pointer(x), 1)
363
402
"""
364
403
axpy!(a, X, Y)
365
404
366
- Overwrite `Y` with `a*X + Y`. Returns `Y`.
405
+ Overwrite `Y` with `a*X + Y`, where `a` is a scalar. Returns `Y`.
406
+
407
+ # Example:
408
+ ```jldoctest
409
+ julia> x = [1; 2; 3];
410
+
411
+ julia> y = [4; 5; 6];
412
+
413
+ julia> Base.BLAS.axpy!(2, x, y)
414
+ 3-element Array{Int64,1}:
415
+ 6
416
+ 9
417
+ 12
418
+ ```
367
419
"""
368
420
function axpy! end
369
421
@@ -473,14 +525,15 @@ end
473
525
gemv!(tA, alpha, A, x, beta, y)
474
526
475
527
Update the vector `y` as `alpha*A*x + beta*y` or `alpha*A'x + beta*y` according to `tA`
476
- (transpose `A`). Returns the updated `y`.
528
+ (transpose `A`). `alpha` and `beta` are scalars. Returns the updated `y`.
477
529
"""
478
530
gemv!
479
531
480
532
"""
481
533
gemv(tA, alpha, A, x)
482
534
483
535
Returns `alpha*A*x` or `alpha*A'x` according to `tA` (transpose `A`).
536
+ `alpha` is a scalar.
484
537
"""
485
538
gemv (tA, alpha, A, x)
486
539
@@ -496,18 +549,18 @@ gemv(tA, A, x)
496
549
"""
497
550
gbmv!(trans, m, kl, ku, alpha, A, x, beta, y)
498
551
499
- Update vector `y` as `alpha*A*x + beta*y` or `alpha*A'*x + beta*y` according to `trans` ('N'
500
- or 'T'). The matrix `A` is a general band matrix of dimension `m` by `size(A,2)` with `kl`
501
- sub-diagonals and `ku` super-diagonals. Returns the updated `y`.
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`
554
+ sub-diagonals and `ku` super-diagonals. `alpha` and `beta` are scalars. Returns the updated `y`.
502
555
"""
503
556
function gbmv! end
504
557
505
558
"""
506
559
gbmv(trans, m, kl, ku, alpha, A, x, beta, y)
507
560
508
- Returns `alpha*A*x` or `alpha*A'*x` according to `trans` ('N' or 'T'). The matrix `A` is a
509
- general band matrix of dimension `m` by `size(A,2)` with `kl` sub-diagonals and `ku`
510
- super-diagonals.
561
+ Returns `alpha*A*x` or `alpha*A'*x` according to `trans` (` 'N'` (meaning not transposed) or ` 'T'` (meaning transposed)).
562
+ The matrix `A` is a general band matrix of dimension `m` by `size(A,2)` with `kl` sub-diagonals and `ku`
563
+ super-diagonals. `alpha` and `beta` are scalars.
511
564
"""
512
565
function gbmv end
513
566
551
604
symv!(ul, alpha, A, x, beta, y)
552
605
553
606
Update the vector `y` as `alpha*A*x + beta*y`. `A` is assumed to be symmetric. Only the `ul`
554
- triangle of `A` is used. Returns the updated `y`.
607
+ triangle of `A` is used. `alpha` and `beta` are scalars. Returns the updated `y`.
555
608
"""
556
609
function symv! end
557
610
@@ -600,14 +653,17 @@ end
600
653
"""
601
654
symv(ul, alpha, A, x)
602
655
603
- Returns `alpha*A*x`. `A` is assumed to be symmetric. Only the `ul` triangle of `A` is used.
656
+ 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.
658
+ `alpha` is a scalar.
604
659
"""
605
660
symv (ul, alpha, A, x)
606
661
607
662
"""
608
663
symv(ul, A, x)
609
664
610
- Returns `A*x`. `A` is assumed to be symmetric. Only the `ul` triangle of `A` is used.
665
+ Returns `A*x`. `A` is assumed to be symmetric.
666
+ Only the `ul` (`'U'` for upper, `'L'` for lower) triangle of `A` is used.
611
667
"""
612
668
symv (ul, A, x)
613
669
683
739
684
740
Returns `alpha*A*x` where `A` is a symmetric band matrix of order `size(A,2)` with `k`
685
741
super-diagonals stored in the argument `A`.
742
+ Only the `uplo` (`'U'` for upper, `'L'` for lower) triangle of `A` is used.
686
743
"""
687
744
sbmv (uplo, k, alpha, A, x)
688
745
@@ -691,6 +748,7 @@ sbmv(uplo, k, alpha, A, x)
691
748
692
749
Returns `A*x` where `A` is a symmetric band matrix of order `size(A,2)` with `k`
693
750
super-diagonals stored in the argument `A`.
751
+ Only the `uplo` (`'U'` for upper, `'L'` for lower) triangle of `A` is used.
694
752
"""
695
753
sbmv (uplo, k, A, x)
696
754
@@ -701,6 +759,7 @@ Update vector `y` as `alpha*A*x + beta*y` where `A` is a a symmetric band matrix
701
759
`size(A,2)` with `k` super-diagonals stored in the argument `A`. The storage layout for `A`
702
760
is described the reference BLAS module, level-2 BLAS at
703
761
<http://www.netlib.org/lapack/explore-html/>.
762
+ Only the `uplo` (`'U'` for upper, `'L'` for lower) triangle of `A` is used.
704
763
705
764
Returns the updated `y`.
706
765
"""
@@ -743,23 +802,26 @@ end
743
802
trmv(ul, tA, dA, A, b)
744
803
745
804
Returns `op(A)*b`, where `op` is determined by `tA`
746
- (`N` for identity, `T` for transpose `A`, and `C` for conjugate
747
- transpose `A`). Only the `ul` triangle (`U` for upper, `L`
748
- for lower) of `A` is used. `dA` indicates if `A` is
749
- unit-triangular (the diagonal is assumed to be all ones if `U`,
750
- or non-unit if `N`).
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'`.
751
811
"""
752
812
function trmv end
753
813
754
814
"""
755
815
trmv!(ul, tA, dA, A, b)
756
816
757
817
Returns `op(A)*b`, where `op` is determined by `tA`
758
- (`N` for identity, `T` for transpose `A`, and `C` for conjugate
759
- transpose `A`). Only the `ul` triangle (`U` for upper, `L`
760
- for lower) of `A` is used. `dA` indicates if `A` is
761
- unit-triangular (the diagonal is assumed to be all ones if `U`,
762
- or non-unit if `N`). The multiplication occurs in-place on `b`.
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'`.
824
+ The multiplication occurs in-place on `b`.
763
825
"""
764
826
function trmv! end
765
827
798
860
trsv!(ul, tA, dA, A, b)
799
861
800
862
Overwrite `b` with the solution to `A*x = b` or one of the other two variants determined by
801
- `tA` (transpose `A`) and `ul` (triangle of `A` used). `dA` indicates if `A` is
802
- unit-triangular (the diagonal is assumed to be all ones). Returns the updated `b`.
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'`.
867
+ Returns the updated `b`.
803
868
"""
804
869
function trsv! end
805
870
@@ -808,7 +873,8 @@ function trsv! end
808
873
809
874
Returns the solution to `A*x = b` or one of the other two variants determined by `tA`
810
875
(transpose `A`) and `ul` (triangle of `A` is used.) `dA` indicates if `A` is unit-triangular
811
- (the diagonal is assumed to be all ones).
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'`).
812
878
"""
813
879
function trsv end
814
880
878
944
syr!(uplo, alpha, x, A)
879
945
880
946
Rank-1 update of the symmetric matrix `A` with vector `x` as `alpha*x*x.' + A`. When `uplo`
881
- is 'U' the upper triangle of `A` is updated ('L' for lower triangle). Returns `A`.
947
+ is ` 'U'` the upper triangle of `A` is updated (` 'L'` for lower triangle). Returns `A`.
882
948
"""
883
949
function syr! end
884
950
908
974
her!(uplo, alpha, x, A)
909
975
910
976
Methods for complex arrays only. Rank-1 update of the Hermitian matrix `A` with vector `x`
911
- as `alpha*x*x' + A`. When `uplo` is 'U' the upper triangle of `A` is updated ('L' for lower
977
+ as `alpha*x*x' + A`. When `uplo` is ` 'U'` the upper triangle of `A` is updated (` 'L'` for lower
912
978
triangle). Returns `A`.
913
979
"""
914
980
function her! end
@@ -1045,15 +1111,15 @@ end
1045
1111
symm(side, ul, alpha, A, B)
1046
1112
1047
1113
Returns `alpha*A*B` or `alpha*B*A` according to `side`. `A` is assumed to be symmetric. Only
1048
- the `ul` triangle of `A` is used.
1114
+ the `ul` triangle (`'U'` for upper, `'L'` for lower) of `A` is used.
1049
1115
"""
1050
1116
symm (side, ul, alpha, A, B)
1051
1117
1052
1118
"""
1053
1119
symm(side, ul, A, B)
1054
1120
1055
1121
Returns `A*B` or `B*A` according to `side`. `A` is assumed to be symmetric. Only the `ul`
1056
- triangle of `A` is used.
1122
+ triangle (`'U'` for upper, `'L'` for lower) of `A` is used.
1057
1123
"""
1058
1124
symm (side, ul, A, B)
1059
1125
@@ -1068,7 +1134,8 @@ symm(tA::Char, tB::Char, alpha, A, B)
1068
1134
symm!(side, ul, alpha, A, B, beta, C)
1069
1135
1070
1136
Update `C` as `alpha*A*B + beta*C` or `alpha*B*A + beta*C` according to `side`. `A` is
1071
- assumed to be symmetric. Only the `ul` triangle of `A` is used. Returns the updated `C`.
1137
+ assumed to be symmetric. Only the `ul` (`'U'` for upper, `'L'` for lower) triangle of
1138
+ `A` is used. Returns the updated `C`.
1072
1139
"""
1073
1140
symm!
1074
1141
@@ -1116,16 +1183,16 @@ end
1116
1183
syrk!(uplo, trans, alpha, A, beta, C)
1117
1184
1118
1185
Rank-k update of the symmetric matrix `C` as `alpha*A*A.' + beta*C` or `alpha*A.'*A +
1119
- beta*C` according to whether `trans` is 'N' or 'T'. When `uplo` is 'U' the upper triangle of
1120
- `C` is updated ('L' for lower triangle). Returns `C`.
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`.
1121
1188
"""
1122
1189
function syrk! end
1123
1190
1124
1191
"""
1125
1192
syrk(uplo, trans, alpha, A)
1126
1193
1127
- Returns either the upper triangle or the lower triangle, according to `uplo` ('U' or 'L'),
1128
- of `alpha*A*A.'` or `alpha*A.'*A`, according to `trans` ('N' or 'T').
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'` ).
1129
1196
"""
1130
1197
function syrk end
1131
1198
@@ -1170,8 +1237,8 @@ syrk(uplo::Char, trans::Char, A::StridedVecOrMat) = syrk(uplo, trans, one(eltype
1170
1237
herk!(uplo, trans, alpha, A, beta, C)
1171
1238
1172
1239
Methods for complex arrays only. Rank-k update of the Hermitian matrix `C` as `alpha*A*A' +
1173
- beta*C` or `alpha*A'*A + beta*C` according to whether `trans` is 'N' or 'T'. When `uplo` is
1174
- 'U' the upper triangle of `C` is updated ('L' for lower triangle). Returns `C`.
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`.
1175
1242
"""
1176
1243
function herk! end
1177
1244
@@ -1301,38 +1368,48 @@ end
1301
1368
"""
1302
1369
trmm!(side, ul, tA, dA, alpha, A, B)
1303
1370
1304
- Update `B` as `alpha*A*B` or one of the other three variants determined by `side` (`A` on
1305
- left or right) and `tA` (transpose `A`). Only the `ul` triangle of `A` is used. `dA`
1306
- indicates if `A` is unit-triangular (the diagonal is assumed to be all ones). Returns the
1307
- updated `B`.
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'`.
1376
+ Returns the updated `B`.
1308
1377
"""
1309
1378
function trmm! end
1310
1379
1311
1380
"""
1312
1381
trmm(side, ul, tA, dA, alpha, A, B)
1313
1382
1314
- Returns `alpha*A*B` or one of the other three variants determined by `side` (`A` on left or
1315
- right) and `tA` (transpose `A`). Only the `ul` triangle of `A` is used. `dA` indicates if
1316
- `A` is unit-triangular (the diagonal is assumed to be all ones).
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'`.
1317
1388
"""
1318
1389
function trmm end
1319
1390
1320
1391
"""
1321
1392
trsm!(side, ul, tA, dA, alpha, A, B)
1322
1393
1323
1394
Overwrite `B` with the solution to `A*X = alpha*B` or one of the other three variants
1324
- determined by `side` (`A` on left or right of `X`) and `tA` (transpose `A`). Only the `ul`
1325
- triangle of `A` is used. `dA` indicates if `A` is unit-triangular (the diagonal is assumed
1326
- to be all ones). Returns the updated `B`.
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'`.
1400
+ Returns the updated `B`.
1327
1401
"""
1328
1402
function trsm! end
1329
1403
1330
1404
"""
1331
1405
trsm(side, ul, tA, dA, alpha, A, B)
1332
1406
1333
1407
Returns the solution to `A*X = alpha*B` or one of the other three variants determined by
1334
- `side` (`A` on left or right of `X`) and `tA` (transpose `A`). Only the `ul` triangle of `A`
1335
- is used. `dA` indicates if `A` is unit-triangular (the diagonal is assumed to be all ones).
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'`.
1336
1413
"""
1337
1414
function trsm end
1338
1415
0 commit comments