LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ clakf2()

subroutine clakf2 ( integer  m,
integer  n,
complex, dimension( lda, * )  a,
integer  lda,
complex, dimension( lda, * )  b,
complex, dimension( lda, * )  d,
complex, dimension( lda, * )  e,
complex, dimension( ldz, * )  z,
integer  ldz 
)

CLAKF2

Purpose:
 Form the 2*M*N by 2*M*N matrix

        Z = [ kron(In, A)  -kron(B', Im) ]
            [ kron(In, D)  -kron(E', Im) ],

 where In is the identity matrix of size n and X' is the transpose
 of X. kron(X, Y) is the Kronecker product between the matrices X
 and Y.
Parameters
[in]M
          M is INTEGER
          Size of matrix, must be >= 1.
[in]N
          N is INTEGER
          Size of matrix, must be >= 1.
[in]A
          A is COMPLEX, dimension ( LDA, M )
          The matrix A in the output matrix Z.
[in]LDA
          LDA is INTEGER
          The leading dimension of A, B, D, and E. ( LDA >= M+N )
[in]B
          B is COMPLEX, dimension ( LDA, N )
[in]D
          D is COMPLEX, dimension ( LDA, M )
[in]E
          E is COMPLEX, dimension ( LDA, N )

          The matrices used in forming the output matrix Z.
[out]Z
          Z is COMPLEX, dimension ( LDZ, 2*M*N )
          The resultant Kronecker M*N*2 by M*N*2 matrix (see above.)
[in]LDZ
          LDZ is INTEGER
          The leading dimension of Z. ( LDZ >= 2*M*N )
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 104 of file clakf2.f.

105*
106* -- LAPACK computational routine --
107* -- LAPACK is a software package provided by Univ. of Tennessee, --
108* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
109*
110* .. Scalar Arguments ..
111 INTEGER LDA, LDZ, M, N
112* ..
113* .. Array Arguments ..
114 COMPLEX A( LDA, * ), B( LDA, * ), D( LDA, * ),
115 $ E( LDA, * ), Z( LDZ, * )
116* ..
117*
118* ====================================================================
119*
120* .. Parameters ..
121 COMPLEX ZERO
122 parameter( zero = ( 0.0e+0, 0.0e+0 ) )
123* ..
124* .. Local Scalars ..
125 INTEGER I, IK, J, JK, L, MN, MN2
126* ..
127* .. External Subroutines ..
128 EXTERNAL claset
129* ..
130* .. Executable Statements ..
131*
132* Initialize Z
133*
134 mn = m*n
135 mn2 = 2*mn
136 CALL claset( 'Full', mn2, mn2, zero, zero, z, ldz )
137*
138 ik = 1
139 DO 50 l = 1, n
140*
141* form kron(In, A)
142*
143 DO 20 i = 1, m
144 DO 10 j = 1, m
145 z( ik+i-1, ik+j-1 ) = a( i, j )
146 10 CONTINUE
147 20 CONTINUE
148*
149* form kron(In, D)
150*
151 DO 40 i = 1, m
152 DO 30 j = 1, m
153 z( ik+mn+i-1, ik+j-1 ) = d( i, j )
154 30 CONTINUE
155 40 CONTINUE
156*
157 ik = ik + m
158 50 CONTINUE
159*
160 ik = 1
161 DO 90 l = 1, n
162 jk = mn + 1
163*
164 DO 80 j = 1, n
165*
166* form -kron(B', Im)
167*
168 DO 60 i = 1, m
169 z( ik+i-1, jk+i-1 ) = -b( j, l )
170 60 CONTINUE
171*
172* form -kron(E', Im)
173*
174 DO 70 i = 1, m
175 z( ik+mn+i-1, jk+i-1 ) = -e( j, l )
176 70 CONTINUE
177*
178 jk = jk + m
179 80 CONTINUE
180*
181 ik = ik + m
182 90 CONTINUE
183*
184 RETURN
185*
186* End of CLAKF2
187*
subroutine claset(uplo, m, n, alpha, beta, a, lda)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
Definition claset.f:106
Here is the call graph for this function:
Here is the caller graph for this function: