LAPACK  3.6.0
LAPACK: Linear Algebra PACKage
Collaboration diagram for complex16:

Functions

subroutine zgbmv (TRANS, M, N, KL, KU, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
 ZGBMV More...
 
subroutine zgemv (TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
 ZGEMV More...
 
subroutine zgerc (M, N, ALPHA, X, INCX, Y, INCY, A, LDA)
 ZGERC More...
 
subroutine zgeru (M, N, ALPHA, X, INCX, Y, INCY, A, LDA)
 ZGERU More...
 
subroutine zhbmv (UPLO, N, K, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
 ZHBMV More...
 
subroutine zhemv (UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
 ZHEMV More...
 
subroutine zher (UPLO, N, ALPHA, X, INCX, A, LDA)
 ZHER More...
 
subroutine zher2 (UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA)
 ZHER2 More...
 
subroutine zhpmv (UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY)
 ZHPMV More...
 
subroutine zhpr (UPLO, N, ALPHA, X, INCX, AP)
 ZHPR More...
 
subroutine zhpr2 (UPLO, N, ALPHA, X, INCX, Y, INCY, AP)
 ZHPR2 More...
 
subroutine ztbmv (UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX)
 ZTBMV More...
 
subroutine ztbsv (UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX)
 ZTBSV More...
 
subroutine ztpmv (UPLO, TRANS, DIAG, N, AP, X, INCX)
 ZTPMV More...
 
subroutine ztpsv (UPLO, TRANS, DIAG, N, AP, X, INCX)
 ZTPSV More...
 
subroutine ztrmv (UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
 ZTRMV More...
 
subroutine ztrsv (UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
 ZTRSV More...
 

Detailed Description

This is the group of complex16 LEVEL 2 BLAS routines.

Function Documentation

subroutine zgbmv ( character  TRANS,
integer  M,
integer  N,
integer  KL,
integer  KU,
complex*16  ALPHA,
complex*16, dimension(lda,*)  A,
integer  LDA,
complex*16, dimension(*)  X,
integer  INCX,
complex*16  BETA,
complex*16, dimension(*)  Y,
integer  INCY 
)

ZGBMV

Purpose:
 ZGBMV  performs one of the matrix-vector operations

    y := alpha*A*x + beta*y,   or   y := alpha*A**T*x + beta*y,   or

    y := alpha*A**H*x + beta*y,

 where alpha and beta are scalars, x and y are vectors and A is an
 m by n band matrix, with kl sub-diagonals and ku super-diagonals.
Parameters
[in]TRANS
          TRANS is CHARACTER*1
           On entry, TRANS specifies the operation to be performed as
           follows:

              TRANS = 'N' or 'n'   y := alpha*A*x + beta*y.

              TRANS = 'T' or 't'   y := alpha*A**T*x + beta*y.

              TRANS = 'C' or 'c'   y := alpha*A**H*x + beta*y.
[in]M
          M is INTEGER
           On entry, M specifies the number of rows of the matrix A.
           M must be at least zero.
[in]N
          N is INTEGER
           On entry, N specifies the number of columns of the matrix A.
           N must be at least zero.
[in]KL
          KL is INTEGER
           On entry, KL specifies the number of sub-diagonals of the
           matrix A. KL must satisfy  0 .le. KL.
[in]KU
          KU is INTEGER
           On entry, KU specifies the number of super-diagonals of the
           matrix A. KU must satisfy  0 .le. KU.
[in]ALPHA
          ALPHA is COMPLEX*16
           On entry, ALPHA specifies the scalar alpha.
[in]A
          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
           Before entry, the leading ( kl + ku + 1 ) by n part of the
           array A must contain the matrix of coefficients, supplied
           column by column, with the leading diagonal of the matrix in
           row ( ku + 1 ) of the array, the first super-diagonal
           starting at position 2 in row ku, the first sub-diagonal
           starting at position 1 in row ( ku + 2 ), and so on.
           Elements in the array A that do not correspond to elements
           in the band matrix (such as the top left ku by ku triangle)
           are not referenced.
           The following program segment will transfer a band matrix
           from conventional full matrix storage to band storage:

                 DO 20, J = 1, N
                    K = KU + 1 - J
                    DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
                       A( K + I, J ) = matrix( I, J )
              10    CONTINUE
              20 CONTINUE
[in]LDA
          LDA is INTEGER
           On entry, LDA specifies the first dimension of A as declared
           in the calling (sub) program. LDA must be at least
           ( kl + ku + 1 ).
[in]X
          X is COMPLEX*16 array of DIMENSION at least
           ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
           and at least
           ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
           Before entry, the incremented array X must contain the
           vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
[in]BETA
          BETA is COMPLEX*16
           On entry, BETA specifies the scalar beta. When BETA is
           supplied as zero then Y need not be set on input.
[in,out]Y
          Y is COMPLEX*16 array of DIMENSION at least
           ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
           and at least
           ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
           Before entry, the incremented array Y must contain the
           vector y. On exit, Y is overwritten by the updated vector y.
[in]INCY
          INCY is INTEGER
           On entry, INCY specifies the increment for the elements of
           Y. INCY must not be zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2015
Further Details:
  Level 2 Blas routine.
  The vector and matrix arguments are not referenced when N = 0, or M = 0

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 189 of file zgbmv.f.

189 *
190 * -- Reference BLAS level2 routine (version 3.6.0) --
191 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
192 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
193 * November 2015
194 *
195 * .. Scalar Arguments ..
196  COMPLEX*16 alpha,beta
197  INTEGER incx,incy,kl,ku,lda,m,n
198  CHARACTER trans
199 * ..
200 * .. Array Arguments ..
201  COMPLEX*16 a(lda,*),x(*),y(*)
202 * ..
203 *
204 * =====================================================================
205 *
206 * .. Parameters ..
207  COMPLEX*16 one
208  parameter(one= (1.0d+0,0.0d+0))
209  COMPLEX*16 zero
210  parameter(zero= (0.0d+0,0.0d+0))
211 * ..
212 * .. Local Scalars ..
213  COMPLEX*16 temp
214  INTEGER i,info,ix,iy,j,jx,jy,k,kup1,kx,ky,lenx,leny
215  LOGICAL noconj
216 * ..
217 * .. External Functions ..
218  LOGICAL lsame
219  EXTERNAL lsame
220 * ..
221 * .. External Subroutines ..
222  EXTERNAL xerbla
223 * ..
224 * .. Intrinsic Functions ..
225  INTRINSIC dconjg,max,min
226 * ..
227 *
228 * Test the input parameters.
229 *
230  info = 0
231  IF (.NOT.lsame(trans,'N') .AND. .NOT.lsame(trans,'T') .AND.
232  + .NOT.lsame(trans,'C')) THEN
233  info = 1
234  ELSE IF (m.LT.0) THEN
235  info = 2
236  ELSE IF (n.LT.0) THEN
237  info = 3
238  ELSE IF (kl.LT.0) THEN
239  info = 4
240  ELSE IF (ku.LT.0) THEN
241  info = 5
242  ELSE IF (lda.LT. (kl+ku+1)) THEN
243  info = 8
244  ELSE IF (incx.EQ.0) THEN
245  info = 10
246  ELSE IF (incy.EQ.0) THEN
247  info = 13
248  END IF
249  IF (info.NE.0) THEN
250  CALL xerbla('ZGBMV ',info)
251  RETURN
252  END IF
253 *
254 * Quick return if possible.
255 *
256  IF ((m.EQ.0) .OR. (n.EQ.0) .OR.
257  + ((alpha.EQ.zero).AND. (beta.EQ.one))) RETURN
258 *
259  noconj = lsame(trans,'T')
260 *
261 * Set LENX and LENY, the lengths of the vectors x and y, and set
262 * up the start points in X and Y.
263 *
264  IF (lsame(trans,'N')) THEN
265  lenx = n
266  leny = m
267  ELSE
268  lenx = m
269  leny = n
270  END IF
271  IF (incx.GT.0) THEN
272  kx = 1
273  ELSE
274  kx = 1 - (lenx-1)*incx
275  END IF
276  IF (incy.GT.0) THEN
277  ky = 1
278  ELSE
279  ky = 1 - (leny-1)*incy
280  END IF
281 *
282 * Start the operations. In this version the elements of A are
283 * accessed sequentially with one pass through the band part of A.
284 *
285 * First form y := beta*y.
286 *
287  IF (beta.NE.one) THEN
288  IF (incy.EQ.1) THEN
289  IF (beta.EQ.zero) THEN
290  DO 10 i = 1,leny
291  y(i) = zero
292  10 CONTINUE
293  ELSE
294  DO 20 i = 1,leny
295  y(i) = beta*y(i)
296  20 CONTINUE
297  END IF
298  ELSE
299  iy = ky
300  IF (beta.EQ.zero) THEN
301  DO 30 i = 1,leny
302  y(iy) = zero
303  iy = iy + incy
304  30 CONTINUE
305  ELSE
306  DO 40 i = 1,leny
307  y(iy) = beta*y(iy)
308  iy = iy + incy
309  40 CONTINUE
310  END IF
311  END IF
312  END IF
313  IF (alpha.EQ.zero) RETURN
314  kup1 = ku + 1
315  IF (lsame(trans,'N')) THEN
316 *
317 * Form y := alpha*A*x + y.
318 *
319  jx = kx
320  IF (incy.EQ.1) THEN
321  DO 60 j = 1,n
322  temp = alpha*x(jx)
323  k = kup1 - j
324  DO 50 i = max(1,j-ku),min(m,j+kl)
325  y(i) = y(i) + temp*a(k+i,j)
326  50 CONTINUE
327  jx = jx + incx
328  60 CONTINUE
329  ELSE
330  DO 80 j = 1,n
331  temp = alpha*x(jx)
332  iy = ky
333  k = kup1 - j
334  DO 70 i = max(1,j-ku),min(m,j+kl)
335  y(iy) = y(iy) + temp*a(k+i,j)
336  iy = iy + incy
337  70 CONTINUE
338  jx = jx + incx
339  IF (j.GT.ku) ky = ky + incy
340  80 CONTINUE
341  END IF
342  ELSE
343 *
344 * Form y := alpha*A**T*x + y or y := alpha*A**H*x + y.
345 *
346  jy = ky
347  IF (incx.EQ.1) THEN
348  DO 110 j = 1,n
349  temp = zero
350  k = kup1 - j
351  IF (noconj) THEN
352  DO 90 i = max(1,j-ku),min(m,j+kl)
353  temp = temp + a(k+i,j)*x(i)
354  90 CONTINUE
355  ELSE
356  DO 100 i = max(1,j-ku),min(m,j+kl)
357  temp = temp + dconjg(a(k+i,j))*x(i)
358  100 CONTINUE
359  END IF
360  y(jy) = y(jy) + alpha*temp
361  jy = jy + incy
362  110 CONTINUE
363  ELSE
364  DO 140 j = 1,n
365  temp = zero
366  ix = kx
367  k = kup1 - j
368  IF (noconj) THEN
369  DO 120 i = max(1,j-ku),min(m,j+kl)
370  temp = temp + a(k+i,j)*x(ix)
371  ix = ix + incx
372  120 CONTINUE
373  ELSE
374  DO 130 i = max(1,j-ku),min(m,j+kl)
375  temp = temp + dconjg(a(k+i,j))*x(ix)
376  ix = ix + incx
377  130 CONTINUE
378  END IF
379  y(jy) = y(jy) + alpha*temp
380  jy = jy + incy
381  IF (j.GT.ku) kx = kx + incx
382  140 CONTINUE
383  END IF
384  END IF
385 *
386  RETURN
387 *
388 * End of ZGBMV .
389 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine zgemv ( character  TRANS,
integer  M,
integer  N,
complex*16  ALPHA,
complex*16, dimension(lda,*)  A,
integer  LDA,
complex*16, dimension(*)  X,
integer  INCX,
complex*16  BETA,
complex*16, dimension(*)  Y,
integer  INCY 
)

ZGEMV

Purpose:
 ZGEMV  performs one of the matrix-vector operations

    y := alpha*A*x + beta*y,   or   y := alpha*A**T*x + beta*y,   or

    y := alpha*A**H*x + beta*y,

 where alpha and beta are scalars, x and y are vectors and A is an
 m by n matrix.
Parameters
[in]TRANS
          TRANS is CHARACTER*1
           On entry, TRANS specifies the operation to be performed as
           follows:

              TRANS = 'N' or 'n'   y := alpha*A*x + beta*y.

              TRANS = 'T' or 't'   y := alpha*A**T*x + beta*y.

              TRANS = 'C' or 'c'   y := alpha*A**H*x + beta*y.
[in]M
          M is INTEGER
           On entry, M specifies the number of rows of the matrix A.
           M must be at least zero.
[in]N
          N is INTEGER
           On entry, N specifies the number of columns of the matrix A.
           N must be at least zero.
[in]ALPHA
          ALPHA is COMPLEX*16
           On entry, ALPHA specifies the scalar alpha.
[in]A
          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
           Before entry, the leading m by n part of the array A must
           contain the matrix of coefficients.
[in]LDA
          LDA is INTEGER
           On entry, LDA specifies the first dimension of A as declared
           in the calling (sub) program. LDA must be at least
           max( 1, m ).
[in]X
          X is COMPLEX*16 array of DIMENSION at least
           ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
           and at least
           ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
           Before entry, the incremented array X must contain the
           vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
[in]BETA
          BETA is COMPLEX*16
           On entry, BETA specifies the scalar beta. When BETA is
           supplied as zero then Y need not be set on input.
[in,out]Y
          Y is COMPLEX*16 array of DIMENSION at least
           ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
           and at least
           ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
           Before entry with BETA non-zero, the incremented array Y
           must contain the vector y. On exit, Y is overwritten by the
           updated vector y.
[in]INCY
          INCY is INTEGER
           On entry, INCY specifies the increment for the elements of
           Y. INCY must not be zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2015
Further Details:
  Level 2 Blas routine.
  The vector and matrix arguments are not referenced when N = 0, or M = 0

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 160 of file zgemv.f.

160 *
161 * -- Reference BLAS level2 routine (version 3.6.0) --
162 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
163 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
164 * November 2015
165 *
166 * .. Scalar Arguments ..
167  COMPLEX*16 alpha,beta
168  INTEGER incx,incy,lda,m,n
169  CHARACTER trans
170 * ..
171 * .. Array Arguments ..
172  COMPLEX*16 a(lda,*),x(*),y(*)
173 * ..
174 *
175 * =====================================================================
176 *
177 * .. Parameters ..
178  COMPLEX*16 one
179  parameter(one= (1.0d+0,0.0d+0))
180  COMPLEX*16 zero
181  parameter(zero= (0.0d+0,0.0d+0))
182 * ..
183 * .. Local Scalars ..
184  COMPLEX*16 temp
185  INTEGER i,info,ix,iy,j,jx,jy,kx,ky,lenx,leny
186  LOGICAL noconj
187 * ..
188 * .. External Functions ..
189  LOGICAL lsame
190  EXTERNAL lsame
191 * ..
192 * .. External Subroutines ..
193  EXTERNAL xerbla
194 * ..
195 * .. Intrinsic Functions ..
196  INTRINSIC dconjg,max
197 * ..
198 *
199 * Test the input parameters.
200 *
201  info = 0
202  IF (.NOT.lsame(trans,'N') .AND. .NOT.lsame(trans,'T') .AND.
203  + .NOT.lsame(trans,'C')) THEN
204  info = 1
205  ELSE IF (m.LT.0) THEN
206  info = 2
207  ELSE IF (n.LT.0) THEN
208  info = 3
209  ELSE IF (lda.LT.max(1,m)) THEN
210  info = 6
211  ELSE IF (incx.EQ.0) THEN
212  info = 8
213  ELSE IF (incy.EQ.0) THEN
214  info = 11
215  END IF
216  IF (info.NE.0) THEN
217  CALL xerbla('ZGEMV ',info)
218  RETURN
219  END IF
220 *
221 * Quick return if possible.
222 *
223  IF ((m.EQ.0) .OR. (n.EQ.0) .OR.
224  + ((alpha.EQ.zero).AND. (beta.EQ.one))) RETURN
225 *
226  noconj = lsame(trans,'T')
227 *
228 * Set LENX and LENY, the lengths of the vectors x and y, and set
229 * up the start points in X and Y.
230 *
231  IF (lsame(trans,'N')) THEN
232  lenx = n
233  leny = m
234  ELSE
235  lenx = m
236  leny = n
237  END IF
238  IF (incx.GT.0) THEN
239  kx = 1
240  ELSE
241  kx = 1 - (lenx-1)*incx
242  END IF
243  IF (incy.GT.0) THEN
244  ky = 1
245  ELSE
246  ky = 1 - (leny-1)*incy
247  END IF
248 *
249 * Start the operations. In this version the elements of A are
250 * accessed sequentially with one pass through A.
251 *
252 * First form y := beta*y.
253 *
254  IF (beta.NE.one) THEN
255  IF (incy.EQ.1) THEN
256  IF (beta.EQ.zero) THEN
257  DO 10 i = 1,leny
258  y(i) = zero
259  10 CONTINUE
260  ELSE
261  DO 20 i = 1,leny
262  y(i) = beta*y(i)
263  20 CONTINUE
264  END IF
265  ELSE
266  iy = ky
267  IF (beta.EQ.zero) THEN
268  DO 30 i = 1,leny
269  y(iy) = zero
270  iy = iy + incy
271  30 CONTINUE
272  ELSE
273  DO 40 i = 1,leny
274  y(iy) = beta*y(iy)
275  iy = iy + incy
276  40 CONTINUE
277  END IF
278  END IF
279  END IF
280  IF (alpha.EQ.zero) RETURN
281  IF (lsame(trans,'N')) THEN
282 *
283 * Form y := alpha*A*x + y.
284 *
285  jx = kx
286  IF (incy.EQ.1) THEN
287  DO 60 j = 1,n
288  temp = alpha*x(jx)
289  DO 50 i = 1,m
290  y(i) = y(i) + temp*a(i,j)
291  50 CONTINUE
292  jx = jx + incx
293  60 CONTINUE
294  ELSE
295  DO 80 j = 1,n
296  temp = alpha*x(jx)
297  iy = ky
298  DO 70 i = 1,m
299  y(iy) = y(iy) + temp*a(i,j)
300  iy = iy + incy
301  70 CONTINUE
302  jx = jx + incx
303  80 CONTINUE
304  END IF
305  ELSE
306 *
307 * Form y := alpha*A**T*x + y or y := alpha*A**H*x + y.
308 *
309  jy = ky
310  IF (incx.EQ.1) THEN
311  DO 110 j = 1,n
312  temp = zero
313  IF (noconj) THEN
314  DO 90 i = 1,m
315  temp = temp + a(i,j)*x(i)
316  90 CONTINUE
317  ELSE
318  DO 100 i = 1,m
319  temp = temp + dconjg(a(i,j))*x(i)
320  100 CONTINUE
321  END IF
322  y(jy) = y(jy) + alpha*temp
323  jy = jy + incy
324  110 CONTINUE
325  ELSE
326  DO 140 j = 1,n
327  temp = zero
328  ix = kx
329  IF (noconj) THEN
330  DO 120 i = 1,m
331  temp = temp + a(i,j)*x(ix)
332  ix = ix + incx
333  120 CONTINUE
334  ELSE
335  DO 130 i = 1,m
336  temp = temp + dconjg(a(i,j))*x(ix)
337  ix = ix + incx
338  130 CONTINUE
339  END IF
340  y(jy) = y(jy) + alpha*temp
341  jy = jy + incy
342  140 CONTINUE
343  END IF
344  END IF
345 *
346  RETURN
347 *
348 * End of ZGEMV .
349 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

subroutine zgerc ( integer  M,
integer  N,
complex*16  ALPHA,
complex*16, dimension(*)  X,
integer  INCX,
complex*16, dimension(*)  Y,
integer  INCY,
complex*16, dimension(lda,*)  A,
integer  LDA 
)

ZGERC

Purpose:
 ZGERC  performs the rank 1 operation

    A := alpha*x*y**H + A,

 where alpha is a scalar, x is an m element vector, y is an n element
 vector and A is an m by n matrix.
Parameters
[in]M
          M is INTEGER
           On entry, M specifies the number of rows of the matrix A.
           M must be at least zero.
[in]N
          N is INTEGER
           On entry, N specifies the number of columns of the matrix A.
           N must be at least zero.
[in]ALPHA
          ALPHA is COMPLEX*16
           On entry, ALPHA specifies the scalar alpha.
[in]X
          X is COMPLEX*16 array of dimension at least
           ( 1 + ( m - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the m
           element vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
[in]Y
          Y is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCY ) ).
           Before entry, the incremented array Y must contain the n
           element vector y.
[in]INCY
          INCY is INTEGER
           On entry, INCY specifies the increment for the elements of
           Y. INCY must not be zero.
[in,out]A
          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
           Before entry, the leading m by n part of the array A must
           contain the matrix of coefficients. On exit, A is
           overwritten by the updated matrix.
[in]LDA
          LDA is INTEGER
           On entry, LDA specifies the first dimension of A as declared
           in the calling (sub) program. LDA must be at least
           max( 1, m ).
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 132 of file zgerc.f.

132 *
133 * -- Reference BLAS level2 routine (version 3.4.0) --
134 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
135 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
136 * November 2011
137 *
138 * .. Scalar Arguments ..
139  COMPLEX*16 alpha
140  INTEGER incx,incy,lda,m,n
141 * ..
142 * .. Array Arguments ..
143  COMPLEX*16 a(lda,*),x(*),y(*)
144 * ..
145 *
146 * =====================================================================
147 *
148 * .. Parameters ..
149  COMPLEX*16 zero
150  parameter(zero= (0.0d+0,0.0d+0))
151 * ..
152 * .. Local Scalars ..
153  COMPLEX*16 temp
154  INTEGER i,info,ix,j,jy,kx
155 * ..
156 * .. External Subroutines ..
157  EXTERNAL xerbla
158 * ..
159 * .. Intrinsic Functions ..
160  INTRINSIC dconjg,max
161 * ..
162 *
163 * Test the input parameters.
164 *
165  info = 0
166  IF (m.LT.0) THEN
167  info = 1
168  ELSE IF (n.LT.0) THEN
169  info = 2
170  ELSE IF (incx.EQ.0) THEN
171  info = 5
172  ELSE IF (incy.EQ.0) THEN
173  info = 7
174  ELSE IF (lda.LT.max(1,m)) THEN
175  info = 9
176  END IF
177  IF (info.NE.0) THEN
178  CALL xerbla('ZGERC ',info)
179  RETURN
180  END IF
181 *
182 * Quick return if possible.
183 *
184  IF ((m.EQ.0) .OR. (n.EQ.0) .OR. (alpha.EQ.zero)) RETURN
185 *
186 * Start the operations. In this version the elements of A are
187 * accessed sequentially with one pass through A.
188 *
189  IF (incy.GT.0) THEN
190  jy = 1
191  ELSE
192  jy = 1 - (n-1)*incy
193  END IF
194  IF (incx.EQ.1) THEN
195  DO 20 j = 1,n
196  IF (y(jy).NE.zero) THEN
197  temp = alpha*dconjg(y(jy))
198  DO 10 i = 1,m
199  a(i,j) = a(i,j) + x(i)*temp
200  10 CONTINUE
201  END IF
202  jy = jy + incy
203  20 CONTINUE
204  ELSE
205  IF (incx.GT.0) THEN
206  kx = 1
207  ELSE
208  kx = 1 - (m-1)*incx
209  END IF
210  DO 40 j = 1,n
211  IF (y(jy).NE.zero) THEN
212  temp = alpha*dconjg(y(jy))
213  ix = kx
214  DO 30 i = 1,m
215  a(i,j) = a(i,j) + x(ix)*temp
216  ix = ix + incx
217  30 CONTINUE
218  END IF
219  jy = jy + incy
220  40 CONTINUE
221  END IF
222 *
223  RETURN
224 *
225 * End of ZGERC .
226 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine zgeru ( integer  M,
integer  N,
complex*16  ALPHA,
complex*16, dimension(*)  X,
integer  INCX,
complex*16, dimension(*)  Y,
integer  INCY,
complex*16, dimension(lda,*)  A,
integer  LDA 
)

ZGERU

Purpose:
 ZGERU  performs the rank 1 operation

    A := alpha*x*y**T + A,

 where alpha is a scalar, x is an m element vector, y is an n element
 vector and A is an m by n matrix.
Parameters
[in]M
          M is INTEGER
           On entry, M specifies the number of rows of the matrix A.
           M must be at least zero.
[in]N
          N is INTEGER
           On entry, N specifies the number of columns of the matrix A.
           N must be at least zero.
[in]ALPHA
          ALPHA is COMPLEX*16
           On entry, ALPHA specifies the scalar alpha.
[in]X
          X is COMPLEX*16 array of dimension at least
           ( 1 + ( m - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the m
           element vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
[in]Y
          Y is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCY ) ).
           Before entry, the incremented array Y must contain the n
           element vector y.
[in]INCY
          INCY is INTEGER
           On entry, INCY specifies the increment for the elements of
           Y. INCY must not be zero.
[in,out]A
          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
           Before entry, the leading m by n part of the array A must
           contain the matrix of coefficients. On exit, A is
           overwritten by the updated matrix.
[in]LDA
          LDA is INTEGER
           On entry, LDA specifies the first dimension of A as declared
           in the calling (sub) program. LDA must be at least
           max( 1, m ).
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 132 of file zgeru.f.

132 *
133 * -- Reference BLAS level2 routine (version 3.4.0) --
134 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
135 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
136 * November 2011
137 *
138 * .. Scalar Arguments ..
139  COMPLEX*16 alpha
140  INTEGER incx,incy,lda,m,n
141 * ..
142 * .. Array Arguments ..
143  COMPLEX*16 a(lda,*),x(*),y(*)
144 * ..
145 *
146 * =====================================================================
147 *
148 * .. Parameters ..
149  COMPLEX*16 zero
150  parameter(zero= (0.0d+0,0.0d+0))
151 * ..
152 * .. Local Scalars ..
153  COMPLEX*16 temp
154  INTEGER i,info,ix,j,jy,kx
155 * ..
156 * .. External Subroutines ..
157  EXTERNAL xerbla
158 * ..
159 * .. Intrinsic Functions ..
160  INTRINSIC max
161 * ..
162 *
163 * Test the input parameters.
164 *
165  info = 0
166  IF (m.LT.0) THEN
167  info = 1
168  ELSE IF (n.LT.0) THEN
169  info = 2
170  ELSE IF (incx.EQ.0) THEN
171  info = 5
172  ELSE IF (incy.EQ.0) THEN
173  info = 7
174  ELSE IF (lda.LT.max(1,m)) THEN
175  info = 9
176  END IF
177  IF (info.NE.0) THEN
178  CALL xerbla('ZGERU ',info)
179  RETURN
180  END IF
181 *
182 * Quick return if possible.
183 *
184  IF ((m.EQ.0) .OR. (n.EQ.0) .OR. (alpha.EQ.zero)) RETURN
185 *
186 * Start the operations. In this version the elements of A are
187 * accessed sequentially with one pass through A.
188 *
189  IF (incy.GT.0) THEN
190  jy = 1
191  ELSE
192  jy = 1 - (n-1)*incy
193  END IF
194  IF (incx.EQ.1) THEN
195  DO 20 j = 1,n
196  IF (y(jy).NE.zero) THEN
197  temp = alpha*y(jy)
198  DO 10 i = 1,m
199  a(i,j) = a(i,j) + x(i)*temp
200  10 CONTINUE
201  END IF
202  jy = jy + incy
203  20 CONTINUE
204  ELSE
205  IF (incx.GT.0) THEN
206  kx = 1
207  ELSE
208  kx = 1 - (m-1)*incx
209  END IF
210  DO 40 j = 1,n
211  IF (y(jy).NE.zero) THEN
212  temp = alpha*y(jy)
213  ix = kx
214  DO 30 i = 1,m
215  a(i,j) = a(i,j) + x(ix)*temp
216  ix = ix + incx
217  30 CONTINUE
218  END IF
219  jy = jy + incy
220  40 CONTINUE
221  END IF
222 *
223  RETURN
224 *
225 * End of ZGERU .
226 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine zhbmv ( character  UPLO,
integer  N,
integer  K,
complex*16  ALPHA,
complex*16, dimension(lda,*)  A,
integer  LDA,
complex*16, dimension(*)  X,
integer  INCX,
complex*16  BETA,
complex*16, dimension(*)  Y,
integer  INCY 
)

ZHBMV

Purpose:
 ZHBMV  performs the matrix-vector  operation

    y := alpha*A*x + beta*y,

 where alpha and beta are scalars, x and y are n element vectors and
 A is an n by n hermitian band matrix, with k super-diagonals.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
           On entry, UPLO specifies whether the upper or lower
           triangular part of the band matrix A is being supplied as
           follows:

              UPLO = 'U' or 'u'   The upper triangular part of A is
                                  being supplied.

              UPLO = 'L' or 'l'   The lower triangular part of A is
                                  being supplied.
[in]N
          N is INTEGER
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
[in]K
          K is INTEGER
           On entry, K specifies the number of super-diagonals of the
           matrix A. K must satisfy  0 .le. K.
[in]ALPHA
          ALPHA is COMPLEX*16
           On entry, ALPHA specifies the scalar alpha.
[in]A
          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
           by n part of the array A must contain the upper triangular
           band part of the hermitian matrix, supplied column by
           column, with the leading diagonal of the matrix in row
           ( k + 1 ) of the array, the first super-diagonal starting at
           position 2 in row k, and so on. The top left k by k triangle
           of the array A is not referenced.
           The following program segment will transfer the upper
           triangular part of a hermitian band matrix from conventional
           full matrix storage to band storage:

                 DO 20, J = 1, N
                    M = K + 1 - J
                    DO 10, I = MAX( 1, J - K ), J
                       A( M + I, J ) = matrix( I, J )
              10    CONTINUE
              20 CONTINUE

           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
           by n part of the array A must contain the lower triangular
           band part of the hermitian matrix, supplied column by
           column, with the leading diagonal of the matrix in row 1 of
           the array, the first sub-diagonal starting at position 1 in
           row 2, and so on. The bottom right k by k triangle of the
           array A is not referenced.
           The following program segment will transfer the lower
           triangular part of a hermitian band matrix from conventional
           full matrix storage to band storage:

                 DO 20, J = 1, N
                    M = 1 - J
                    DO 10, I = J, MIN( N, J + K )
                       A( M + I, J ) = matrix( I, J )
              10    CONTINUE
              20 CONTINUE

           Note that the imaginary parts of the diagonal elements need
           not be set and are assumed to be zero.
[in]LDA
          LDA is INTEGER
           On entry, LDA specifies the first dimension of A as declared
           in the calling (sub) program. LDA must be at least
           ( k + 1 ).
[in]X
          X is COMPLEX*16 array of DIMENSION at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the
           vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
[in]BETA
          BETA is COMPLEX*16
           On entry, BETA specifies the scalar beta.
[in,out]Y
          Y is COMPLEX*16 array of DIMENSION at least
           ( 1 + ( n - 1 )*abs( INCY ) ).
           Before entry, the incremented array Y must contain the
           vector y. On exit, Y is overwritten by the updated vector y.
[in]INCY
          INCY is INTEGER
           On entry, INCY specifies the increment for the elements of
           Y. INCY must not be zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.
  The vector and matrix arguments are not referenced when N = 0, or M = 0

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 189 of file zhbmv.f.

189 *
190 * -- Reference BLAS level2 routine (version 3.4.0) --
191 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
192 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
193 * November 2011
194 *
195 * .. Scalar Arguments ..
196  COMPLEX*16 alpha,beta
197  INTEGER incx,incy,k,lda,n
198  CHARACTER uplo
199 * ..
200 * .. Array Arguments ..
201  COMPLEX*16 a(lda,*),x(*),y(*)
202 * ..
203 *
204 * =====================================================================
205 *
206 * .. Parameters ..
207  COMPLEX*16 one
208  parameter(one= (1.0d+0,0.0d+0))
209  COMPLEX*16 zero
210  parameter(zero= (0.0d+0,0.0d+0))
211 * ..
212 * .. Local Scalars ..
213  COMPLEX*16 temp1,temp2
214  INTEGER i,info,ix,iy,j,jx,jy,kplus1,kx,ky,l
215 * ..
216 * .. External Functions ..
217  LOGICAL lsame
218  EXTERNAL lsame
219 * ..
220 * .. External Subroutines ..
221  EXTERNAL xerbla
222 * ..
223 * .. Intrinsic Functions ..
224  INTRINSIC dble,dconjg,max,min
225 * ..
226 *
227 * Test the input parameters.
228 *
229  info = 0
230  IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN
231  info = 1
232  ELSE IF (n.LT.0) THEN
233  info = 2
234  ELSE IF (k.LT.0) THEN
235  info = 3
236  ELSE IF (lda.LT. (k+1)) THEN
237  info = 6
238  ELSE IF (incx.EQ.0) THEN
239  info = 8
240  ELSE IF (incy.EQ.0) THEN
241  info = 11
242  END IF
243  IF (info.NE.0) THEN
244  CALL xerbla('ZHBMV ',info)
245  RETURN
246  END IF
247 *
248 * Quick return if possible.
249 *
250  IF ((n.EQ.0) .OR. ((alpha.EQ.zero).AND. (beta.EQ.one))) RETURN
251 *
252 * Set up the start points in X and Y.
253 *
254  IF (incx.GT.0) THEN
255  kx = 1
256  ELSE
257  kx = 1 - (n-1)*incx
258  END IF
259  IF (incy.GT.0) THEN
260  ky = 1
261  ELSE
262  ky = 1 - (n-1)*incy
263  END IF
264 *
265 * Start the operations. In this version the elements of the array A
266 * are accessed sequentially with one pass through A.
267 *
268 * First form y := beta*y.
269 *
270  IF (beta.NE.one) THEN
271  IF (incy.EQ.1) THEN
272  IF (beta.EQ.zero) THEN
273  DO 10 i = 1,n
274  y(i) = zero
275  10 CONTINUE
276  ELSE
277  DO 20 i = 1,n
278  y(i) = beta*y(i)
279  20 CONTINUE
280  END IF
281  ELSE
282  iy = ky
283  IF (beta.EQ.zero) THEN
284  DO 30 i = 1,n
285  y(iy) = zero
286  iy = iy + incy
287  30 CONTINUE
288  ELSE
289  DO 40 i = 1,n
290  y(iy) = beta*y(iy)
291  iy = iy + incy
292  40 CONTINUE
293  END IF
294  END IF
295  END IF
296  IF (alpha.EQ.zero) RETURN
297  IF (lsame(uplo,'U')) THEN
298 *
299 * Form y when upper triangle of A is stored.
300 *
301  kplus1 = k + 1
302  IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN
303  DO 60 j = 1,n
304  temp1 = alpha*x(j)
305  temp2 = zero
306  l = kplus1 - j
307  DO 50 i = max(1,j-k),j - 1
308  y(i) = y(i) + temp1*a(l+i,j)
309  temp2 = temp2 + dconjg(a(l+i,j))*x(i)
310  50 CONTINUE
311  y(j) = y(j) + temp1*dble(a(kplus1,j)) + alpha*temp2
312  60 CONTINUE
313  ELSE
314  jx = kx
315  jy = ky
316  DO 80 j = 1,n
317  temp1 = alpha*x(jx)
318  temp2 = zero
319  ix = kx
320  iy = ky
321  l = kplus1 - j
322  DO 70 i = max(1,j-k),j - 1
323  y(iy) = y(iy) + temp1*a(l+i,j)
324  temp2 = temp2 + dconjg(a(l+i,j))*x(ix)
325  ix = ix + incx
326  iy = iy + incy
327  70 CONTINUE
328  y(jy) = y(jy) + temp1*dble(a(kplus1,j)) + alpha*temp2
329  jx = jx + incx
330  jy = jy + incy
331  IF (j.GT.k) THEN
332  kx = kx + incx
333  ky = ky + incy
334  END IF
335  80 CONTINUE
336  END IF
337  ELSE
338 *
339 * Form y when lower triangle of A is stored.
340 *
341  IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN
342  DO 100 j = 1,n
343  temp1 = alpha*x(j)
344  temp2 = zero
345  y(j) = y(j) + temp1*dble(a(1,j))
346  l = 1 - j
347  DO 90 i = j + 1,min(n,j+k)
348  y(i) = y(i) + temp1*a(l+i,j)
349  temp2 = temp2 + dconjg(a(l+i,j))*x(i)
350  90 CONTINUE
351  y(j) = y(j) + alpha*temp2
352  100 CONTINUE
353  ELSE
354  jx = kx
355  jy = ky
356  DO 120 j = 1,n
357  temp1 = alpha*x(jx)
358  temp2 = zero
359  y(jy) = y(jy) + temp1*dble(a(1,j))
360  l = 1 - j
361  ix = jx
362  iy = jy
363  DO 110 i = j + 1,min(n,j+k)
364  ix = ix + incx
365  iy = iy + incy
366  y(iy) = y(iy) + temp1*a(l+i,j)
367  temp2 = temp2 + dconjg(a(l+i,j))*x(ix)
368  110 CONTINUE
369  y(jy) = y(jy) + alpha*temp2
370  jx = jx + incx
371  jy = jy + incy
372  120 CONTINUE
373  END IF
374  END IF
375 *
376  RETURN
377 *
378 * End of ZHBMV .
379 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine zhemv ( character  UPLO,
integer  N,
complex*16  ALPHA,
complex*16, dimension(lda,*)  A,
integer  LDA,
complex*16, dimension(*)  X,
integer  INCX,
complex*16  BETA,
complex*16, dimension(*)  Y,
integer  INCY 
)

ZHEMV

Purpose:
 ZHEMV  performs the matrix-vector  operation

    y := alpha*A*x + beta*y,

 where alpha and beta are scalars, x and y are n element vectors and
 A is an n by n hermitian matrix.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
           On entry, UPLO specifies whether the upper or lower
           triangular part of the array A is to be referenced as
           follows:

              UPLO = 'U' or 'u'   Only the upper triangular part of A
                                  is to be referenced.

              UPLO = 'L' or 'l'   Only the lower triangular part of A
                                  is to be referenced.
[in]N
          N is INTEGER
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
[in]ALPHA
          ALPHA is COMPLEX*16
           On entry, ALPHA specifies the scalar alpha.
[in]A
          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
           Before entry with  UPLO = 'U' or 'u', the leading n by n
           upper triangular part of the array A must contain the upper
           triangular part of the hermitian matrix and the strictly
           lower triangular part of A is not referenced.
           Before entry with UPLO = 'L' or 'l', the leading n by n
           lower triangular part of the array A must contain the lower
           triangular part of the hermitian matrix and the strictly
           upper triangular part of A is not referenced.
           Note that the imaginary parts of the diagonal elements need
           not be set and are assumed to be zero.
[in]LDA
          LDA is INTEGER
           On entry, LDA specifies the first dimension of A as declared
           in the calling (sub) program. LDA must be at least
           max( 1, n ).
[in]X
          X is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the n
           element vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
[in]BETA
          BETA is COMPLEX*16
           On entry, BETA specifies the scalar beta. When BETA is
           supplied as zero then Y need not be set on input.
[in,out]Y
          Y is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCY ) ).
           Before entry, the incremented array Y must contain the n
           element vector y. On exit, Y is overwritten by the updated
           vector y.
[in]INCY
          INCY is INTEGER
           On entry, INCY specifies the increment for the elements of
           Y. INCY must not be zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.
  The vector and matrix arguments are not referenced when N = 0, or M = 0

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 156 of file zhemv.f.

156 *
157 * -- Reference BLAS level2 routine (version 3.4.0) --
158 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
159 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
160 * November 2011
161 *
162 * .. Scalar Arguments ..
163  COMPLEX*16 alpha,beta
164  INTEGER incx,incy,lda,n
165  CHARACTER uplo
166 * ..
167 * .. Array Arguments ..
168  COMPLEX*16 a(lda,*),x(*),y(*)
169 * ..
170 *
171 * =====================================================================
172 *
173 * .. Parameters ..
174  COMPLEX*16 one
175  parameter(one= (1.0d+0,0.0d+0))
176  COMPLEX*16 zero
177  parameter(zero= (0.0d+0,0.0d+0))
178 * ..
179 * .. Local Scalars ..
180  COMPLEX*16 temp1,temp2
181  INTEGER i,info,ix,iy,j,jx,jy,kx,ky
182 * ..
183 * .. External Functions ..
184  LOGICAL lsame
185  EXTERNAL lsame
186 * ..
187 * .. External Subroutines ..
188  EXTERNAL xerbla
189 * ..
190 * .. Intrinsic Functions ..
191  INTRINSIC dble,dconjg,max
192 * ..
193 *
194 * Test the input parameters.
195 *
196  info = 0
197  IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN
198  info = 1
199  ELSE IF (n.LT.0) THEN
200  info = 2
201  ELSE IF (lda.LT.max(1,n)) THEN
202  info = 5
203  ELSE IF (incx.EQ.0) THEN
204  info = 7
205  ELSE IF (incy.EQ.0) THEN
206  info = 10
207  END IF
208  IF (info.NE.0) THEN
209  CALL xerbla('ZHEMV ',info)
210  RETURN
211  END IF
212 *
213 * Quick return if possible.
214 *
215  IF ((n.EQ.0) .OR. ((alpha.EQ.zero).AND. (beta.EQ.one))) RETURN
216 *
217 * Set up the start points in X and Y.
218 *
219  IF (incx.GT.0) THEN
220  kx = 1
221  ELSE
222  kx = 1 - (n-1)*incx
223  END IF
224  IF (incy.GT.0) THEN
225  ky = 1
226  ELSE
227  ky = 1 - (n-1)*incy
228  END IF
229 *
230 * Start the operations. In this version the elements of A are
231 * accessed sequentially with one pass through the triangular part
232 * of A.
233 *
234 * First form y := beta*y.
235 *
236  IF (beta.NE.one) THEN
237  IF (incy.EQ.1) THEN
238  IF (beta.EQ.zero) THEN
239  DO 10 i = 1,n
240  y(i) = zero
241  10 CONTINUE
242  ELSE
243  DO 20 i = 1,n
244  y(i) = beta*y(i)
245  20 CONTINUE
246  END IF
247  ELSE
248  iy = ky
249  IF (beta.EQ.zero) THEN
250  DO 30 i = 1,n
251  y(iy) = zero
252  iy = iy + incy
253  30 CONTINUE
254  ELSE
255  DO 40 i = 1,n
256  y(iy) = beta*y(iy)
257  iy = iy + incy
258  40 CONTINUE
259  END IF
260  END IF
261  END IF
262  IF (alpha.EQ.zero) RETURN
263  IF (lsame(uplo,'U')) THEN
264 *
265 * Form y when A is stored in upper triangle.
266 *
267  IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN
268  DO 60 j = 1,n
269  temp1 = alpha*x(j)
270  temp2 = zero
271  DO 50 i = 1,j - 1
272  y(i) = y(i) + temp1*a(i,j)
273  temp2 = temp2 + dconjg(a(i,j))*x(i)
274  50 CONTINUE
275  y(j) = y(j) + temp1*dble(a(j,j)) + alpha*temp2
276  60 CONTINUE
277  ELSE
278  jx = kx
279  jy = ky
280  DO 80 j = 1,n
281  temp1 = alpha*x(jx)
282  temp2 = zero
283  ix = kx
284  iy = ky
285  DO 70 i = 1,j - 1
286  y(iy) = y(iy) + temp1*a(i,j)
287  temp2 = temp2 + dconjg(a(i,j))*x(ix)
288  ix = ix + incx
289  iy = iy + incy
290  70 CONTINUE
291  y(jy) = y(jy) + temp1*dble(a(j,j)) + alpha*temp2
292  jx = jx + incx
293  jy = jy + incy
294  80 CONTINUE
295  END IF
296  ELSE
297 *
298 * Form y when A is stored in lower triangle.
299 *
300  IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN
301  DO 100 j = 1,n
302  temp1 = alpha*x(j)
303  temp2 = zero
304  y(j) = y(j) + temp1*dble(a(j,j))
305  DO 90 i = j + 1,n
306  y(i) = y(i) + temp1*a(i,j)
307  temp2 = temp2 + dconjg(a(i,j))*x(i)
308  90 CONTINUE
309  y(j) = y(j) + alpha*temp2
310  100 CONTINUE
311  ELSE
312  jx = kx
313  jy = ky
314  DO 120 j = 1,n
315  temp1 = alpha*x(jx)
316  temp2 = zero
317  y(jy) = y(jy) + temp1*dble(a(j,j))
318  ix = jx
319  iy = jy
320  DO 110 i = j + 1,n
321  ix = ix + incx
322  iy = iy + incy
323  y(iy) = y(iy) + temp1*a(i,j)
324  temp2 = temp2 + dconjg(a(i,j))*x(ix)
325  110 CONTINUE
326  y(jy) = y(jy) + alpha*temp2
327  jx = jx + incx
328  jy = jy + incy
329  120 CONTINUE
330  END IF
331  END IF
332 *
333  RETURN
334 *
335 * End of ZHEMV .
336 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine zher ( character  UPLO,
integer  N,
double precision  ALPHA,
complex*16, dimension(*)  X,
integer  INCX,
complex*16, dimension(lda,*)  A,
integer  LDA 
)

ZHER

Purpose:
 ZHER   performs the hermitian rank 1 operation

    A := alpha*x*x**H + A,

 where alpha is a real scalar, x is an n element vector and A is an
 n by n hermitian matrix.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
           On entry, UPLO specifies whether the upper or lower
           triangular part of the array A is to be referenced as
           follows:

              UPLO = 'U' or 'u'   Only the upper triangular part of A
                                  is to be referenced.

              UPLO = 'L' or 'l'   Only the lower triangular part of A
                                  is to be referenced.
[in]N
          N is INTEGER
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
[in]ALPHA
          ALPHA is DOUBLE PRECISION.
           On entry, ALPHA specifies the scalar alpha.
[in]X
          X is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the n
           element vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
[in,out]A
          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
           Before entry with  UPLO = 'U' or 'u', the leading n by n
           upper triangular part of the array A must contain the upper
           triangular part of the hermitian matrix and the strictly
           lower triangular part of A is not referenced. On exit, the
           upper triangular part of the array A is overwritten by the
           upper triangular part of the updated matrix.
           Before entry with UPLO = 'L' or 'l', the leading n by n
           lower triangular part of the array A must contain the lower
           triangular part of the hermitian matrix and the strictly
           upper triangular part of A is not referenced. On exit, the
           lower triangular part of the array A is overwritten by the
           lower triangular part of the updated matrix.
           Note that the imaginary parts of the diagonal elements need
           not be set, they are assumed to be zero, and on exit they
           are set to zero.
[in]LDA
          LDA is INTEGER
           On entry, LDA specifies the first dimension of A as declared
           in the calling (sub) program. LDA must be at least
           max( 1, n ).
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 137 of file zher.f.

137 *
138 * -- Reference BLAS level2 routine (version 3.4.0) --
139 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
140 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
141 * November 2011
142 *
143 * .. Scalar Arguments ..
144  DOUBLE PRECISION alpha
145  INTEGER incx,lda,n
146  CHARACTER uplo
147 * ..
148 * .. Array Arguments ..
149  COMPLEX*16 a(lda,*),x(*)
150 * ..
151 *
152 * =====================================================================
153 *
154 * .. Parameters ..
155  COMPLEX*16 zero
156  parameter(zero= (0.0d+0,0.0d+0))
157 * ..
158 * .. Local Scalars ..
159  COMPLEX*16 temp
160  INTEGER i,info,ix,j,jx,kx
161 * ..
162 * .. External Functions ..
163  LOGICAL lsame
164  EXTERNAL lsame
165 * ..
166 * .. External Subroutines ..
167  EXTERNAL xerbla
168 * ..
169 * .. Intrinsic Functions ..
170  INTRINSIC dble,dconjg,max
171 * ..
172 *
173 * Test the input parameters.
174 *
175  info = 0
176  IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN
177  info = 1
178  ELSE IF (n.LT.0) THEN
179  info = 2
180  ELSE IF (incx.EQ.0) THEN
181  info = 5
182  ELSE IF (lda.LT.max(1,n)) THEN
183  info = 7
184  END IF
185  IF (info.NE.0) THEN
186  CALL xerbla('ZHER ',info)
187  RETURN
188  END IF
189 *
190 * Quick return if possible.
191 *
192  IF ((n.EQ.0) .OR. (alpha.EQ.dble(zero))) RETURN
193 *
194 * Set the start point in X if the increment is not unity.
195 *
196  IF (incx.LE.0) THEN
197  kx = 1 - (n-1)*incx
198  ELSE IF (incx.NE.1) THEN
199  kx = 1
200  END IF
201 *
202 * Start the operations. In this version the elements of A are
203 * accessed sequentially with one pass through the triangular part
204 * of A.
205 *
206  IF (lsame(uplo,'U')) THEN
207 *
208 * Form A when A is stored in upper triangle.
209 *
210  IF (incx.EQ.1) THEN
211  DO 20 j = 1,n
212  IF (x(j).NE.zero) THEN
213  temp = alpha*dconjg(x(j))
214  DO 10 i = 1,j - 1
215  a(i,j) = a(i,j) + x(i)*temp
216  10 CONTINUE
217  a(j,j) = dble(a(j,j)) + dble(x(j)*temp)
218  ELSE
219  a(j,j) = dble(a(j,j))
220  END IF
221  20 CONTINUE
222  ELSE
223  jx = kx
224  DO 40 j = 1,n
225  IF (x(jx).NE.zero) THEN
226  temp = alpha*dconjg(x(jx))
227  ix = kx
228  DO 30 i = 1,j - 1
229  a(i,j) = a(i,j) + x(ix)*temp
230  ix = ix + incx
231  30 CONTINUE
232  a(j,j) = dble(a(j,j)) + dble(x(jx)*temp)
233  ELSE
234  a(j,j) = dble(a(j,j))
235  END IF
236  jx = jx + incx
237  40 CONTINUE
238  END IF
239  ELSE
240 *
241 * Form A when A is stored in lower triangle.
242 *
243  IF (incx.EQ.1) THEN
244  DO 60 j = 1,n
245  IF (x(j).NE.zero) THEN
246  temp = alpha*dconjg(x(j))
247  a(j,j) = dble(a(j,j)) + dble(temp*x(j))
248  DO 50 i = j + 1,n
249  a(i,j) = a(i,j) + x(i)*temp
250  50 CONTINUE
251  ELSE
252  a(j,j) = dble(a(j,j))
253  END IF
254  60 CONTINUE
255  ELSE
256  jx = kx
257  DO 80 j = 1,n
258  IF (x(jx).NE.zero) THEN
259  temp = alpha*dconjg(x(jx))
260  a(j,j) = dble(a(j,j)) + dble(temp*x(jx))
261  ix = jx
262  DO 70 i = j + 1,n
263  ix = ix + incx
264  a(i,j) = a(i,j) + x(ix)*temp
265  70 CONTINUE
266  ELSE
267  a(j,j) = dble(a(j,j))
268  END IF
269  jx = jx + incx
270  80 CONTINUE
271  END IF
272  END IF
273 *
274  RETURN
275 *
276 * End of ZHER .
277 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine zher2 ( character  UPLO,
integer  N,
complex*16  ALPHA,
complex*16, dimension(*)  X,
integer  INCX,
complex*16, dimension(*)  Y,
integer  INCY,
complex*16, dimension(lda,*)  A,
integer  LDA 
)

ZHER2

Purpose:
 ZHER2  performs the hermitian rank 2 operation

    A := alpha*x*y**H + conjg( alpha )*y*x**H + A,

 where alpha is a scalar, x and y are n element vectors and A is an n
 by n hermitian matrix.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
           On entry, UPLO specifies whether the upper or lower
           triangular part of the array A is to be referenced as
           follows:

              UPLO = 'U' or 'u'   Only the upper triangular part of A
                                  is to be referenced.

              UPLO = 'L' or 'l'   Only the lower triangular part of A
                                  is to be referenced.
[in]N
          N is INTEGER
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
[in]ALPHA
          ALPHA is COMPLEX*16
           On entry, ALPHA specifies the scalar alpha.
[in]X
          X is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the n
           element vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
[in]Y
          Y is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCY ) ).
           Before entry, the incremented array Y must contain the n
           element vector y.
[in]INCY
          INCY is INTEGER
           On entry, INCY specifies the increment for the elements of
           Y. INCY must not be zero.
[in,out]A
          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
           Before entry with  UPLO = 'U' or 'u', the leading n by n
           upper triangular part of the array A must contain the upper
           triangular part of the hermitian matrix and the strictly
           lower triangular part of A is not referenced. On exit, the
           upper triangular part of the array A is overwritten by the
           upper triangular part of the updated matrix.
           Before entry with UPLO = 'L' or 'l', the leading n by n
           lower triangular part of the array A must contain the lower
           triangular part of the hermitian matrix and the strictly
           upper triangular part of A is not referenced. On exit, the
           lower triangular part of the array A is overwritten by the
           lower triangular part of the updated matrix.
           Note that the imaginary parts of the diagonal elements need
           not be set, they are assumed to be zero, and on exit they
           are set to zero.
[in]LDA
          LDA is INTEGER
           On entry, LDA specifies the first dimension of A as declared
           in the calling (sub) program. LDA must be at least
           max( 1, n ).
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 152 of file zher2.f.

152 *
153 * -- Reference BLAS level2 routine (version 3.4.0) --
154 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
155 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
156 * November 2011
157 *
158 * .. Scalar Arguments ..
159  COMPLEX*16 alpha
160  INTEGER incx,incy,lda,n
161  CHARACTER uplo
162 * ..
163 * .. Array Arguments ..
164  COMPLEX*16 a(lda,*),x(*),y(*)
165 * ..
166 *
167 * =====================================================================
168 *
169 * .. Parameters ..
170  COMPLEX*16 zero
171  parameter(zero= (0.0d+0,0.0d+0))
172 * ..
173 * .. Local Scalars ..
174  COMPLEX*16 temp1,temp2
175  INTEGER i,info,ix,iy,j,jx,jy,kx,ky
176 * ..
177 * .. External Functions ..
178  LOGICAL lsame
179  EXTERNAL lsame
180 * ..
181 * .. External Subroutines ..
182  EXTERNAL xerbla
183 * ..
184 * .. Intrinsic Functions ..
185  INTRINSIC dble,dconjg,max
186 * ..
187 *
188 * Test the input parameters.
189 *
190  info = 0
191  IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN
192  info = 1
193  ELSE IF (n.LT.0) THEN
194  info = 2
195  ELSE IF (incx.EQ.0) THEN
196  info = 5
197  ELSE IF (incy.EQ.0) THEN
198  info = 7
199  ELSE IF (lda.LT.max(1,n)) THEN
200  info = 9
201  END IF
202  IF (info.NE.0) THEN
203  CALL xerbla('ZHER2 ',info)
204  RETURN
205  END IF
206 *
207 * Quick return if possible.
208 *
209  IF ((n.EQ.0) .OR. (alpha.EQ.zero)) RETURN
210 *
211 * Set up the start points in X and Y if the increments are not both
212 * unity.
213 *
214  IF ((incx.NE.1) .OR. (incy.NE.1)) THEN
215  IF (incx.GT.0) THEN
216  kx = 1
217  ELSE
218  kx = 1 - (n-1)*incx
219  END IF
220  IF (incy.GT.0) THEN
221  ky = 1
222  ELSE
223  ky = 1 - (n-1)*incy
224  END IF
225  jx = kx
226  jy = ky
227  END IF
228 *
229 * Start the operations. In this version the elements of A are
230 * accessed sequentially with one pass through the triangular part
231 * of A.
232 *
233  IF (lsame(uplo,'U')) THEN
234 *
235 * Form A when A is stored in the upper triangle.
236 *
237  IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN
238  DO 20 j = 1,n
239  IF ((x(j).NE.zero) .OR. (y(j).NE.zero)) THEN
240  temp1 = alpha*dconjg(y(j))
241  temp2 = dconjg(alpha*x(j))
242  DO 10 i = 1,j - 1
243  a(i,j) = a(i,j) + x(i)*temp1 + y(i)*temp2
244  10 CONTINUE
245  a(j,j) = dble(a(j,j)) +
246  + dble(x(j)*temp1+y(j)*temp2)
247  ELSE
248  a(j,j) = dble(a(j,j))
249  END IF
250  20 CONTINUE
251  ELSE
252  DO 40 j = 1,n
253  IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero)) THEN
254  temp1 = alpha*dconjg(y(jy))
255  temp2 = dconjg(alpha*x(jx))
256  ix = kx
257  iy = ky
258  DO 30 i = 1,j - 1
259  a(i,j) = a(i,j) + x(ix)*temp1 + y(iy)*temp2
260  ix = ix + incx
261  iy = iy + incy
262  30 CONTINUE
263  a(j,j) = dble(a(j,j)) +
264  + dble(x(jx)*temp1+y(jy)*temp2)
265  ELSE
266  a(j,j) = dble(a(j,j))
267  END IF
268  jx = jx + incx
269  jy = jy + incy
270  40 CONTINUE
271  END IF
272  ELSE
273 *
274 * Form A when A is stored in the lower triangle.
275 *
276  IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN
277  DO 60 j = 1,n
278  IF ((x(j).NE.zero) .OR. (y(j).NE.zero)) THEN
279  temp1 = alpha*dconjg(y(j))
280  temp2 = dconjg(alpha*x(j))
281  a(j,j) = dble(a(j,j)) +
282  + dble(x(j)*temp1+y(j)*temp2)
283  DO 50 i = j + 1,n
284  a(i,j) = a(i,j) + x(i)*temp1 + y(i)*temp2
285  50 CONTINUE
286  ELSE
287  a(j,j) = dble(a(j,j))
288  END IF
289  60 CONTINUE
290  ELSE
291  DO 80 j = 1,n
292  IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero)) THEN
293  temp1 = alpha*dconjg(y(jy))
294  temp2 = dconjg(alpha*x(jx))
295  a(j,j) = dble(a(j,j)) +
296  + dble(x(jx)*temp1+y(jy)*temp2)
297  ix = jx
298  iy = jy
299  DO 70 i = j + 1,n
300  ix = ix + incx
301  iy = iy + incy
302  a(i,j) = a(i,j) + x(ix)*temp1 + y(iy)*temp2
303  70 CONTINUE
304  ELSE
305  a(j,j) = dble(a(j,j))
306  END IF
307  jx = jx + incx
308  jy = jy + incy
309  80 CONTINUE
310  END IF
311  END IF
312 *
313  RETURN
314 *
315 * End of ZHER2 .
316 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine zhpmv ( character  UPLO,
integer  N,
complex*16  ALPHA,
complex*16, dimension(*)  AP,
complex*16, dimension(*)  X,
integer  INCX,
complex*16  BETA,
complex*16, dimension(*)  Y,
integer  INCY 
)

ZHPMV

Purpose:
 ZHPMV  performs the matrix-vector operation

    y := alpha*A*x + beta*y,

 where alpha and beta are scalars, x and y are n element vectors and
 A is an n by n hermitian matrix, supplied in packed form.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
           On entry, UPLO specifies whether the upper or lower
           triangular part of the matrix A is supplied in the packed
           array AP as follows:

              UPLO = 'U' or 'u'   The upper triangular part of A is
                                  supplied in AP.

              UPLO = 'L' or 'l'   The lower triangular part of A is
                                  supplied in AP.
[in]N
          N is INTEGER
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
[in]ALPHA
          ALPHA is COMPLEX*16
           On entry, ALPHA specifies the scalar alpha.
[in]AP
          AP is COMPLEX*16 array of DIMENSION at least
           ( ( n*( n + 1 ) )/2 ).
           Before entry with UPLO = 'U' or 'u', the array AP must
           contain the upper triangular part of the hermitian matrix
           packed sequentially, column by column, so that AP( 1 )
           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
           and a( 2, 2 ) respectively, and so on.
           Before entry with UPLO = 'L' or 'l', the array AP must
           contain the lower triangular part of the hermitian matrix
           packed sequentially, column by column, so that AP( 1 )
           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
           and a( 3, 1 ) respectively, and so on.
           Note that the imaginary parts of the diagonal elements need
           not be set and are assumed to be zero.
[in]X
          X is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the n
           element vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
[in]BETA
          BETA is COMPLEX*16
           On entry, BETA specifies the scalar beta. When BETA is
           supplied as zero then Y need not be set on input.
[in,out]Y
          Y is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCY ) ).
           Before entry, the incremented array Y must contain the n
           element vector y. On exit, Y is overwritten by the updated
           vector y.
[in]INCY
          INCY is INTEGER
           On entry, INCY specifies the increment for the elements of
           Y. INCY must not be zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.
  The vector and matrix arguments are not referenced when N = 0, or M = 0

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 151 of file zhpmv.f.

151 *
152 * -- Reference BLAS level2 routine (version 3.4.0) --
153 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
154 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
155 * November 2011
156 *
157 * .. Scalar Arguments ..
158  COMPLEX*16 alpha,beta
159  INTEGER incx,incy,n
160  CHARACTER uplo
161 * ..
162 * .. Array Arguments ..
163  COMPLEX*16 ap(*),x(*),y(*)
164 * ..
165 *
166 * =====================================================================
167 *
168 * .. Parameters ..
169  COMPLEX*16 one
170  parameter(one= (1.0d+0,0.0d+0))
171  COMPLEX*16 zero
172  parameter(zero= (0.0d+0,0.0d+0))
173 * ..
174 * .. Local Scalars ..
175  COMPLEX*16 temp1,temp2
176  INTEGER i,info,ix,iy,j,jx,jy,k,kk,kx,ky
177 * ..
178 * .. External Functions ..
179  LOGICAL lsame
180  EXTERNAL lsame
181 * ..
182 * .. External Subroutines ..
183  EXTERNAL xerbla
184 * ..
185 * .. Intrinsic Functions ..
186  INTRINSIC dble,dconjg
187 * ..
188 *
189 * Test the input parameters.
190 *
191  info = 0
192  IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN
193  info = 1
194  ELSE IF (n.LT.0) THEN
195  info = 2
196  ELSE IF (incx.EQ.0) THEN
197  info = 6
198  ELSE IF (incy.EQ.0) THEN
199  info = 9
200  END IF
201  IF (info.NE.0) THEN
202  CALL xerbla('ZHPMV ',info)
203  RETURN
204  END IF
205 *
206 * Quick return if possible.
207 *
208  IF ((n.EQ.0) .OR. ((alpha.EQ.zero).AND. (beta.EQ.one))) RETURN
209 *
210 * Set up the start points in X and Y.
211 *
212  IF (incx.GT.0) THEN
213  kx = 1
214  ELSE
215  kx = 1 - (n-1)*incx
216  END IF
217  IF (incy.GT.0) THEN
218  ky = 1
219  ELSE
220  ky = 1 - (n-1)*incy
221  END IF
222 *
223 * Start the operations. In this version the elements of the array AP
224 * are accessed sequentially with one pass through AP.
225 *
226 * First form y := beta*y.
227 *
228  IF (beta.NE.one) THEN
229  IF (incy.EQ.1) THEN
230  IF (beta.EQ.zero) THEN
231  DO 10 i = 1,n
232  y(i) = zero
233  10 CONTINUE
234  ELSE
235  DO 20 i = 1,n
236  y(i) = beta*y(i)
237  20 CONTINUE
238  END IF
239  ELSE
240  iy = ky
241  IF (beta.EQ.zero) THEN
242  DO 30 i = 1,n
243  y(iy) = zero
244  iy = iy + incy
245  30 CONTINUE
246  ELSE
247  DO 40 i = 1,n
248  y(iy) = beta*y(iy)
249  iy = iy + incy
250  40 CONTINUE
251  END IF
252  END IF
253  END IF
254  IF (alpha.EQ.zero) RETURN
255  kk = 1
256  IF (lsame(uplo,'U')) THEN
257 *
258 * Form y when AP contains the upper triangle.
259 *
260  IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN
261  DO 60 j = 1,n
262  temp1 = alpha*x(j)
263  temp2 = zero
264  k = kk
265  DO 50 i = 1,j - 1
266  y(i) = y(i) + temp1*ap(k)
267  temp2 = temp2 + dconjg(ap(k))*x(i)
268  k = k + 1
269  50 CONTINUE
270  y(j) = y(j) + temp1*dble(ap(kk+j-1)) + alpha*temp2
271  kk = kk + j
272  60 CONTINUE
273  ELSE
274  jx = kx
275  jy = ky
276  DO 80 j = 1,n
277  temp1 = alpha*x(jx)
278  temp2 = zero
279  ix = kx
280  iy = ky
281  DO 70 k = kk,kk + j - 2
282  y(iy) = y(iy) + temp1*ap(k)
283  temp2 = temp2 + dconjg(ap(k))*x(ix)
284  ix = ix + incx
285  iy = iy + incy
286  70 CONTINUE
287  y(jy) = y(jy) + temp1*dble(ap(kk+j-1)) + alpha*temp2
288  jx = jx + incx
289  jy = jy + incy
290  kk = kk + j
291  80 CONTINUE
292  END IF
293  ELSE
294 *
295 * Form y when AP contains the lower triangle.
296 *
297  IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN
298  DO 100 j = 1,n
299  temp1 = alpha*x(j)
300  temp2 = zero
301  y(j) = y(j) + temp1*dble(ap(kk))
302  k = kk + 1
303  DO 90 i = j + 1,n
304  y(i) = y(i) + temp1*ap(k)
305  temp2 = temp2 + dconjg(ap(k))*x(i)
306  k = k + 1
307  90 CONTINUE
308  y(j) = y(j) + alpha*temp2
309  kk = kk + (n-j+1)
310  100 CONTINUE
311  ELSE
312  jx = kx
313  jy = ky
314  DO 120 j = 1,n
315  temp1 = alpha*x(jx)
316  temp2 = zero
317  y(jy) = y(jy) + temp1*dble(ap(kk))
318  ix = jx
319  iy = jy
320  DO 110 k = kk + 1,kk + n - j
321  ix = ix + incx
322  iy = iy + incy
323  y(iy) = y(iy) + temp1*ap(k)
324  temp2 = temp2 + dconjg(ap(k))*x(ix)
325  110 CONTINUE
326  y(jy) = y(jy) + alpha*temp2
327  jx = jx + incx
328  jy = jy + incy
329  kk = kk + (n-j+1)
330  120 CONTINUE
331  END IF
332  END IF
333 *
334  RETURN
335 *
336 * End of ZHPMV .
337 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine zhpr ( character  UPLO,
integer  N,
double precision  ALPHA,
complex*16, dimension(*)  X,
integer  INCX,
complex*16, dimension(*)  AP 
)

ZHPR

Purpose:
 ZHPR    performs the hermitian rank 1 operation

    A := alpha*x*x**H + A,

 where alpha is a real scalar, x is an n element vector and A is an
 n by n hermitian matrix, supplied in packed form.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
           On entry, UPLO specifies whether the upper or lower
           triangular part of the matrix A is supplied in the packed
           array AP as follows:

              UPLO = 'U' or 'u'   The upper triangular part of A is
                                  supplied in AP.

              UPLO = 'L' or 'l'   The lower triangular part of A is
                                  supplied in AP.
[in]N
          N is INTEGER
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
[in]ALPHA
          ALPHA is DOUBLE PRECISION.
           On entry, ALPHA specifies the scalar alpha.
[in]X
          X is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the n
           element vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
[in,out]AP
          AP is COMPLEX*16 array of DIMENSION at least
           ( ( n*( n + 1 ) )/2 ).
           Before entry with  UPLO = 'U' or 'u', the array AP must
           contain the upper triangular part of the hermitian matrix
           packed sequentially, column by column, so that AP( 1 )
           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
           and a( 2, 2 ) respectively, and so on. On exit, the array
           AP is overwritten by the upper triangular part of the
           updated matrix.
           Before entry with UPLO = 'L' or 'l', the array AP must
           contain the lower triangular part of the hermitian matrix
           packed sequentially, column by column, so that AP( 1 )
           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
           and a( 3, 1 ) respectively, and so on. On exit, the array
           AP is overwritten by the lower triangular part of the
           updated matrix.
           Note that the imaginary parts of the diagonal elements need
           not be set, they are assumed to be zero, and on exit they
           are set to zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 132 of file zhpr.f.

132 *
133 * -- Reference BLAS level2 routine (version 3.4.0) --
134 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
135 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
136 * November 2011
137 *
138 * .. Scalar Arguments ..
139  DOUBLE PRECISION alpha
140  INTEGER incx,n
141  CHARACTER uplo
142 * ..
143 * .. Array Arguments ..
144  COMPLEX*16 ap(*),x(*)
145 * ..
146 *
147 * =====================================================================
148 *
149 * .. Parameters ..
150  COMPLEX*16 zero
151  parameter(zero= (0.0d+0,0.0d+0))
152 * ..
153 * .. Local Scalars ..
154  COMPLEX*16 temp
155  INTEGER i,info,ix,j,jx,k,kk,kx
156 * ..
157 * .. External Functions ..
158  LOGICAL lsame
159  EXTERNAL lsame
160 * ..
161 * .. External Subroutines ..
162  EXTERNAL xerbla
163 * ..
164 * .. Intrinsic Functions ..
165  INTRINSIC dble,dconjg
166 * ..
167 *
168 * Test the input parameters.
169 *
170  info = 0
171  IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN
172  info = 1
173  ELSE IF (n.LT.0) THEN
174  info = 2
175  ELSE IF (incx.EQ.0) THEN
176  info = 5
177  END IF
178  IF (info.NE.0) THEN
179  CALL xerbla('ZHPR ',info)
180  RETURN
181  END IF
182 *
183 * Quick return if possible.
184 *
185  IF ((n.EQ.0) .OR. (alpha.EQ.dble(zero))) RETURN
186 *
187 * Set the start point in X if the increment is not unity.
188 *
189  IF (incx.LE.0) THEN
190  kx = 1 - (n-1)*incx
191  ELSE IF (incx.NE.1) THEN
192  kx = 1
193  END IF
194 *
195 * Start the operations. In this version the elements of the array AP
196 * are accessed sequentially with one pass through AP.
197 *
198  kk = 1
199  IF (lsame(uplo,'U')) THEN
200 *
201 * Form A when upper triangle is stored in AP.
202 *
203  IF (incx.EQ.1) THEN
204  DO 20 j = 1,n
205  IF (x(j).NE.zero) THEN
206  temp = alpha*dconjg(x(j))
207  k = kk
208  DO 10 i = 1,j - 1
209  ap(k) = ap(k) + x(i)*temp
210  k = k + 1
211  10 CONTINUE
212  ap(kk+j-1) = dble(ap(kk+j-1)) + dble(x(j)*temp)
213  ELSE
214  ap(kk+j-1) = dble(ap(kk+j-1))
215  END IF
216  kk = kk + j
217  20 CONTINUE
218  ELSE
219  jx = kx
220  DO 40 j = 1,n
221  IF (x(jx).NE.zero) THEN
222  temp = alpha*dconjg(x(jx))
223  ix = kx
224  DO 30 k = kk,kk + j - 2
225  ap(k) = ap(k) + x(ix)*temp
226  ix = ix + incx
227  30 CONTINUE
228  ap(kk+j-1) = dble(ap(kk+j-1)) + dble(x(jx)*temp)
229  ELSE
230  ap(kk+j-1) = dble(ap(kk+j-1))
231  END IF
232  jx = jx + incx
233  kk = kk + j
234  40 CONTINUE
235  END IF
236  ELSE
237 *
238 * Form A when lower triangle is stored in AP.
239 *
240  IF (incx.EQ.1) THEN
241  DO 60 j = 1,n
242  IF (x(j).NE.zero) THEN
243  temp = alpha*dconjg(x(j))
244  ap(kk) = dble(ap(kk)) + dble(temp*x(j))
245  k = kk + 1
246  DO 50 i = j + 1,n
247  ap(k) = ap(k) + x(i)*temp
248  k = k + 1
249  50 CONTINUE
250  ELSE
251  ap(kk) = dble(ap(kk))
252  END IF
253  kk = kk + n - j + 1
254  60 CONTINUE
255  ELSE
256  jx = kx
257  DO 80 j = 1,n
258  IF (x(jx).NE.zero) THEN
259  temp = alpha*dconjg(x(jx))
260  ap(kk) = dble(ap(kk)) + dble(temp*x(jx))
261  ix = jx
262  DO 70 k = kk + 1,kk + n - j
263  ix = ix + incx
264  ap(k) = ap(k) + x(ix)*temp
265  70 CONTINUE
266  ELSE
267  ap(kk) = dble(ap(kk))
268  END IF
269  jx = jx + incx
270  kk = kk + n - j + 1
271  80 CONTINUE
272  END IF
273  END IF
274 *
275  RETURN
276 *
277 * End of ZHPR .
278 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine zhpr2 ( character  UPLO,
integer  N,
complex*16  ALPHA,
complex*16, dimension(*)  X,
integer  INCX,
complex*16, dimension(*)  Y,
integer  INCY,
complex*16, dimension(*)  AP 
)

ZHPR2

Purpose:
 ZHPR2  performs the hermitian rank 2 operation

    A := alpha*x*y**H + conjg( alpha )*y*x**H + A,

 where alpha is a scalar, x and y are n element vectors and A is an
 n by n hermitian matrix, supplied in packed form.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
           On entry, UPLO specifies whether the upper or lower
           triangular part of the matrix A is supplied in the packed
           array AP as follows:

              UPLO = 'U' or 'u'   The upper triangular part of A is
                                  supplied in AP.

              UPLO = 'L' or 'l'   The lower triangular part of A is
                                  supplied in AP.
[in]N
          N is INTEGER
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
[in]ALPHA
          ALPHA is COMPLEX*16
           On entry, ALPHA specifies the scalar alpha.
[in]X
          X is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the n
           element vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
[in]Y
          Y is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCY ) ).
           Before entry, the incremented array Y must contain the n
           element vector y.
[in]INCY
          INCY is INTEGER
           On entry, INCY specifies the increment for the elements of
           Y. INCY must not be zero.
[in,out]AP
          AP is COMPLEX*16 array of DIMENSION at least
           ( ( n*( n + 1 ) )/2 ).
           Before entry with  UPLO = 'U' or 'u', the array AP must
           contain the upper triangular part of the hermitian matrix
           packed sequentially, column by column, so that AP( 1 )
           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
           and a( 2, 2 ) respectively, and so on. On exit, the array
           AP is overwritten by the upper triangular part of the
           updated matrix.
           Before entry with UPLO = 'L' or 'l', the array AP must
           contain the lower triangular part of the hermitian matrix
           packed sequentially, column by column, so that AP( 1 )
           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
           and a( 3, 1 ) respectively, and so on. On exit, the array
           AP is overwritten by the lower triangular part of the
           updated matrix.
           Note that the imaginary parts of the diagonal elements need
           not be set, they are assumed to be zero, and on exit they
           are set to zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 147 of file zhpr2.f.

147 *
148 * -- Reference BLAS level2 routine (version 3.4.0) --
149 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
150 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
151 * November 2011
152 *
153 * .. Scalar Arguments ..
154  COMPLEX*16 alpha
155  INTEGER incx,incy,n
156  CHARACTER uplo
157 * ..
158 * .. Array Arguments ..
159  COMPLEX*16 ap(*),x(*),y(*)
160 * ..
161 *
162 * =====================================================================
163 *
164 * .. Parameters ..
165  COMPLEX*16 zero
166  parameter(zero= (0.0d+0,0.0d+0))
167 * ..
168 * .. Local Scalars ..
169  COMPLEX*16 temp1,temp2
170  INTEGER i,info,ix,iy,j,jx,jy,k,kk,kx,ky
171 * ..
172 * .. External Functions ..
173  LOGICAL lsame
174  EXTERNAL lsame
175 * ..
176 * .. External Subroutines ..
177  EXTERNAL xerbla
178 * ..
179 * .. Intrinsic Functions ..
180  INTRINSIC dble,dconjg
181 * ..
182 *
183 * Test the input parameters.
184 *
185  info = 0
186  IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN
187  info = 1
188  ELSE IF (n.LT.0) THEN
189  info = 2
190  ELSE IF (incx.EQ.0) THEN
191  info = 5
192  ELSE IF (incy.EQ.0) THEN
193  info = 7
194  END IF
195  IF (info.NE.0) THEN
196  CALL xerbla('ZHPR2 ',info)
197  RETURN
198  END IF
199 *
200 * Quick return if possible.
201 *
202  IF ((n.EQ.0) .OR. (alpha.EQ.zero)) RETURN
203 *
204 * Set up the start points in X and Y if the increments are not both
205 * unity.
206 *
207  IF ((incx.NE.1) .OR. (incy.NE.1)) THEN
208  IF (incx.GT.0) THEN
209  kx = 1
210  ELSE
211  kx = 1 - (n-1)*incx
212  END IF
213  IF (incy.GT.0) THEN
214  ky = 1
215  ELSE
216  ky = 1 - (n-1)*incy
217  END IF
218  jx = kx
219  jy = ky
220  END IF
221 *
222 * Start the operations. In this version the elements of the array AP
223 * are accessed sequentially with one pass through AP.
224 *
225  kk = 1
226  IF (lsame(uplo,'U')) THEN
227 *
228 * Form A when upper triangle is stored in AP.
229 *
230  IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN
231  DO 20 j = 1,n
232  IF ((x(j).NE.zero) .OR. (y(j).NE.zero)) THEN
233  temp1 = alpha*dconjg(y(j))
234  temp2 = dconjg(alpha*x(j))
235  k = kk
236  DO 10 i = 1,j - 1
237  ap(k) = ap(k) + x(i)*temp1 + y(i)*temp2
238  k = k + 1
239  10 CONTINUE
240  ap(kk+j-1) = dble(ap(kk+j-1)) +
241  + dble(x(j)*temp1+y(j)*temp2)
242  ELSE
243  ap(kk+j-1) = dble(ap(kk+j-1))
244  END IF
245  kk = kk + j
246  20 CONTINUE
247  ELSE
248  DO 40 j = 1,n
249  IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero)) THEN
250  temp1 = alpha*dconjg(y(jy))
251  temp2 = dconjg(alpha*x(jx))
252  ix = kx
253  iy = ky
254  DO 30 k = kk,kk + j - 2
255  ap(k) = ap(k) + x(ix)*temp1 + y(iy)*temp2
256  ix = ix + incx
257  iy = iy + incy
258  30 CONTINUE
259  ap(kk+j-1) = dble(ap(kk+j-1)) +
260  + dble(x(jx)*temp1+y(jy)*temp2)
261  ELSE
262  ap(kk+j-1) = dble(ap(kk+j-1))
263  END IF
264  jx = jx + incx
265  jy = jy + incy
266  kk = kk + j
267  40 CONTINUE
268  END IF
269  ELSE
270 *
271 * Form A when lower triangle is stored in AP.
272 *
273  IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN
274  DO 60 j = 1,n
275  IF ((x(j).NE.zero) .OR. (y(j).NE.zero)) THEN
276  temp1 = alpha*dconjg(y(j))
277  temp2 = dconjg(alpha*x(j))
278  ap(kk) = dble(ap(kk)) +
279  + dble(x(j)*temp1+y(j)*temp2)
280  k = kk + 1
281  DO 50 i = j + 1,n
282  ap(k) = ap(k) + x(i)*temp1 + y(i)*temp2
283  k = k + 1
284  50 CONTINUE
285  ELSE
286  ap(kk) = dble(ap(kk))
287  END IF
288  kk = kk + n - j + 1
289  60 CONTINUE
290  ELSE
291  DO 80 j = 1,n
292  IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero)) THEN
293  temp1 = alpha*dconjg(y(jy))
294  temp2 = dconjg(alpha*x(jx))
295  ap(kk) = dble(ap(kk)) +
296  + dble(x(jx)*temp1+y(jy)*temp2)
297  ix = jx
298  iy = jy
299  DO 70 k = kk + 1,kk + n - j
300  ix = ix + incx
301  iy = iy + incy
302  ap(k) = ap(k) + x(ix)*temp1 + y(iy)*temp2
303  70 CONTINUE
304  ELSE
305  ap(kk) = dble(ap(kk))
306  END IF
307  jx = jx + incx
308  jy = jy + incy
309  kk = kk + n - j + 1
310  80 CONTINUE
311  END IF
312  END IF
313 *
314  RETURN
315 *
316 * End of ZHPR2 .
317 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine ztbmv ( character  UPLO,
character  TRANS,
character  DIAG,
integer  N,
integer  K,
complex*16, dimension(lda,*)  A,
integer  LDA,
complex*16, dimension(*)  X,
integer  INCX 
)

ZTBMV

Purpose:
 ZTBMV  performs one of the matrix-vector operations

    x := A*x,   or   x := A**T*x,   or   x := A**H*x,

 where x is an n element vector and  A is an n by n unit, or non-unit,
 upper or lower triangular band matrix, with ( k + 1 ) diagonals.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
           On entry, UPLO specifies whether the matrix is an upper or
           lower triangular matrix as follows:

              UPLO = 'U' or 'u'   A is an upper triangular matrix.

              UPLO = 'L' or 'l'   A is a lower triangular matrix.
[in]TRANS
          TRANS is CHARACTER*1
           On entry, TRANS specifies the operation to be performed as
           follows:

              TRANS = 'N' or 'n'   x := A*x.

              TRANS = 'T' or 't'   x := A**T*x.

              TRANS = 'C' or 'c'   x := A**H*x.
[in]DIAG
          DIAG is CHARACTER*1
           On entry, DIAG specifies whether or not A is unit
           triangular as follows:

              DIAG = 'U' or 'u'   A is assumed to be unit triangular.

              DIAG = 'N' or 'n'   A is not assumed to be unit
                                  triangular.
[in]N
          N is INTEGER
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
[in]K
          K is INTEGER
           On entry with UPLO = 'U' or 'u', K specifies the number of
           super-diagonals of the matrix A.
           On entry with UPLO = 'L' or 'l', K specifies the number of
           sub-diagonals of the matrix A.
           K must satisfy  0 .le. K.
[in]A
          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
           by n part of the array A must contain the upper triangular
           band part of the matrix of coefficients, supplied column by
           column, with the leading diagonal of the matrix in row
           ( k + 1 ) of the array, the first super-diagonal starting at
           position 2 in row k, and so on. The top left k by k triangle
           of the array A is not referenced.
           The following program segment will transfer an upper
           triangular band matrix from conventional full matrix storage
           to band storage:

                 DO 20, J = 1, N
                    M = K + 1 - J
                    DO 10, I = MAX( 1, J - K ), J
                       A( M + I, J ) = matrix( I, J )
              10    CONTINUE
              20 CONTINUE

           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
           by n part of the array A must contain the lower triangular
           band part of the matrix of coefficients, supplied column by
           column, with the leading diagonal of the matrix in row 1 of
           the array, the first sub-diagonal starting at position 1 in
           row 2, and so on. The bottom right k by k triangle of the
           array A is not referenced.
           The following program segment will transfer a lower
           triangular band matrix from conventional full matrix storage
           to band storage:

                 DO 20, J = 1, N
                    M = 1 - J
                    DO 10, I = J, MIN( N, J + K )
                       A( M + I, J ) = matrix( I, J )
              10    CONTINUE
              20 CONTINUE

           Note that when DIAG = 'U' or 'u' the elements of the array A
           corresponding to the diagonal elements of the matrix are not
           referenced, but are assumed to be unity.
[in]LDA
          LDA is INTEGER
           On entry, LDA specifies the first dimension of A as declared
           in the calling (sub) program. LDA must be at least
           ( k + 1 ).
[in]X
          X is (input/output) COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the n
           element vector x. On exit, X is overwritten with the
           tranformed vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.
  The vector and matrix arguments are not referenced when N = 0, or M = 0

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 188 of file ztbmv.f.

188 *
189 * -- Reference BLAS level2 routine (version 3.4.0) --
190 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
191 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
192 * November 2011
193 *
194 * .. Scalar Arguments ..
195  INTEGER incx,k,lda,n
196  CHARACTER diag,trans,uplo
197 * ..
198 * .. Array Arguments ..
199  COMPLEX*16 a(lda,*),x(*)
200 * ..
201 *
202 * =====================================================================
203 *
204 * .. Parameters ..
205  COMPLEX*16 zero
206  parameter(zero= (0.0d+0,0.0d+0))
207 * ..
208 * .. Local Scalars ..
209  COMPLEX*16 temp
210  INTEGER i,info,ix,j,jx,kplus1,kx,l
211  LOGICAL noconj,nounit
212 * ..
213 * .. External Functions ..
214  LOGICAL lsame
215  EXTERNAL lsame
216 * ..
217 * .. External Subroutines ..
218  EXTERNAL xerbla
219 * ..
220 * .. Intrinsic Functions ..
221  INTRINSIC dconjg,max,min
222 * ..
223 *
224 * Test the input parameters.
225 *
226  info = 0
227  IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN
228  info = 1
229  ELSE IF (.NOT.lsame(trans,'N') .AND. .NOT.lsame(trans,'T') .AND.
230  + .NOT.lsame(trans,'C')) THEN
231  info = 2
232  ELSE IF (.NOT.lsame(diag,'U') .AND. .NOT.lsame(diag,'N')) THEN
233  info = 3
234  ELSE IF (n.LT.0) THEN
235  info = 4
236  ELSE IF (k.LT.0) THEN
237  info = 5
238  ELSE IF (lda.LT. (k+1)) THEN
239  info = 7
240  ELSE IF (incx.EQ.0) THEN
241  info = 9
242  END IF
243  IF (info.NE.0) THEN
244  CALL xerbla('ZTBMV ',info)
245  RETURN
246  END IF
247 *
248 * Quick return if possible.
249 *
250  IF (n.EQ.0) RETURN
251 *
252  noconj = lsame(trans,'T')
253  nounit = lsame(diag,'N')
254 *
255 * Set up the start point in X if the increment is not unity. This
256 * will be ( N - 1 )*INCX too small for descending loops.
257 *
258  IF (incx.LE.0) THEN
259  kx = 1 - (n-1)*incx
260  ELSE IF (incx.NE.1) THEN
261  kx = 1
262  END IF
263 *
264 * Start the operations. In this version the elements of A are
265 * accessed sequentially with one pass through A.
266 *
267  IF (lsame(trans,'N')) THEN
268 *
269 * Form x := A*x.
270 *
271  IF (lsame(uplo,'U')) THEN
272  kplus1 = k + 1
273  IF (incx.EQ.1) THEN
274  DO 20 j = 1,n
275  IF (x(j).NE.zero) THEN
276  temp = x(j)
277  l = kplus1 - j
278  DO 10 i = max(1,j-k),j - 1
279  x(i) = x(i) + temp*a(l+i,j)
280  10 CONTINUE
281  IF (nounit) x(j) = x(j)*a(kplus1,j)
282  END IF
283  20 CONTINUE
284  ELSE
285  jx = kx
286  DO 40 j = 1,n
287  IF (x(jx).NE.zero) THEN
288  temp = x(jx)
289  ix = kx
290  l = kplus1 - j
291  DO 30 i = max(1,j-k),j - 1
292  x(ix) = x(ix) + temp*a(l+i,j)
293  ix = ix + incx
294  30 CONTINUE
295  IF (nounit) x(jx) = x(jx)*a(kplus1,j)
296  END IF
297  jx = jx + incx
298  IF (j.GT.k) kx = kx + incx
299  40 CONTINUE
300  END IF
301  ELSE
302  IF (incx.EQ.1) THEN
303  DO 60 j = n,1,-1
304  IF (x(j).NE.zero) THEN
305  temp = x(j)
306  l = 1 - j
307  DO 50 i = min(n,j+k),j + 1,-1
308  x(i) = x(i) + temp*a(l+i,j)
309  50 CONTINUE
310  IF (nounit) x(j) = x(j)*a(1,j)
311  END IF
312  60 CONTINUE
313  ELSE
314  kx = kx + (n-1)*incx
315  jx = kx
316  DO 80 j = n,1,-1
317  IF (x(jx).NE.zero) THEN
318  temp = x(jx)
319  ix = kx
320  l = 1 - j
321  DO 70 i = min(n,j+k),j + 1,-1
322  x(ix) = x(ix) + temp*a(l+i,j)
323  ix = ix - incx
324  70 CONTINUE
325  IF (nounit) x(jx) = x(jx)*a(1,j)
326  END IF
327  jx = jx - incx
328  IF ((n-j).GE.k) kx = kx - incx
329  80 CONTINUE
330  END IF
331  END IF
332  ELSE
333 *
334 * Form x := A**T*x or x := A**H*x.
335 *
336  IF (lsame(uplo,'U')) THEN
337  kplus1 = k + 1
338  IF (incx.EQ.1) THEN
339  DO 110 j = n,1,-1
340  temp = x(j)
341  l = kplus1 - j
342  IF (noconj) THEN
343  IF (nounit) temp = temp*a(kplus1,j)
344  DO 90 i = j - 1,max(1,j-k),-1
345  temp = temp + a(l+i,j)*x(i)
346  90 CONTINUE
347  ELSE
348  IF (nounit) temp = temp*dconjg(a(kplus1,j))
349  DO 100 i = j - 1,max(1,j-k),-1
350  temp = temp + dconjg(a(l+i,j))*x(i)
351  100 CONTINUE
352  END IF
353  x(j) = temp
354  110 CONTINUE
355  ELSE
356  kx = kx + (n-1)*incx
357  jx = kx
358  DO 140 j = n,1,-1
359  temp = x(jx)
360  kx = kx - incx
361  ix = kx
362  l = kplus1 - j
363  IF (noconj) THEN
364  IF (nounit) temp = temp*a(kplus1,j)
365  DO 120 i = j - 1,max(1,j-k),-1
366  temp = temp + a(l+i,j)*x(ix)
367  ix = ix - incx
368  120 CONTINUE
369  ELSE
370  IF (nounit) temp = temp*dconjg(a(kplus1,j))
371  DO 130 i = j - 1,max(1,j-k),-1
372  temp = temp + dconjg(a(l+i,j))*x(ix)
373  ix = ix - incx
374  130 CONTINUE
375  END IF
376  x(jx) = temp
377  jx = jx - incx
378  140 CONTINUE
379  END IF
380  ELSE
381  IF (incx.EQ.1) THEN
382  DO 170 j = 1,n
383  temp = x(j)
384  l = 1 - j
385  IF (noconj) THEN
386  IF (nounit) temp = temp*a(1,j)
387  DO 150 i = j + 1,min(n,j+k)
388  temp = temp + a(l+i,j)*x(i)
389  150 CONTINUE
390  ELSE
391  IF (nounit) temp = temp*dconjg(a(1,j))
392  DO 160 i = j + 1,min(n,j+k)
393  temp = temp + dconjg(a(l+i,j))*x(i)
394  160 CONTINUE
395  END IF
396  x(j) = temp
397  170 CONTINUE
398  ELSE
399  jx = kx
400  DO 200 j = 1,n
401  temp = x(jx)
402  kx = kx + incx
403  ix = kx
404  l = 1 - j
405  IF (noconj) THEN
406  IF (nounit) temp = temp*a(1,j)
407  DO 180 i = j + 1,min(n,j+k)
408  temp = temp + a(l+i,j)*x(ix)
409  ix = ix + incx
410  180 CONTINUE
411  ELSE
412  IF (nounit) temp = temp*dconjg(a(1,j))
413  DO 190 i = j + 1,min(n,j+k)
414  temp = temp + dconjg(a(l+i,j))*x(ix)
415  ix = ix + incx
416  190 CONTINUE
417  END IF
418  x(jx) = temp
419  jx = jx + incx
420  200 CONTINUE
421  END IF
422  END IF
423  END IF
424 *
425  RETURN
426 *
427 * End of ZTBMV .
428 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine ztbsv ( character  UPLO,
character  TRANS,
character  DIAG,
integer  N,
integer  K,
complex*16, dimension(lda,*)  A,
integer  LDA,
complex*16, dimension(*)  X,
integer  INCX 
)

ZTBSV

Purpose:
 ZTBSV  solves one of the systems of equations

    A*x = b,   or   A**T*x = b,   or   A**H*x = b,

 where b and x are n element vectors and A is an n by n unit, or
 non-unit, upper or lower triangular band matrix, with ( k + 1 )
 diagonals.

 No test for singularity or near-singularity is included in this
 routine. Such tests must be performed before calling this routine.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
           On entry, UPLO specifies whether the matrix is an upper or
           lower triangular matrix as follows:

              UPLO = 'U' or 'u'   A is an upper triangular matrix.

              UPLO = 'L' or 'l'   A is a lower triangular matrix.
[in]TRANS
          TRANS is CHARACTER*1
           On entry, TRANS specifies the equations to be solved as
           follows:

              TRANS = 'N' or 'n'   A*x = b.

              TRANS = 'T' or 't'   A**T*x = b.

              TRANS = 'C' or 'c'   A**H*x = b.
[in]DIAG
          DIAG is CHARACTER*1
           On entry, DIAG specifies whether or not A is unit
           triangular as follows:

              DIAG = 'U' or 'u'   A is assumed to be unit triangular.

              DIAG = 'N' or 'n'   A is not assumed to be unit
                                  triangular.
[in]N
          N is INTEGER
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
[in]K
          K is INTEGER
           On entry with UPLO = 'U' or 'u', K specifies the number of
           super-diagonals of the matrix A.
           On entry with UPLO = 'L' or 'l', K specifies the number of
           sub-diagonals of the matrix A.
           K must satisfy  0 .le. K.
[in]A
          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
           by n part of the array A must contain the upper triangular
           band part of the matrix of coefficients, supplied column by
           column, with the leading diagonal of the matrix in row
           ( k + 1 ) of the array, the first super-diagonal starting at
           position 2 in row k, and so on. The top left k by k triangle
           of the array A is not referenced.
           The following program segment will transfer an upper
           triangular band matrix from conventional full matrix storage
           to band storage:

                 DO 20, J = 1, N
                    M = K + 1 - J
                    DO 10, I = MAX( 1, J - K ), J
                       A( M + I, J ) = matrix( I, J )
              10    CONTINUE
              20 CONTINUE

           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
           by n part of the array A must contain the lower triangular
           band part of the matrix of coefficients, supplied column by
           column, with the leading diagonal of the matrix in row 1 of
           the array, the first sub-diagonal starting at position 1 in
           row 2, and so on. The bottom right k by k triangle of the
           array A is not referenced.
           The following program segment will transfer a lower
           triangular band matrix from conventional full matrix storage
           to band storage:

                 DO 20, J = 1, N
                    M = 1 - J
                    DO 10, I = J, MIN( N, J + K )
                       A( M + I, J ) = matrix( I, J )
              10    CONTINUE
              20 CONTINUE

           Note that when DIAG = 'U' or 'u' the elements of the array A
           corresponding to the diagonal elements of the matrix are not
           referenced, but are assumed to be unity.
[in]LDA
          LDA is INTEGER
           On entry, LDA specifies the first dimension of A as declared
           in the calling (sub) program. LDA must be at least
           ( k + 1 ).
[in,out]X
          X is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the n
           element right-hand side vector b. On exit, X is overwritten
           with the solution vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 191 of file ztbsv.f.

191 *
192 * -- Reference BLAS level2 routine (version 3.4.0) --
193 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
194 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
195 * November 2011
196 *
197 * .. Scalar Arguments ..
198  INTEGER incx,k,lda,n
199  CHARACTER diag,trans,uplo
200 * ..
201 * .. Array Arguments ..
202  COMPLEX*16 a(lda,*),x(*)
203 * ..
204 *
205 * =====================================================================
206 *
207 * .. Parameters ..
208  COMPLEX*16 zero
209  parameter(zero= (0.0d+0,0.0d+0))
210 * ..
211 * .. Local Scalars ..
212  COMPLEX*16 temp
213  INTEGER i,info,ix,j,jx,kplus1,kx,l
214  LOGICAL noconj,nounit
215 * ..
216 * .. External Functions ..
217  LOGICAL lsame
218  EXTERNAL lsame
219 * ..
220 * .. External Subroutines ..
221  EXTERNAL xerbla
222 * ..
223 * .. Intrinsic Functions ..
224  INTRINSIC dconjg,max,min
225 * ..
226 *
227 * Test the input parameters.
228 *
229  info = 0
230  IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN
231  info = 1
232  ELSE IF (.NOT.lsame(trans,'N') .AND. .NOT.lsame(trans,'T') .AND.
233  + .NOT.lsame(trans,'C')) THEN
234  info = 2
235  ELSE IF (.NOT.lsame(diag,'U') .AND. .NOT.lsame(diag,'N')) THEN
236  info = 3
237  ELSE IF (n.LT.0) THEN
238  info = 4
239  ELSE IF (k.LT.0) THEN
240  info = 5
241  ELSE IF (lda.LT. (k+1)) THEN
242  info = 7
243  ELSE IF (incx.EQ.0) THEN
244  info = 9
245  END IF
246  IF (info.NE.0) THEN
247  CALL xerbla('ZTBSV ',info)
248  RETURN
249  END IF
250 *
251 * Quick return if possible.
252 *
253  IF (n.EQ.0) RETURN
254 *
255  noconj = lsame(trans,'T')
256  nounit = lsame(diag,'N')
257 *
258 * Set up the start point in X if the increment is not unity. This
259 * will be ( N - 1 )*INCX too small for descending loops.
260 *
261  IF (incx.LE.0) THEN
262  kx = 1 - (n-1)*incx
263  ELSE IF (incx.NE.1) THEN
264  kx = 1
265  END IF
266 *
267 * Start the operations. In this version the elements of A are
268 * accessed by sequentially with one pass through A.
269 *
270  IF (lsame(trans,'N')) THEN
271 *
272 * Form x := inv( A )*x.
273 *
274  IF (lsame(uplo,'U')) THEN
275  kplus1 = k + 1
276  IF (incx.EQ.1) THEN
277  DO 20 j = n,1,-1
278  IF (x(j).NE.zero) THEN
279  l = kplus1 - j
280  IF (nounit) x(j) = x(j)/a(kplus1,j)
281  temp = x(j)
282  DO 10 i = j - 1,max(1,j-k),-1
283  x(i) = x(i) - temp*a(l+i,j)
284  10 CONTINUE
285  END IF
286  20 CONTINUE
287  ELSE
288  kx = kx + (n-1)*incx
289  jx = kx
290  DO 40 j = n,1,-1
291  kx = kx - incx
292  IF (x(jx).NE.zero) THEN
293  ix = kx
294  l = kplus1 - j
295  IF (nounit) x(jx) = x(jx)/a(kplus1,j)
296  temp = x(jx)
297  DO 30 i = j - 1,max(1,j-k),-1
298  x(ix) = x(ix) - temp*a(l+i,j)
299  ix = ix - incx
300  30 CONTINUE
301  END IF
302  jx = jx - incx
303  40 CONTINUE
304  END IF
305  ELSE
306  IF (incx.EQ.1) THEN
307  DO 60 j = 1,n
308  IF (x(j).NE.zero) THEN
309  l = 1 - j
310  IF (nounit) x(j) = x(j)/a(1,j)
311  temp = x(j)
312  DO 50 i = j + 1,min(n,j+k)
313  x(i) = x(i) - temp*a(l+i,j)
314  50 CONTINUE
315  END IF
316  60 CONTINUE
317  ELSE
318  jx = kx
319  DO 80 j = 1,n
320  kx = kx + incx
321  IF (x(jx).NE.zero) THEN
322  ix = kx
323  l = 1 - j
324  IF (nounit) x(jx) = x(jx)/a(1,j)
325  temp = x(jx)
326  DO 70 i = j + 1,min(n,j+k)
327  x(ix) = x(ix) - temp*a(l+i,j)
328  ix = ix + incx
329  70 CONTINUE
330  END IF
331  jx = jx + incx
332  80 CONTINUE
333  END IF
334  END IF
335  ELSE
336 *
337 * Form x := inv( A**T )*x or x := inv( A**H )*x.
338 *
339  IF (lsame(uplo,'U')) THEN
340  kplus1 = k + 1
341  IF (incx.EQ.1) THEN
342  DO 110 j = 1,n
343  temp = x(j)
344  l = kplus1 - j
345  IF (noconj) THEN
346  DO 90 i = max(1,j-k),j - 1
347  temp = temp - a(l+i,j)*x(i)
348  90 CONTINUE
349  IF (nounit) temp = temp/a(kplus1,j)
350  ELSE
351  DO 100 i = max(1,j-k),j - 1
352  temp = temp - dconjg(a(l+i,j))*x(i)
353  100 CONTINUE
354  IF (nounit) temp = temp/dconjg(a(kplus1,j))
355  END IF
356  x(j) = temp
357  110 CONTINUE
358  ELSE
359  jx = kx
360  DO 140 j = 1,n
361  temp = x(jx)
362  ix = kx
363  l = kplus1 - j
364  IF (noconj) THEN
365  DO 120 i = max(1,j-k),j - 1
366  temp = temp - a(l+i,j)*x(ix)
367  ix = ix + incx
368  120 CONTINUE
369  IF (nounit) temp = temp/a(kplus1,j)
370  ELSE
371  DO 130 i = max(1,j-k),j - 1
372  temp = temp - dconjg(a(l+i,j))*x(ix)
373  ix = ix + incx
374  130 CONTINUE
375  IF (nounit) temp = temp/dconjg(a(kplus1,j))
376  END IF
377  x(jx) = temp
378  jx = jx + incx
379  IF (j.GT.k) kx = kx + incx
380  140 CONTINUE
381  END IF
382  ELSE
383  IF (incx.EQ.1) THEN
384  DO 170 j = n,1,-1
385  temp = x(j)
386  l = 1 - j
387  IF (noconj) THEN
388  DO 150 i = min(n,j+k),j + 1,-1
389  temp = temp - a(l+i,j)*x(i)
390  150 CONTINUE
391  IF (nounit) temp = temp/a(1,j)
392  ELSE
393  DO 160 i = min(n,j+k),j + 1,-1
394  temp = temp - dconjg(a(l+i,j))*x(i)
395  160 CONTINUE
396  IF (nounit) temp = temp/dconjg(a(1,j))
397  END IF
398  x(j) = temp
399  170 CONTINUE
400  ELSE
401  kx = kx + (n-1)*incx
402  jx = kx
403  DO 200 j = n,1,-1
404  temp = x(jx)
405  ix = kx
406  l = 1 - j
407  IF (noconj) THEN
408  DO 180 i = min(n,j+k),j + 1,-1
409  temp = temp - a(l+i,j)*x(ix)
410  ix = ix - incx
411  180 CONTINUE
412  IF (nounit) temp = temp/a(1,j)
413  ELSE
414  DO 190 i = min(n,j+k),j + 1,-1
415  temp = temp - dconjg(a(l+i,j))*x(ix)
416  ix = ix - incx
417  190 CONTINUE
418  IF (nounit) temp = temp/dconjg(a(1,j))
419  END IF
420  x(jx) = temp
421  jx = jx - incx
422  IF ((n-j).GE.k) kx = kx - incx
423  200 CONTINUE
424  END IF
425  END IF
426  END IF
427 *
428  RETURN
429 *
430 * End of ZTBSV .
431 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine ztpmv ( character  UPLO,
character  TRANS,
character  DIAG,
integer  N,
complex*16, dimension(*)  AP,
complex*16, dimension(*)  X,
integer  INCX 
)

ZTPMV

Purpose:
 ZTPMV  performs one of the matrix-vector operations

    x := A*x,   or   x := A**T*x,   or   x := A**H*x,

 where x is an n element vector and  A is an n by n unit, or non-unit,
 upper or lower triangular matrix, supplied in packed form.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
           On entry, UPLO specifies whether the matrix is an upper or
           lower triangular matrix as follows:

              UPLO = 'U' or 'u'   A is an upper triangular matrix.

              UPLO = 'L' or 'l'   A is a lower triangular matrix.
[in]TRANS
          TRANS is CHARACTER*1
           On entry, TRANS specifies the operation to be performed as
           follows:

              TRANS = 'N' or 'n'   x := A*x.

              TRANS = 'T' or 't'   x := A**T*x.

              TRANS = 'C' or 'c'   x := A**H*x.
[in]DIAG
          DIAG is CHARACTER*1
           On entry, DIAG specifies whether or not A is unit
           triangular as follows:

              DIAG = 'U' or 'u'   A is assumed to be unit triangular.

              DIAG = 'N' or 'n'   A is not assumed to be unit
                                  triangular.
[in]N
          N is INTEGER
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
[in]AP
          AP is COMPLEX*16 array of DIMENSION at least
           ( ( n*( n + 1 ) )/2 ).
           Before entry with  UPLO = 'U' or 'u', the array AP must
           contain the upper triangular matrix packed sequentially,
           column by column, so that AP( 1 ) contains a( 1, 1 ),
           AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
           respectively, and so on.
           Before entry with UPLO = 'L' or 'l', the array AP must
           contain the lower triangular matrix packed sequentially,
           column by column, so that AP( 1 ) contains a( 1, 1 ),
           AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
           respectively, and so on.
           Note that when  DIAG = 'U' or 'u', the diagonal elements of
           A are not referenced, but are assumed to be unity.
[in]X
          X is (input/output) COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the n
           element vector x. On exit, X is overwritten with the
           tranformed vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.
  The vector and matrix arguments are not referenced when N = 0, or M = 0

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 144 of file ztpmv.f.

144 *
145 * -- Reference BLAS level2 routine (version 3.4.0) --
146 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
147 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
148 * November 2011
149 *
150 * .. Scalar Arguments ..
151  INTEGER incx,n
152  CHARACTER diag,trans,uplo
153 * ..
154 * .. Array Arguments ..
155  COMPLEX*16 ap(*),x(*)
156 * ..
157 *
158 * =====================================================================
159 *
160 * .. Parameters ..
161  COMPLEX*16 zero
162  parameter(zero= (0.0d+0,0.0d+0))
163 * ..
164 * .. Local Scalars ..
165  COMPLEX*16 temp
166  INTEGER i,info,ix,j,jx,k,kk,kx
167  LOGICAL noconj,nounit
168 * ..
169 * .. External Functions ..
170  LOGICAL lsame
171  EXTERNAL lsame
172 * ..
173 * .. External Subroutines ..
174  EXTERNAL xerbla
175 * ..
176 * .. Intrinsic Functions ..
177  INTRINSIC dconjg
178 * ..
179 *
180 * Test the input parameters.
181 *
182  info = 0
183  IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN
184  info = 1
185  ELSE IF (.NOT.lsame(trans,'N') .AND. .NOT.lsame(trans,'T') .AND.
186  + .NOT.lsame(trans,'C')) THEN
187  info = 2
188  ELSE IF (.NOT.lsame(diag,'U') .AND. .NOT.lsame(diag,'N')) THEN
189  info = 3
190  ELSE IF (n.LT.0) THEN
191  info = 4
192  ELSE IF (incx.EQ.0) THEN
193  info = 7
194  END IF
195  IF (info.NE.0) THEN
196  CALL xerbla('ZTPMV ',info)
197  RETURN
198  END IF
199 *
200 * Quick return if possible.
201 *
202  IF (n.EQ.0) RETURN
203 *
204  noconj = lsame(trans,'T')
205  nounit = lsame(diag,'N')
206 *
207 * Set up the start point in X if the increment is not unity. This
208 * will be ( N - 1 )*INCX too small for descending loops.
209 *
210  IF (incx.LE.0) THEN
211  kx = 1 - (n-1)*incx
212  ELSE IF (incx.NE.1) THEN
213  kx = 1
214  END IF
215 *
216 * Start the operations. In this version the elements of AP are
217 * accessed sequentially with one pass through AP.
218 *
219  IF (lsame(trans,'N')) THEN
220 *
221 * Form x:= A*x.
222 *
223  IF (lsame(uplo,'U')) THEN
224  kk = 1
225  IF (incx.EQ.1) THEN
226  DO 20 j = 1,n
227  IF (x(j).NE.zero) THEN
228  temp = x(j)
229  k = kk
230  DO 10 i = 1,j - 1
231  x(i) = x(i) + temp*ap(k)
232  k = k + 1
233  10 CONTINUE
234  IF (nounit) x(j) = x(j)*ap(kk+j-1)
235  END IF
236  kk = kk + j
237  20 CONTINUE
238  ELSE
239  jx = kx
240  DO 40 j = 1,n
241  IF (x(jx).NE.zero) THEN
242  temp = x(jx)
243  ix = kx
244  DO 30 k = kk,kk + j - 2
245  x(ix) = x(ix) + temp*ap(k)
246  ix = ix + incx
247  30 CONTINUE
248  IF (nounit) x(jx) = x(jx)*ap(kk+j-1)
249  END IF
250  jx = jx + incx
251  kk = kk + j
252  40 CONTINUE
253  END IF
254  ELSE
255  kk = (n* (n+1))/2
256  IF (incx.EQ.1) THEN
257  DO 60 j = n,1,-1
258  IF (x(j).NE.zero) THEN
259  temp = x(j)
260  k = kk
261  DO 50 i = n,j + 1,-1
262  x(i) = x(i) + temp*ap(k)
263  k = k - 1
264  50 CONTINUE
265  IF (nounit) x(j) = x(j)*ap(kk-n+j)
266  END IF
267  kk = kk - (n-j+1)
268  60 CONTINUE
269  ELSE
270  kx = kx + (n-1)*incx
271  jx = kx
272  DO 80 j = n,1,-1
273  IF (x(jx).NE.zero) THEN
274  temp = x(jx)
275  ix = kx
276  DO 70 k = kk,kk - (n- (j+1)),-1
277  x(ix) = x(ix) + temp*ap(k)
278  ix = ix - incx
279  70 CONTINUE
280  IF (nounit) x(jx) = x(jx)*ap(kk-n+j)
281  END IF
282  jx = jx - incx
283  kk = kk - (n-j+1)
284  80 CONTINUE
285  END IF
286  END IF
287  ELSE
288 *
289 * Form x := A**T*x or x := A**H*x.
290 *
291  IF (lsame(uplo,'U')) THEN
292  kk = (n* (n+1))/2
293  IF (incx.EQ.1) THEN
294  DO 110 j = n,1,-1
295  temp = x(j)
296  k = kk - 1
297  IF (noconj) THEN
298  IF (nounit) temp = temp*ap(kk)
299  DO 90 i = j - 1,1,-1
300  temp = temp + ap(k)*x(i)
301  k = k - 1
302  90 CONTINUE
303  ELSE
304  IF (nounit) temp = temp*dconjg(ap(kk))
305  DO 100 i = j - 1,1,-1
306  temp = temp + dconjg(ap(k))*x(i)
307  k = k - 1
308  100 CONTINUE
309  END IF
310  x(j) = temp
311  kk = kk - j
312  110 CONTINUE
313  ELSE
314  jx = kx + (n-1)*incx
315  DO 140 j = n,1,-1
316  temp = x(jx)
317  ix = jx
318  IF (noconj) THEN
319  IF (nounit) temp = temp*ap(kk)
320  DO 120 k = kk - 1,kk - j + 1,-1
321  ix = ix - incx
322  temp = temp + ap(k)*x(ix)
323  120 CONTINUE
324  ELSE
325  IF (nounit) temp = temp*dconjg(ap(kk))
326  DO 130 k = kk - 1,kk - j + 1,-1
327  ix = ix - incx
328  temp = temp + dconjg(ap(k))*x(ix)
329  130 CONTINUE
330  END IF
331  x(jx) = temp
332  jx = jx - incx
333  kk = kk - j
334  140 CONTINUE
335  END IF
336  ELSE
337  kk = 1
338  IF (incx.EQ.1) THEN
339  DO 170 j = 1,n
340  temp = x(j)
341  k = kk + 1
342  IF (noconj) THEN
343  IF (nounit) temp = temp*ap(kk)
344  DO 150 i = j + 1,n
345  temp = temp + ap(k)*x(i)
346  k = k + 1
347  150 CONTINUE
348  ELSE
349  IF (nounit) temp = temp*dconjg(ap(kk))
350  DO 160 i = j + 1,n
351  temp = temp + dconjg(ap(k))*x(i)
352  k = k + 1
353  160 CONTINUE
354  END IF
355  x(j) = temp
356  kk = kk + (n-j+1)
357  170 CONTINUE
358  ELSE
359  jx = kx
360  DO 200 j = 1,n
361  temp = x(jx)
362  ix = jx
363  IF (noconj) THEN
364  IF (nounit) temp = temp*ap(kk)
365  DO 180 k = kk + 1,kk + n - j
366  ix = ix + incx
367  temp = temp + ap(k)*x(ix)
368  180 CONTINUE
369  ELSE
370  IF (nounit) temp = temp*dconjg(ap(kk))
371  DO 190 k = kk + 1,kk + n - j
372  ix = ix + incx
373  temp = temp + dconjg(ap(k))*x(ix)
374  190 CONTINUE
375  END IF
376  x(jx) = temp
377  jx = jx + incx
378  kk = kk + (n-j+1)
379  200 CONTINUE
380  END IF
381  END IF
382  END IF
383 *
384  RETURN
385 *
386 * End of ZTPMV .
387 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine ztpsv ( character  UPLO,
character  TRANS,
character  DIAG,
integer  N,
complex*16, dimension(*)  AP,
complex*16, dimension(*)  X,
integer  INCX 
)

ZTPSV

Purpose:
 ZTPSV  solves one of the systems of equations

    A*x = b,   or   A**T*x = b,   or   A**H*x = b,

 where b and x are n element vectors and A is an n by n unit, or
 non-unit, upper or lower triangular matrix, supplied in packed form.

 No test for singularity or near-singularity is included in this
 routine. Such tests must be performed before calling this routine.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
           On entry, UPLO specifies whether the matrix is an upper or
           lower triangular matrix as follows:

              UPLO = 'U' or 'u'   A is an upper triangular matrix.

              UPLO = 'L' or 'l'   A is a lower triangular matrix.
[in]TRANS
          TRANS is CHARACTER*1
           On entry, TRANS specifies the equations to be solved as
           follows:

              TRANS = 'N' or 'n'   A*x = b.

              TRANS = 'T' or 't'   A**T*x = b.

              TRANS = 'C' or 'c'   A**H*x = b.
[in]DIAG
          DIAG is CHARACTER*1
           On entry, DIAG specifies whether or not A is unit
           triangular as follows:

              DIAG = 'U' or 'u'   A is assumed to be unit triangular.

              DIAG = 'N' or 'n'   A is not assumed to be unit
                                  triangular.
[in]N
          N is INTEGER
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
[in]AP
          AP is COMPLEX*16 array of DIMENSION at least
           ( ( n*( n + 1 ) )/2 ).
           Before entry with  UPLO = 'U' or 'u', the array AP must
           contain the upper triangular matrix packed sequentially,
           column by column, so that AP( 1 ) contains a( 1, 1 ),
           AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
           respectively, and so on.
           Before entry with UPLO = 'L' or 'l', the array AP must
           contain the lower triangular matrix packed sequentially,
           column by column, so that AP( 1 ) contains a( 1, 1 ),
           AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
           respectively, and so on.
           Note that when  DIAG = 'U' or 'u', the diagonal elements of
           A are not referenced, but are assumed to be unity.
[in,out]X
          X is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the n
           element right-hand side vector b. On exit, X is overwritten
           with the solution vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 146 of file ztpsv.f.

146 *
147 * -- Reference BLAS level2 routine (version 3.4.0) --
148 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
149 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
150 * November 2011
151 *
152 * .. Scalar Arguments ..
153  INTEGER incx,n
154  CHARACTER diag,trans,uplo
155 * ..
156 * .. Array Arguments ..
157  COMPLEX*16 ap(*),x(*)
158 * ..
159 *
160 * =====================================================================
161 *
162 * .. Parameters ..
163  COMPLEX*16 zero
164  parameter(zero= (0.0d+0,0.0d+0))
165 * ..
166 * .. Local Scalars ..
167  COMPLEX*16 temp
168  INTEGER i,info,ix,j,jx,k,kk,kx
169  LOGICAL noconj,nounit
170 * ..
171 * .. External Functions ..
172  LOGICAL lsame
173  EXTERNAL lsame
174 * ..
175 * .. External Subroutines ..
176  EXTERNAL xerbla
177 * ..
178 * .. Intrinsic Functions ..
179  INTRINSIC dconjg
180 * ..
181 *
182 * Test the input parameters.
183 *
184  info = 0
185  IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN
186  info = 1
187  ELSE IF (.NOT.lsame(trans,'N') .AND. .NOT.lsame(trans,'T') .AND.
188  + .NOT.lsame(trans,'C')) THEN
189  info = 2
190  ELSE IF (.NOT.lsame(diag,'U') .AND. .NOT.lsame(diag,'N')) THEN
191  info = 3
192  ELSE IF (n.LT.0) THEN
193  info = 4
194  ELSE IF (incx.EQ.0) THEN
195  info = 7
196  END IF
197  IF (info.NE.0) THEN
198  CALL xerbla('ZTPSV ',info)
199  RETURN
200  END IF
201 *
202 * Quick return if possible.
203 *
204  IF (n.EQ.0) RETURN
205 *
206  noconj = lsame(trans,'T')
207  nounit = lsame(diag,'N')
208 *
209 * Set up the start point in X if the increment is not unity. This
210 * will be ( N - 1 )*INCX too small for descending loops.
211 *
212  IF (incx.LE.0) THEN
213  kx = 1 - (n-1)*incx
214  ELSE IF (incx.NE.1) THEN
215  kx = 1
216  END IF
217 *
218 * Start the operations. In this version the elements of AP are
219 * accessed sequentially with one pass through AP.
220 *
221  IF (lsame(trans,'N')) THEN
222 *
223 * Form x := inv( A )*x.
224 *
225  IF (lsame(uplo,'U')) THEN
226  kk = (n* (n+1))/2
227  IF (incx.EQ.1) THEN
228  DO 20 j = n,1,-1
229  IF (x(j).NE.zero) THEN
230  IF (nounit) x(j) = x(j)/ap(kk)
231  temp = x(j)
232  k = kk - 1
233  DO 10 i = j - 1,1,-1
234  x(i) = x(i) - temp*ap(k)
235  k = k - 1
236  10 CONTINUE
237  END IF
238  kk = kk - j
239  20 CONTINUE
240  ELSE
241  jx = kx + (n-1)*incx
242  DO 40 j = n,1,-1
243  IF (x(jx).NE.zero) THEN
244  IF (nounit) x(jx) = x(jx)/ap(kk)
245  temp = x(jx)
246  ix = jx
247  DO 30 k = kk - 1,kk - j + 1,-1
248  ix = ix - incx
249  x(ix) = x(ix) - temp*ap(k)
250  30 CONTINUE
251  END IF
252  jx = jx - incx
253  kk = kk - j
254  40 CONTINUE
255  END IF
256  ELSE
257  kk = 1
258  IF (incx.EQ.1) THEN
259  DO 60 j = 1,n
260  IF (x(j).NE.zero) THEN
261  IF (nounit) x(j) = x(j)/ap(kk)
262  temp = x(j)
263  k = kk + 1
264  DO 50 i = j + 1,n
265  x(i) = x(i) - temp*ap(k)
266  k = k + 1
267  50 CONTINUE
268  END IF
269  kk = kk + (n-j+1)
270  60 CONTINUE
271  ELSE
272  jx = kx
273  DO 80 j = 1,n
274  IF (x(jx).NE.zero) THEN
275  IF (nounit) x(jx) = x(jx)/ap(kk)
276  temp = x(jx)
277  ix = jx
278  DO 70 k = kk + 1,kk + n - j
279  ix = ix + incx
280  x(ix) = x(ix) - temp*ap(k)
281  70 CONTINUE
282  END IF
283  jx = jx + incx
284  kk = kk + (n-j+1)
285  80 CONTINUE
286  END IF
287  END IF
288  ELSE
289 *
290 * Form x := inv( A**T )*x or x := inv( A**H )*x.
291 *
292  IF (lsame(uplo,'U')) THEN
293  kk = 1
294  IF (incx.EQ.1) THEN
295  DO 110 j = 1,n
296  temp = x(j)
297  k = kk
298  IF (noconj) THEN
299  DO 90 i = 1,j - 1
300  temp = temp - ap(k)*x(i)
301  k = k + 1
302  90 CONTINUE
303  IF (nounit) temp = temp/ap(kk+j-1)
304  ELSE
305  DO 100 i = 1,j - 1
306  temp = temp - dconjg(ap(k))*x(i)
307  k = k + 1
308  100 CONTINUE
309  IF (nounit) temp = temp/dconjg(ap(kk+j-1))
310  END IF
311  x(j) = temp
312  kk = kk + j
313  110 CONTINUE
314  ELSE
315  jx = kx
316  DO 140 j = 1,n
317  temp = x(jx)
318  ix = kx
319  IF (noconj) THEN
320  DO 120 k = kk,kk + j - 2
321  temp = temp - ap(k)*x(ix)
322  ix = ix + incx
323  120 CONTINUE
324  IF (nounit) temp = temp/ap(kk+j-1)
325  ELSE
326  DO 130 k = kk,kk + j - 2
327  temp = temp - dconjg(ap(k))*x(ix)
328  ix = ix + incx
329  130 CONTINUE
330  IF (nounit) temp = temp/dconjg(ap(kk+j-1))
331  END IF
332  x(jx) = temp
333  jx = jx + incx
334  kk = kk + j
335  140 CONTINUE
336  END IF
337  ELSE
338  kk = (n* (n+1))/2
339  IF (incx.EQ.1) THEN
340  DO 170 j = n,1,-1
341  temp = x(j)
342  k = kk
343  IF (noconj) THEN
344  DO 150 i = n,j + 1,-1
345  temp = temp - ap(k)*x(i)
346  k = k - 1
347  150 CONTINUE
348  IF (nounit) temp = temp/ap(kk-n+j)
349  ELSE
350  DO 160 i = n,j + 1,-1
351  temp = temp - dconjg(ap(k))*x(i)
352  k = k - 1
353  160 CONTINUE
354  IF (nounit) temp = temp/dconjg(ap(kk-n+j))
355  END IF
356  x(j) = temp
357  kk = kk - (n-j+1)
358  170 CONTINUE
359  ELSE
360  kx = kx + (n-1)*incx
361  jx = kx
362  DO 200 j = n,1,-1
363  temp = x(jx)
364  ix = kx
365  IF (noconj) THEN
366  DO 180 k = kk,kk - (n- (j+1)),-1
367  temp = temp - ap(k)*x(ix)
368  ix = ix - incx
369  180 CONTINUE
370  IF (nounit) temp = temp/ap(kk-n+j)
371  ELSE
372  DO 190 k = kk,kk - (n- (j+1)),-1
373  temp = temp - dconjg(ap(k))*x(ix)
374  ix = ix - incx
375  190 CONTINUE
376  IF (nounit) temp = temp/dconjg(ap(kk-n+j))
377  END IF
378  x(jx) = temp
379  jx = jx - incx
380  kk = kk - (n-j+1)
381  200 CONTINUE
382  END IF
383  END IF
384  END IF
385 *
386  RETURN
387 *
388 * End of ZTPSV .
389 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine ztrmv ( character  UPLO,
character  TRANS,
character  DIAG,
integer  N,
complex*16, dimension(lda,*)  A,
integer  LDA,
complex*16, dimension(*)  X,
integer  INCX 
)

ZTRMV

Purpose:
 ZTRMV  performs one of the matrix-vector operations

    x := A*x,   or   x := A**T*x,   or   x := A**H*x,

 where x is an n element vector and  A is an n by n unit, or non-unit,
 upper or lower triangular matrix.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
           On entry, UPLO specifies whether the matrix is an upper or
           lower triangular matrix as follows:

              UPLO = 'U' or 'u'   A is an upper triangular matrix.

              UPLO = 'L' or 'l'   A is a lower triangular matrix.
[in]TRANS
          TRANS is CHARACTER*1
           On entry, TRANS specifies the operation to be performed as
           follows:

              TRANS = 'N' or 'n'   x := A*x.

              TRANS = 'T' or 't'   x := A**T*x.

              TRANS = 'C' or 'c'   x := A**H*x.
[in]DIAG
          DIAG is CHARACTER*1
           On entry, DIAG specifies whether or not A is unit
           triangular as follows:

              DIAG = 'U' or 'u'   A is assumed to be unit triangular.

              DIAG = 'N' or 'n'   A is not assumed to be unit
                                  triangular.
[in]N
          N is INTEGER
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
[in]A
          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
           Before entry with  UPLO = 'U' or 'u', the leading n by n
           upper triangular part of the array A must contain the upper
           triangular matrix and the strictly lower triangular part of
           A is not referenced.
           Before entry with UPLO = 'L' or 'l', the leading n by n
           lower triangular part of the array A must contain the lower
           triangular matrix and the strictly upper triangular part of
           A is not referenced.
           Note that when  DIAG = 'U' or 'u', the diagonal elements of
           A are not referenced either, but are assumed to be unity.
[in]LDA
          LDA is INTEGER
           On entry, LDA specifies the first dimension of A as declared
           in the calling (sub) program. LDA must be at least
           max( 1, n ).
[in]X
          X is (input/output) COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the n
           element vector x. On exit, X is overwritten with the
           tranformed vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.
  The vector and matrix arguments are not referenced when N = 0, or M = 0

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 149 of file ztrmv.f.

149 *
150 * -- Reference BLAS level2 routine (version 3.4.0) --
151 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
152 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
153 * November 2011
154 *
155 * .. Scalar Arguments ..
156  INTEGER incx,lda,n
157  CHARACTER diag,trans,uplo
158 * ..
159 * .. Array Arguments ..
160  COMPLEX*16 a(lda,*),x(*)
161 * ..
162 *
163 * =====================================================================
164 *
165 * .. Parameters ..
166  COMPLEX*16 zero
167  parameter(zero= (0.0d+0,0.0d+0))
168 * ..
169 * .. Local Scalars ..
170  COMPLEX*16 temp
171  INTEGER i,info,ix,j,jx,kx
172  LOGICAL noconj,nounit
173 * ..
174 * .. External Functions ..
175  LOGICAL lsame
176  EXTERNAL lsame
177 * ..
178 * .. External Subroutines ..
179  EXTERNAL xerbla
180 * ..
181 * .. Intrinsic Functions ..
182  INTRINSIC dconjg,max
183 * ..
184 *
185 * Test the input parameters.
186 *
187  info = 0
188  IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN
189  info = 1
190  ELSE IF (.NOT.lsame(trans,'N') .AND. .NOT.lsame(trans,'T') .AND.
191  + .NOT.lsame(trans,'C')) THEN
192  info = 2
193  ELSE IF (.NOT.lsame(diag,'U') .AND. .NOT.lsame(diag,'N')) THEN
194  info = 3
195  ELSE IF (n.LT.0) THEN
196  info = 4
197  ELSE IF (lda.LT.max(1,n)) THEN
198  info = 6
199  ELSE IF (incx.EQ.0) THEN
200  info = 8
201  END IF
202  IF (info.NE.0) THEN
203  CALL xerbla('ZTRMV ',info)
204  RETURN
205  END IF
206 *
207 * Quick return if possible.
208 *
209  IF (n.EQ.0) RETURN
210 *
211  noconj = lsame(trans,'T')
212  nounit = lsame(diag,'N')
213 *
214 * Set up the start point in X if the increment is not unity. This
215 * will be ( N - 1 )*INCX too small for descending loops.
216 *
217  IF (incx.LE.0) THEN
218  kx = 1 - (n-1)*incx
219  ELSE IF (incx.NE.1) THEN
220  kx = 1
221  END IF
222 *
223 * Start the operations. In this version the elements of A are
224 * accessed sequentially with one pass through A.
225 *
226  IF (lsame(trans,'N')) THEN
227 *
228 * Form x := A*x.
229 *
230  IF (lsame(uplo,'U')) THEN
231  IF (incx.EQ.1) THEN
232  DO 20 j = 1,n
233  IF (x(j).NE.zero) THEN
234  temp = x(j)
235  DO 10 i = 1,j - 1
236  x(i) = x(i) + temp*a(i,j)
237  10 CONTINUE
238  IF (nounit) x(j) = x(j)*a(j,j)
239  END IF
240  20 CONTINUE
241  ELSE
242  jx = kx
243  DO 40 j = 1,n
244  IF (x(jx).NE.zero) THEN
245  temp = x(jx)
246  ix = kx
247  DO 30 i = 1,j - 1
248  x(ix) = x(ix) + temp*a(i,j)
249  ix = ix + incx
250  30 CONTINUE
251  IF (nounit) x(jx) = x(jx)*a(j,j)
252  END IF
253  jx = jx + incx
254  40 CONTINUE
255  END IF
256  ELSE
257  IF (incx.EQ.1) THEN
258  DO 60 j = n,1,-1
259  IF (x(j).NE.zero) THEN
260  temp = x(j)
261  DO 50 i = n,j + 1,-1
262  x(i) = x(i) + temp*a(i,j)
263  50 CONTINUE
264  IF (nounit) x(j) = x(j)*a(j,j)
265  END IF
266  60 CONTINUE
267  ELSE
268  kx = kx + (n-1)*incx
269  jx = kx
270  DO 80 j = n,1,-1
271  IF (x(jx).NE.zero) THEN
272  temp = x(jx)
273  ix = kx
274  DO 70 i = n,j + 1,-1
275  x(ix) = x(ix) + temp*a(i,j)
276  ix = ix - incx
277  70 CONTINUE
278  IF (nounit) x(jx) = x(jx)*a(j,j)
279  END IF
280  jx = jx - incx
281  80 CONTINUE
282  END IF
283  END IF
284  ELSE
285 *
286 * Form x := A**T*x or x := A**H*x.
287 *
288  IF (lsame(uplo,'U')) THEN
289  IF (incx.EQ.1) THEN
290  DO 110 j = n,1,-1
291  temp = x(j)
292  IF (noconj) THEN
293  IF (nounit) temp = temp*a(j,j)
294  DO 90 i = j - 1,1,-1
295  temp = temp + a(i,j)*x(i)
296  90 CONTINUE
297  ELSE
298  IF (nounit) temp = temp*dconjg(a(j,j))
299  DO 100 i = j - 1,1,-1
300  temp = temp + dconjg(a(i,j))*x(i)
301  100 CONTINUE
302  END IF
303  x(j) = temp
304  110 CONTINUE
305  ELSE
306  jx = kx + (n-1)*incx
307  DO 140 j = n,1,-1
308  temp = x(jx)
309  ix = jx
310  IF (noconj) THEN
311  IF (nounit) temp = temp*a(j,j)
312  DO 120 i = j - 1,1,-1
313  ix = ix - incx
314  temp = temp + a(i,j)*x(ix)
315  120 CONTINUE
316  ELSE
317  IF (nounit) temp = temp*dconjg(a(j,j))
318  DO 130 i = j - 1,1,-1
319  ix = ix - incx
320  temp = temp + dconjg(a(i,j))*x(ix)
321  130 CONTINUE
322  END IF
323  x(jx) = temp
324  jx = jx - incx
325  140 CONTINUE
326  END IF
327  ELSE
328  IF (incx.EQ.1) THEN
329  DO 170 j = 1,n
330  temp = x(j)
331  IF (noconj) THEN
332  IF (nounit) temp = temp*a(j,j)
333  DO 150 i = j + 1,n
334  temp = temp + a(i,j)*x(i)
335  150 CONTINUE
336  ELSE
337  IF (nounit) temp = temp*dconjg(a(j,j))
338  DO 160 i = j + 1,n
339  temp = temp + dconjg(a(i,j))*x(i)
340  160 CONTINUE
341  END IF
342  x(j) = temp
343  170 CONTINUE
344  ELSE
345  jx = kx
346  DO 200 j = 1,n
347  temp = x(jx)
348  ix = jx
349  IF (noconj) THEN
350  IF (nounit) temp = temp*a(j,j)
351  DO 180 i = j + 1,n
352  ix = ix + incx
353  temp = temp + a(i,j)*x(ix)
354  180 CONTINUE
355  ELSE
356  IF (nounit) temp = temp*dconjg(a(j,j))
357  DO 190 i = j + 1,n
358  ix = ix + incx
359  temp = temp + dconjg(a(i,j))*x(ix)
360  190 CONTINUE
361  END IF
362  x(jx) = temp
363  jx = jx + incx
364  200 CONTINUE
365  END IF
366  END IF
367  END IF
368 *
369  RETURN
370 *
371 * End of ZTRMV .
372 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine ztrsv ( character  UPLO,
character  TRANS,
character  DIAG,
integer  N,
complex*16, dimension(lda,*)  A,
integer  LDA,
complex*16, dimension(*)  X,
integer  INCX 
)

ZTRSV

Purpose:
 ZTRSV  solves one of the systems of equations

    A*x = b,   or   A**T*x = b,   or   A**H*x = b,

 where b and x are n element vectors and A is an n by n unit, or
 non-unit, upper or lower triangular matrix.

 No test for singularity or near-singularity is included in this
 routine. Such tests must be performed before calling this routine.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
           On entry, UPLO specifies whether the matrix is an upper or
           lower triangular matrix as follows:

              UPLO = 'U' or 'u'   A is an upper triangular matrix.

              UPLO = 'L' or 'l'   A is a lower triangular matrix.
[in]TRANS
          TRANS is CHARACTER*1
           On entry, TRANS specifies the equations to be solved as
           follows:

              TRANS = 'N' or 'n'   A*x = b.

              TRANS = 'T' or 't'   A**T*x = b.

              TRANS = 'C' or 'c'   A**H*x = b.
[in]DIAG
          DIAG is CHARACTER*1
           On entry, DIAG specifies whether or not A is unit
           triangular as follows:

              DIAG = 'U' or 'u'   A is assumed to be unit triangular.

              DIAG = 'N' or 'n'   A is not assumed to be unit
                                  triangular.
[in]N
          N is INTEGER
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
[in]A
          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
           Before entry with  UPLO = 'U' or 'u', the leading n by n
           upper triangular part of the array A must contain the upper
           triangular matrix and the strictly lower triangular part of
           A is not referenced.
           Before entry with UPLO = 'L' or 'l', the leading n by n
           lower triangular part of the array A must contain the lower
           triangular matrix and the strictly upper triangular part of
           A is not referenced.
           Note that when  DIAG = 'U' or 'u', the diagonal elements of
           A are not referenced either, but are assumed to be unity.
[in]LDA
          LDA is INTEGER
           On entry, LDA specifies the first dimension of A as declared
           in the calling (sub) program. LDA must be at least
           max( 1, n ).
[in,out]X
          X is COMPLEX*16 array of dimension at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           Before entry, the incremented array X must contain the n
           element right-hand side vector b. On exit, X is overwritten
           with the solution vector x.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
  Level 2 Blas routine.

  -- Written on 22-October-1986.
     Jack Dongarra, Argonne National Lab.
     Jeremy Du Croz, Nag Central Office.
     Sven Hammarling, Nag Central Office.
     Richard Hanson, Sandia National Labs.

Definition at line 151 of file ztrsv.f.

151 *
152 * -- Reference BLAS level2 routine (version 3.4.0) --
153 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
154 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
155 * November 2011
156 *
157 * .. Scalar Arguments ..
158  INTEGER incx,lda,n
159  CHARACTER diag,trans,uplo
160 * ..
161 * .. Array Arguments ..
162  COMPLEX*16 a(lda,*),x(*)
163 * ..
164 *
165 * =====================================================================
166 *
167 * .. Parameters ..
168  COMPLEX*16 zero
169  parameter(zero= (0.0d+0,0.0d+0))
170 * ..
171 * .. Local Scalars ..
172  COMPLEX*16 temp
173  INTEGER i,info,ix,j,jx,kx
174  LOGICAL noconj,nounit
175 * ..
176 * .. External Functions ..
177  LOGICAL lsame
178  EXTERNAL lsame
179 * ..
180 * .. External Subroutines ..
181  EXTERNAL xerbla
182 * ..
183 * .. Intrinsic Functions ..
184  INTRINSIC dconjg,max
185 * ..
186 *
187 * Test the input parameters.
188 *
189  info = 0
190  IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN
191  info = 1
192  ELSE IF (.NOT.lsame(trans,'N') .AND. .NOT.lsame(trans,'T') .AND.
193  + .NOT.lsame(trans,'C')) THEN
194  info = 2
195  ELSE IF (.NOT.lsame(diag,'U') .AND. .NOT.lsame(diag,'N')) THEN
196  info = 3
197  ELSE IF (n.LT.0) THEN
198  info = 4
199  ELSE IF (lda.LT.max(1,n)) THEN
200  info = 6
201  ELSE IF (incx.EQ.0) THEN
202  info = 8
203  END IF
204  IF (info.NE.0) THEN
205  CALL xerbla('ZTRSV ',info)
206  RETURN
207  END IF
208 *
209 * Quick return if possible.
210 *
211  IF (n.EQ.0) RETURN
212 *
213  noconj = lsame(trans,'T')
214  nounit = lsame(diag,'N')
215 *
216 * Set up the start point in X if the increment is not unity. This
217 * will be ( N - 1 )*INCX too small for descending loops.
218 *
219  IF (incx.LE.0) THEN
220  kx = 1 - (n-1)*incx
221  ELSE IF (incx.NE.1) THEN
222  kx = 1
223  END IF
224 *
225 * Start the operations. In this version the elements of A are
226 * accessed sequentially with one pass through A.
227 *
228  IF (lsame(trans,'N')) THEN
229 *
230 * Form x := inv( A )*x.
231 *
232  IF (lsame(uplo,'U')) THEN
233  IF (incx.EQ.1) THEN
234  DO 20 j = n,1,-1
235  IF (x(j).NE.zero) THEN
236  IF (nounit) x(j) = x(j)/a(j,j)
237  temp = x(j)
238  DO 10 i = j - 1,1,-1
239  x(i) = x(i) - temp*a(i,j)
240  10 CONTINUE
241  END IF
242  20 CONTINUE
243  ELSE
244  jx = kx + (n-1)*incx
245  DO 40 j = n,1,-1
246  IF (x(jx).NE.zero) THEN
247  IF (nounit) x(jx) = x(jx)/a(j,j)
248  temp = x(jx)
249  ix = jx
250  DO 30 i = j - 1,1,-1
251  ix = ix - incx
252  x(ix) = x(ix) - temp*a(i,j)
253  30 CONTINUE
254  END IF
255  jx = jx - incx
256  40 CONTINUE
257  END IF
258  ELSE
259  IF (incx.EQ.1) THEN
260  DO 60 j = 1,n
261  IF (x(j).NE.zero) THEN
262  IF (nounit) x(j) = x(j)/a(j,j)
263  temp = x(j)
264  DO 50 i = j + 1,n
265  x(i) = x(i) - temp*a(i,j)
266  50 CONTINUE
267  END IF
268  60 CONTINUE
269  ELSE
270  jx = kx
271  DO 80 j = 1,n
272  IF (x(jx).NE.zero) THEN
273  IF (nounit) x(jx) = x(jx)/a(j,j)
274  temp = x(jx)
275  ix = jx
276  DO 70 i = j + 1,n
277  ix = ix + incx
278  x(ix) = x(ix) - temp*a(i,j)
279  70 CONTINUE
280  END IF
281  jx = jx + incx
282  80 CONTINUE
283  END IF
284  END IF
285  ELSE
286 *
287 * Form x := inv( A**T )*x or x := inv( A**H )*x.
288 *
289  IF (lsame(uplo,'U')) THEN
290  IF (incx.EQ.1) THEN
291  DO 110 j = 1,n
292  temp = x(j)
293  IF (noconj) THEN
294  DO 90 i = 1,j - 1
295  temp = temp - a(i,j)*x(i)
296  90 CONTINUE
297  IF (nounit) temp = temp/a(j,j)
298  ELSE
299  DO 100 i = 1,j - 1
300  temp = temp - dconjg(a(i,j))*x(i)
301  100 CONTINUE
302  IF (nounit) temp = temp/dconjg(a(j,j))
303  END IF
304  x(j) = temp
305  110 CONTINUE
306  ELSE
307  jx = kx
308  DO 140 j = 1,n
309  ix = kx
310  temp = x(jx)
311  IF (noconj) THEN
312  DO 120 i = 1,j - 1
313  temp = temp - a(i,j)*x(ix)
314  ix = ix + incx
315  120 CONTINUE
316  IF (nounit) temp = temp/a(j,j)
317  ELSE
318  DO 130 i = 1,j - 1
319  temp = temp - dconjg(a(i,j))*x(ix)
320  ix = ix + incx
321  130 CONTINUE
322  IF (nounit) temp = temp/dconjg(a(j,j))
323  END IF
324  x(jx) = temp
325  jx = jx + incx
326  140 CONTINUE
327  END IF
328  ELSE
329  IF (incx.EQ.1) THEN
330  DO 170 j = n,1,-1
331  temp = x(j)
332  IF (noconj) THEN
333  DO 150 i = n,j + 1,-1
334  temp = temp - a(i,j)*x(i)
335  150 CONTINUE
336  IF (nounit) temp = temp/a(j,j)
337  ELSE
338  DO 160 i = n,j + 1,-1
339  temp = temp - dconjg(a(i,j))*x(i)
340  160 CONTINUE
341  IF (nounit) temp = temp/dconjg(a(j,j))
342  END IF
343  x(j) = temp
344  170 CONTINUE
345  ELSE
346  kx = kx + (n-1)*incx
347  jx = kx
348  DO 200 j = n,1,-1
349  ix = kx
350  temp = x(jx)
351  IF (noconj) THEN
352  DO 180 i = n,j + 1,-1
353  temp = temp - a(i,j)*x(ix)
354  ix = ix - incx
355  180 CONTINUE
356  IF (nounit) temp = temp/a(j,j)
357  ELSE
358  DO 190 i = n,j + 1,-1
359  temp = temp - dconjg(a(i,j))*x(ix)
360  ix = ix - incx
361  190 CONTINUE
362  IF (nounit) temp = temp/dconjg(a(j,j))
363  END IF
364  x(jx) = temp
365  jx = jx - incx
366  200 CONTINUE
367  END IF
368  END IF
369  END IF
370 *
371  RETURN
372 *
373 * End of ZTRSV .
374 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function: