LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 subroutine zlagtm ( character TRANS, integer N, integer NRHS, double precision ALPHA, complex*16, dimension( * ) DL, complex*16, dimension( * ) D, complex*16, dimension( * ) DU, complex*16, dimension( ldx, * ) X, integer LDX, double precision BETA, complex*16, dimension( ldb, * ) B, integer LDB )

ZLAGTM performs a matrix-matrix product of the form C = αAB+βC, where A is a tridiagonal matrix, B and C are rectangular matrices, and α and β are scalars, which may be 0, 1, or -1.

Purpose:
``` ZLAGTM performs a matrix-vector product of the form

B := alpha * A * X + beta * B

where A is a tridiagonal matrix of order N, B and X are N by NRHS
matrices, and alpha and beta are real scalars, each of which may be
0., 1., or -1.```
Parameters
 [in] TRANS ``` TRANS is CHARACTER*1 Specifies the operation applied to A. = 'N': No transpose, B := alpha * A * X + beta * B = 'T': Transpose, B := alpha * A**T * X + beta * B = 'C': Conjugate transpose, B := alpha * A**H * X + beta * B``` [in] N ``` N is INTEGER The order of the matrix A. N >= 0.``` [in] NRHS ``` NRHS is INTEGER The number of right hand sides, i.e., the number of columns of the matrices X and B.``` [in] ALPHA ``` ALPHA is DOUBLE PRECISION The scalar alpha. ALPHA must be 0., 1., or -1.; otherwise, it is assumed to be 0.``` [in] DL ``` DL is COMPLEX*16 array, dimension (N-1) The (n-1) sub-diagonal elements of T.``` [in] D ``` D is COMPLEX*16 array, dimension (N) The diagonal elements of T.``` [in] DU ``` DU is COMPLEX*16 array, dimension (N-1) The (n-1) super-diagonal elements of T.``` [in] X ``` X is COMPLEX*16 array, dimension (LDX,NRHS) The N by NRHS matrix X.``` [in] LDX ``` LDX is INTEGER The leading dimension of the array X. LDX >= max(N,1).``` [in] BETA ``` BETA is DOUBLE PRECISION The scalar beta. BETA must be 0., 1., or -1.; otherwise, it is assumed to be 1.``` [in,out] B ``` B is COMPLEX*16 array, dimension (LDB,NRHS) On entry, the N by NRHS matrix B. On exit, B is overwritten by the matrix expression B := alpha * A * X + beta * B.``` [in] LDB ``` LDB is INTEGER The leading dimension of the array B. LDB >= max(N,1).```
Date
September 2012

Definition at line 147 of file zlagtm.f.

147 *
148 * -- LAPACK auxiliary routine (version 3.4.2) --
149 * -- LAPACK is a software package provided by Univ. of Tennessee, --
150 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
151 * September 2012
152 *
153 * .. Scalar Arguments ..
154  CHARACTER trans
155  INTEGER ldb, ldx, n, nrhs
156  DOUBLE PRECISION alpha, beta
157 * ..
158 * .. Array Arguments ..
159  COMPLEX*16 b( ldb, * ), d( * ), dl( * ), du( * ),
160  \$ x( ldx, * )
161 * ..
162 *
163 * =====================================================================
164 *
165 * .. Parameters ..
166  DOUBLE PRECISION one, zero
167  parameter ( one = 1.0d+0, zero = 0.0d+0 )
168 * ..
169 * .. Local Scalars ..
170  INTEGER i, j
171 * ..
172 * .. External Functions ..
173  LOGICAL lsame
174  EXTERNAL lsame
175 * ..
176 * .. Intrinsic Functions ..
177  INTRINSIC dconjg
178 * ..
179 * .. Executable Statements ..
180 *
181  IF( n.EQ.0 )
182  \$ RETURN
183 *
184 * Multiply B by BETA if BETA.NE.1.
185 *
186  IF( beta.EQ.zero ) THEN
187  DO 20 j = 1, nrhs
188  DO 10 i = 1, n
189  b( i, j ) = zero
190  10 CONTINUE
191  20 CONTINUE
192  ELSE IF( beta.EQ.-one ) THEN
193  DO 40 j = 1, nrhs
194  DO 30 i = 1, n
195  b( i, j ) = -b( i, j )
196  30 CONTINUE
197  40 CONTINUE
198  END IF
199 *
200  IF( alpha.EQ.one ) THEN
201  IF( lsame( trans, 'N' ) ) THEN
202 *
203 * Compute B := B + A*X
204 *
205  DO 60 j = 1, nrhs
206  IF( n.EQ.1 ) THEN
207  b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j )
208  ELSE
209  b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j ) +
210  \$ du( 1 )*x( 2, j )
211  b( n, j ) = b( n, j ) + dl( n-1 )*x( n-1, j ) +
212  \$ d( n )*x( n, j )
213  DO 50 i = 2, n - 1
214  b( i, j ) = b( i, j ) + dl( i-1 )*x( i-1, j ) +
215  \$ d( i )*x( i, j ) + du( i )*x( i+1, j )
216  50 CONTINUE
217  END IF
218  60 CONTINUE
219  ELSE IF( lsame( trans, 'T' ) ) THEN
220 *
221 * Compute B := B + A**T * X
222 *
223  DO 80 j = 1, nrhs
224  IF( n.EQ.1 ) THEN
225  b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j )
226  ELSE
227  b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j ) +
228  \$ dl( 1 )*x( 2, j )
229  b( n, j ) = b( n, j ) + du( n-1 )*x( n-1, j ) +
230  \$ d( n )*x( n, j )
231  DO 70 i = 2, n - 1
232  b( i, j ) = b( i, j ) + du( i-1 )*x( i-1, j ) +
233  \$ d( i )*x( i, j ) + dl( i )*x( i+1, j )
234  70 CONTINUE
235  END IF
236  80 CONTINUE
237  ELSE IF( lsame( trans, 'C' ) ) THEN
238 *
239 * Compute B := B + A**H * X
240 *
241  DO 100 j = 1, nrhs
242  IF( n.EQ.1 ) THEN
243  b( 1, j ) = b( 1, j ) + dconjg( d( 1 ) )*x( 1, j )
244  ELSE
245  b( 1, j ) = b( 1, j ) + dconjg( d( 1 ) )*x( 1, j ) +
246  \$ dconjg( dl( 1 ) )*x( 2, j )
247  b( n, j ) = b( n, j ) + dconjg( du( n-1 ) )*
248  \$ x( n-1, j ) + dconjg( d( n ) )*x( n, j )
249  DO 90 i = 2, n - 1
250  b( i, j ) = b( i, j ) + dconjg( du( i-1 ) )*
251  \$ x( i-1, j ) + dconjg( d( i ) )*
252  \$ x( i, j ) + dconjg( dl( i ) )*
253  \$ x( i+1, j )
254  90 CONTINUE
255  END IF
256  100 CONTINUE
257  END IF
258  ELSE IF( alpha.EQ.-one ) THEN
259  IF( lsame( trans, 'N' ) ) THEN
260 *
261 * Compute B := B - A*X
262 *
263  DO 120 j = 1, nrhs
264  IF( n.EQ.1 ) THEN
265  b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j )
266  ELSE
267  b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j ) -
268  \$ du( 1 )*x( 2, j )
269  b( n, j ) = b( n, j ) - dl( n-1 )*x( n-1, j ) -
270  \$ d( n )*x( n, j )
271  DO 110 i = 2, n - 1
272  b( i, j ) = b( i, j ) - dl( i-1 )*x( i-1, j ) -
273  \$ d( i )*x( i, j ) - du( i )*x( i+1, j )
274  110 CONTINUE
275  END IF
276  120 CONTINUE
277  ELSE IF( lsame( trans, 'T' ) ) THEN
278 *
279 * Compute B := B - A**T *X
280 *
281  DO 140 j = 1, nrhs
282  IF( n.EQ.1 ) THEN
283  b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j )
284  ELSE
285  b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j ) -
286  \$ dl( 1 )*x( 2, j )
287  b( n, j ) = b( n, j ) - du( n-1 )*x( n-1, j ) -
288  \$ d( n )*x( n, j )
289  DO 130 i = 2, n - 1
290  b( i, j ) = b( i, j ) - du( i-1 )*x( i-1, j ) -
291  \$ d( i )*x( i, j ) - dl( i )*x( i+1, j )
292  130 CONTINUE
293  END IF
294  140 CONTINUE
295  ELSE IF( lsame( trans, 'C' ) ) THEN
296 *
297 * Compute B := B - A**H *X
298 *
299  DO 160 j = 1, nrhs
300  IF( n.EQ.1 ) THEN
301  b( 1, j ) = b( 1, j ) - dconjg( d( 1 ) )*x( 1, j )
302  ELSE
303  b( 1, j ) = b( 1, j ) - dconjg( d( 1 ) )*x( 1, j ) -
304  \$ dconjg( dl( 1 ) )*x( 2, j )
305  b( n, j ) = b( n, j ) - dconjg( du( n-1 ) )*
306  \$ x( n-1, j ) - dconjg( d( n ) )*x( n, j )
307  DO 150 i = 2, n - 1
308  b( i, j ) = b( i, j ) - dconjg( du( i-1 ) )*
309  \$ x( i-1, j ) - dconjg( d( i ) )*
310  \$ x( i, j ) - dconjg( dl( i ) )*
311  \$ x( i+1, j )
312  150 CONTINUE
313  END IF
314  160 CONTINUE
315  END IF
316  END IF
317  RETURN
318 *
319 * End of ZLAGTM
320 *
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the caller graph for this function: