LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
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.
Date
November 2011

Definition at line 107 of file clakf2.f.

107 *
108 * -- LAPACK computational routine (version 3.4.0) --
109 * -- LAPACK is a software package provided by Univ. of Tennessee, --
110 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
111 * November 2011
112 *
113 * .. Scalar Arguments ..
114  INTEGER lda, ldz, m, n
115 * ..
116 * .. Array Arguments ..
117  COMPLEX a( lda, * ), b( lda, * ), d( lda, * ),
118  $ e( lda, * ), z( ldz, * )
119 * ..
120 *
121 * ====================================================================
122 *
123 * .. Parameters ..
124  COMPLEX zero
125  parameter ( zero = ( 0.0e+0, 0.0e+0 ) )
126 * ..
127 * .. Local Scalars ..
128  INTEGER i, ik, j, jk, l, mn, mn2
129 * ..
130 * .. External Subroutines ..
131  EXTERNAL claset
132 * ..
133 * .. Executable Statements ..
134 *
135 * Initialize Z
136 *
137  mn = m*n
138  mn2 = 2*mn
139  CALL claset( 'Full', mn2, mn2, zero, zero, z, ldz )
140 *
141  ik = 1
142  DO 50 l = 1, n
143 *
144 * form kron(In, A)
145 *
146  DO 20 i = 1, m
147  DO 10 j = 1, m
148  z( ik+i-1, ik+j-1 ) = a( i, j )
149  10 CONTINUE
150  20 CONTINUE
151 *
152 * form kron(In, D)
153 *
154  DO 40 i = 1, m
155  DO 30 j = 1, m
156  z( ik+mn+i-1, ik+j-1 ) = d( i, j )
157  30 CONTINUE
158  40 CONTINUE
159 *
160  ik = ik + m
161  50 CONTINUE
162 *
163  ik = 1
164  DO 90 l = 1, n
165  jk = mn + 1
166 *
167  DO 80 j = 1, n
168 *
169 * form -kron(B', Im)
170 *
171  DO 60 i = 1, m
172  z( ik+i-1, jk+i-1 ) = -b( j, l )
173  60 CONTINUE
174 *
175 * form -kron(E', Im)
176 *
177  DO 70 i = 1, m
178  z( ik+mn+i-1, jk+i-1 ) = -e( j, l )
179  70 CONTINUE
180 *
181  jk = jk + m
182  80 CONTINUE
183 *
184  ik = ik + m
185  90 CONTINUE
186 *
187  RETURN
188 *
189 * End of CLAKF2
190 *
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:108

Here is the call graph for this function:

Here is the caller graph for this function: