Skip to content

Commit dff503a

Browse files
committed
fix lapack source issues
1 parent 0991339 commit dff503a

15 files changed

+48
-24
lines changed

fypp/src/la_lapack.fypp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4814,7 +4814,7 @@ module la_lapack
48144814
!> (stopping criterion). Few tuning parameters (marked by [TP]) are
48154815
!> available for the implementer.
48164816
!> Further Details
4817-
!> ~~~~~~~~~~~~~~~
4817+
!>
48184818
!> GSVJ1 applies few sweeps of Jacobi rotations in the column space of
48194819
!> the input M-by-N matrix A. The pivot pairs are taken from the (1,2)
48204820
!> off-diagonal block in the corresponding N-by-N Gram matrix A^T * A. The

fypp/src/la_lapack_c.fypp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77701,7 +77701,7 @@ module la_lapack_c
7770177701
!> (stopping criterion). Few tuning parameters (marked by [TP]) are
7770277702
!> available for the implementer.
7770377703
!> Further Details
77704-
!> ~~~~~~~~~~~~~~~
77704+
!>
7770577705
!> CGSVJ1 applies few sweeps of Jacobi rotations in the column space of
7770677706
!> the input M-by-N matrix A. The pivot pairs are taken from the (1,2)
7770777707
!> off-diagonal block in the corresponding N-by-N Gram matrix A^T * A. The

fypp/src/la_lapack_d.fypp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46875,7 +46875,7 @@ module la_lapack_d
4687546875
!> (stopping criterion). Few tuning parameters (marked by [TP]) are
4687646876
!> available for the implementer.
4687746877
!> Further Details
46878-
!> ~~~~~~~~~~~~~~~
46878+
!>
4687946879
!> DGSVJ1 applies few sweeps of Jacobi rotations in the column space of
4688046880
!> the input M-by-N matrix A. The pivot pairs are taken from the (1,2)
4688146881
!> off-diagonal block in the corresponding N-by-N Gram matrix A^T * A. The

fypp/src/la_lapack_q.fypp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21650,7 +21650,7 @@ module la_lapack_q
2165021650
!> (stopping criterion). Few tuning parameters (marked by [TP]) are
2165121651
!> available for the implementer.
2165221652
!> Further Details
21653-
!> ~~~~~~~~~~~~~~~
21653+
!>
2165421654
!> DGSVJ1 applies few sweeps of Jacobi rotations in the column space of
2165521655
!> the input M-by-N matrix A. The pivot pairs are taken from the (1,2)
2165621656
!> off-diagonal block in the corresponding N-by-N Gram matrix A^T * A. The

fypp/src/la_lapack_s.fypp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78917,7 +78917,7 @@ module la_lapack_s
7891778917
!> (stopping criterion). Few tuning parameters (marked by [TP]) are
7891878918
!> available for the implementer.
7891978919
!> Further Details
78920-
!> ~~~~~~~~~~~~~~~
78920+
!>
7892178921
!> SGSVJ1 applies few sweeps of Jacobi rotations in the column space of
7892278922
!> the input M-by-N matrix A. The pivot pairs are taken from the (1,2)
7892378923
!> off-diagonal block in the corresponding N-by-N Gram matrix A^T * A. The

fypp/src/la_lapack_w.fypp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22173,7 +22173,7 @@ module la_lapack_w
2217322173
!> (stopping criterion). Few tuning parameters (marked by [TP]) are
2217422174
!> available for the implementer.
2217522175
!> Further Details
22176-
!> ~~~~~~~~~~~~~~~
22176+
!>
2217722177
!> ZGSVJ1 applies few sweeps of Jacobi rotations in the column space of
2217822178
!> the input M-by-N matrix A. The pivot pairs are taken from the (1,2)
2217922179
!> off-diagonal block in the corresponding N-by-N Gram matrix A^T * A. The

fypp/src/la_lapack_z.fypp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78172,7 +78172,7 @@ module la_lapack_z
7817278172
!> (stopping criterion). Few tuning parameters (marked by [TP]) are
7817378173
!> available for the implementer.
7817478174
!> Further Details
78175-
!> ~~~~~~~~~~~~~~~
78175+
!>
7817678176
!> ZGSVJ1 applies few sweeps of Jacobi rotations in the column space of
7817778177
!> the input M-by-N matrix A. The pivot pairs are taken from the (1,2)
7817878178
!> off-diagonal block in the corresponding N-by-N Gram matrix A^T * A. The

src/la_eigs.f90

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2208,7 +2208,7 @@ subroutine la_eig_standard_c(a,lambda,right,left, &
22082208

22092209
! Compute workspace size
22102210
allocate (rwork(2*n))
2211-
2211+
22122212
lwork = -1_ilp
22132213

22142214
call geev(task_u,task_v,n,amat,lda, &
@@ -2428,8 +2428,8 @@ subroutine la_eig_generalized_c(a,b,lambda,right,left, &
24282428
ldv = size(vmat,1,kind=ilp)
24292429

24302430
! Compute workspace size
2431-
allocate (rwork(2*n))
2432-
2431+
allocate (rwork(8*n))
2432+
24332433
lwork = -1_ilp
24342434

24352435
call ggev(task_u,task_v,n,amat,lda, &
@@ -2797,7 +2797,7 @@ subroutine la_eig_standard_z(a,lambda,right,left, &
27972797

27982798
! Compute workspace size
27992799
allocate (rwork(2*n))
2800-
2800+
28012801
lwork = -1_ilp
28022802

28032803
call geev(task_u,task_v,n,amat,lda, &
@@ -3017,8 +3017,8 @@ subroutine la_eig_generalized_z(a,b,lambda,right,left, &
30173017
ldv = size(vmat,1,kind=ilp)
30183018

30193019
! Compute workspace size
3020-
allocate (rwork(2*n))
3021-
3020+
allocate (rwork(8*n))
3021+
30223022
lwork = -1_ilp
30233023

30243024
call ggev(task_u,task_v,n,amat,lda, &
@@ -3386,7 +3386,7 @@ subroutine la_eig_standard_w(a,lambda,right,left, &
33863386

33873387
! Compute workspace size
33883388
allocate (rwork(2*n))
3389-
3389+
33903390
lwork = -1_ilp
33913391

33923392
call geev(task_u,task_v,n,amat,lda, &
@@ -3606,8 +3606,8 @@ subroutine la_eig_generalized_w(a,b,lambda,right,left, &
36063606
ldv = size(vmat,1,kind=ilp)
36073607

36083608
! Compute workspace size
3609-
allocate (rwork(2*n))
3610-
3609+
allocate (rwork(8*n))
3610+
36113611
lwork = -1_ilp
36123612

36133613
call ggev(task_u,task_v,n,amat,lda, &

src/la_lapack.f90

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
!> Precision-agnostic LAPACK interface
1+
! LAPACK interface
22
module la_lapack
33
use la_constants
44
use la_blas
@@ -11,6 +11,30 @@ module la_lapack
1111
use la_lapack_w
1212
implicit none(type,external)
1313
public
14+
15+
!> BBCSD: computes the CS decomposition of a unitary matrix in
16+
!! bidiagonal-block form,
17+
!! [ B11 | B12 0 0 ]
18+
!! [ 0 | 0 -I 0 ]
19+
!! X = [----------------]
20+
!! [ B21 | B22 0 0 ]
21+
!! [ 0 | 0 0 I ]
22+
!! [ C | -S 0 0 ]
23+
!! [ U1 | ] [ 0 | 0 -I 0 ] [ V1 | ]**H
24+
!! = [---------] [---------------] [---------] .
25+
!! [ | U2 ] [ S | C 0 0 ] [ | V2 ]
26+
!! [ 0 | 0 0 I ]
27+
!! X is M-by-M, its top-left block is P-by-Q, and Q must be no larger
28+
!! than P, M-P, or M-Q. (If Q is not the smallest index, then X must be
29+
!! transposed and/or permuted. This can be done in constant time using
30+
!! the TRANS and SIGNS options. See CUNCSD for details.)
31+
!! The bidiagonal matrices B11, B12, B21, and B22 are represented
32+
!! implicitly by angles THETA(1:Q) and PHI(1:Q-1).
33+
!! The unitary matrices U1, U2, V1T, and V2T are input/output.
34+
!! The input matrices are pre- or post-multiplied by the appropriate
35+
!! singular vector matrices.
36+
public :: bbcsd
37+
1438

1539
!> BBCSD: computes the CS decomposition of a unitary matrix in
1640
!! bidiagonal-block form,
@@ -4426,7 +4450,7 @@ end subroutine zgsvj0
44264450
!> (stopping criterion). Few tuning parameters (marked by [TP]) are
44274451
!> available for the implementer.
44284452
!> Further Details
4429-
!> ~~~~~~~~~~~~~~~
4453+
!>
44304454
!> GSVJ1 applies few sweeps of Jacobi rotations in the column space of
44314455
!> the input M-by-N matrix A. The pivot pairs are taken from the (1,2)
44324456
!> off-diagonal block in the corresponding N-by-N Gram matrix A^T * A. The

src/la_lapack_c.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77501,7 +77501,7 @@ end subroutine la_cgsvj0
7750177501
!> (stopping criterion). Few tuning parameters (marked by [TP]) are
7750277502
!> available for the implementer.
7750377503
!> Further Details
77504-
!> ~~~~~~~~~~~~~~~
77504+
!>
7750577505
!> CGSVJ1 applies few sweeps of Jacobi rotations in the column space of
7750677506
!> the input M-by-N matrix A. The pivot pairs are taken from the (1,2)
7750777507
!> off-diagonal block in the corresponding N-by-N Gram matrix A^T * A. The

0 commit comments

Comments
 (0)