@@ -18,7 +18,8 @@ module stdlib_linalg_lapack
18
18
!! X = [----------------]
19
19
!! [ B21 | B22 0 0 ]
20
20
!! [ 0 | 0 0 I ]
21
- !! [ C | -S 0 0 ]
21
+ !! [ C | -S 0 0 ]
22
+ !!
22
23
!! [ U1 | ] [ 0 | 0 -I 0 ] [ V1 | ]**H
23
24
!! = [---------] [---------------] [---------] .
24
25
!! [ | U2 ] [ S | C 0 0 ] [ | V2 ]
@@ -33,86 +34,28 @@ module stdlib_linalg_lapack
33
34
!! The input matrices are pre- or post-multiplied by the appropriate
34
35
!! singular vector matrices.
35
36
#:for ik,it,ii in LINALG_INT_KINDS_TYPES
37
+ #:for rk,rt,ri in RC_KINDS_TYPES
38
+ #:if rk in ["sp","dp"]
36
39
#ifdef STDLIB_EXTERNAL_LAPACK${ii}$
37
- pure subroutine cbbcsd( jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q,theta, phi, &
38
- u1, ldu1, u2, ldu2, v1t, ldv1t,v2t, ldv2t, b11d, b11e, b12d, b12e, b21d, b21e,b22d,&
39
- b22e, rwork, lrwork, info )
40
- import sp,dp,qp,${ik}$,lk
41
- implicit none(type,external)
42
- character, intent(in) :: jobu1,jobu2,jobv1t,jobv2t,trans
43
- integer(${ik}$), intent(out) :: info
44
- integer(${ik}$), intent(in) :: ldu1,ldu2,ldv1t,ldv2t,lrwork,m,p,q
45
- real(sp), intent(out) :: b11d(*),b11e(*),b12d(*),b12e(*),b21d(*),b21e(*),b22d(&
46
- *),b22e(*),rwork(*)
47
- real(sp), intent(inout) :: phi(*),theta(*)
48
- complex(sp), intent(inout) :: u1(ldu1,*),u2(ldu2,*),v1t(ldv1t,*),v2t(ldv2t,*)
49
-
50
- end subroutine cbbcsd
51
- #else
52
- module procedure stdlib${ii}$_cbbcsd
53
- #endif
54
- #ifdef STDLIB_EXTERNAL_LAPACK${ii}$
55
- pure subroutine dbbcsd( jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q,theta, phi, &
56
- u1, ldu1, u2, ldu2, v1t, ldv1t,v2t, ldv2t, b11d, b11e, b12d, b12e, b21d, b21e,b22d,&
57
- b22e, work, lwork, info )
58
- import sp,dp,qp,${ik}$,lk
59
- implicit none(type,external)
60
- character, intent(in) :: jobu1,jobu2,jobv1t,jobv2t,trans
61
- integer(${ik}$), intent(out) :: info
62
- integer(${ik}$), intent(in) :: ldu1,ldu2,ldv1t,ldv2t,lwork,m,p,q
63
- real(dp), intent(out) :: b11d(*),b11e(*),b12d(*),b12e(*),b21d(*),b21e(*),b22d(&
64
- *),b22e(*),work(*)
65
- real(dp), intent(inout) :: phi(*),theta(*),u1(ldu1,*),u2(ldu2,*),v1t(ldv1t,*),&
66
- v2t(ldv2t,*)
67
- end subroutine dbbcsd
68
- #else
69
- module procedure stdlib${ii}$_dbbcsd
70
- #endif
71
- #ifdef STDLIB_EXTERNAL_LAPACK${ii}$
72
- pure subroutine sbbcsd( jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q,theta, phi, &
73
- u1, ldu1, u2, ldu2, v1t, ldv1t,v2t, ldv2t, b11d, b11e, b12d, b12e, b21d, b21e,b22d,&
74
- b22e, work, lwork, info )
75
- import sp,dp,qp,${ik}$,lk
76
- implicit none(type,external)
77
- character, intent(in) :: jobu1,jobu2,jobv1t,jobv2t,trans
78
- integer(${ik}$), intent(out) :: info
79
- integer(${ik}$), intent(in) :: ldu1,ldu2,ldv1t,ldv2t,lwork,m,p,q
80
- real(sp), intent(out) :: b11d(*),b11e(*),b12d(*),b12e(*),b21d(*),b21e(*),b22d(&
81
- *),b22e(*),work(*)
82
- real(sp), intent(inout) :: phi(*),theta(*),u1(ldu1,*),u2(ldu2,*),v1t(ldv1t,*),&
83
- v2t(ldv2t,*)
84
- end subroutine sbbcsd
85
- #else
86
- module procedure stdlib${ii}$_sbbcsd
87
- #endif
88
- #ifdef STDLIB_EXTERNAL_LAPACK${ii}$
89
- pure subroutine zbbcsd( jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q,theta, phi, &
40
+ pure subroutine ${ri}$bbcsd( jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q,theta, phi, &
90
41
u1, ldu1, u2, ldu2, v1t, ldv1t,v2t, ldv2t, b11d, b11e, b12d, b12e, b21d, b21e,b22d,&
91
42
b22e, rwork, lrwork, info )
92
43
import sp,dp,qp,${ik}$,lk
93
44
implicit none(type,external)
94
45
character, intent(in) :: jobu1,jobu2,jobv1t,jobv2t,trans
95
46
integer(${ik}$), intent(out) :: info
96
47
integer(${ik}$), intent(in) :: ldu1,ldu2,ldv1t,ldv2t,lrwork,m,p,q
97
- real(dp ), intent(out) :: b11d(*),b11e(*),b12d(*),b12e(*),b21d(*),b21e(*),b22d( &
98
- *),b22e(*),rwork(*)
99
- real(dp ), intent(inout) :: phi(*),theta(*)
100
- complex(dp) , intent(inout) :: u1(ldu1,*),u2(ldu2,*),v1t(ldv1t,*),v2t(ldv2t,*)
48
+ real(${rk}$ ), intent(out) :: b11d(*),b11e(*),b12d(*),b12e(*),b21d(*),b21e(*),&
49
+ b22d( *),b22e(*),rwork(*)
50
+ real(${rk}$ ), intent(inout) :: phi(*),theta(*)
51
+ ${rt}$ , intent(inout) :: u1(ldu1,*),u2(ldu2,*),v1t(ldv1t,*),v2t(ldv2t,*)
101
52
102
- end subroutine zbbcsd
53
+ end subroutine ${ri}$bbcsd
103
54
#else
104
- module procedure stdlib${ii}$_zbbcsd
105
- #endif
106
- #:for rk,rt,ri in REAL_KINDS_TYPES
107
- #:if not rk in ["sp","dp"]
108
- module procedure stdlib${ii}$_${ri}$bbcsd
109
-
110
55
#:endif
111
- #:endfor
112
- #:for rk,rt,ri in CMPLX_KINDS_TYPES
113
- #:if not rk in ["sp","dp"]
114
56
module procedure stdlib${ii}$_${ri}$bbcsd
115
-
57
+ #:if rk in ["sp","dp"]
58
+ #endif
116
59
#:endif
117
60
#:endfor
118
61
#:endfor
0 commit comments