LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine zlat2c ( character  UPLO,
integer  N,
complex*16, dimension( lda, * )  A,
integer  LDA,
complex, dimension( ldsa, * )  SA,
integer  LDSA,
integer  INFO 
)

ZLAT2C converts a double complex triangular matrix to a complex triangular matrix.

Download ZLAT2C + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 ZLAT2C converts a COMPLEX*16 triangular matrix, SA, to a COMPLEX
 triangular matrix, A.

 RMAX is the overflow for the SINGLE PRECISION arithmetic
 ZLAT2C checks that all the entries of A are between -RMAX and
 RMAX. If not the convertion is aborted and a flag is raised.

 This is an auxiliary routine so there is no argument checking.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
          = 'U':  A is upper triangular;
          = 'L':  A is lower triangular.
[in]N
          N is INTEGER
          The number of rows and columns of the matrix A.  N >= 0.
[in]A
          A is COMPLEX*16 array, dimension (LDA,N)
          On entry, the N-by-N triangular coefficient matrix A.
[in]LDA
          LDA is INTEGER
          The leading dimension of the array A.  LDA >= max(1,N).
[out]SA
          SA is COMPLEX array, dimension (LDSA,N)
          Only the UPLO part of SA is referenced.  On exit, if INFO=0,
          the N-by-N coefficient matrix SA; if INFO>0, the content of
          the UPLO part of SA is unspecified.
[in]LDSA
          LDSA is INTEGER
          The leading dimension of the array SA.  LDSA >= max(1,M).
[out]INFO
          INFO is INTEGER
          = 0:  successful exit.
          = 1:  an entry of the matrix A is greater than the SINGLE
                PRECISION overflow threshold, in this case, the content
                of the UPLO part of SA in exit is unspecified.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
September 2012

Definition at line 113 of file zlat2c.f.

113 *
114 * -- LAPACK auxiliary routine (version 3.4.2) --
115 * -- LAPACK is a software package provided by Univ. of Tennessee, --
116 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
117 * September 2012
118 *
119 * .. Scalar Arguments ..
120  CHARACTER uplo
121  INTEGER info, lda, ldsa, n
122 * ..
123 * .. Array Arguments ..
124  COMPLEX sa( ldsa, * )
125  COMPLEX*16 a( lda, * )
126 * ..
127 *
128 * =====================================================================
129 *
130 * .. Local Scalars ..
131  INTEGER i, j
132  DOUBLE PRECISION rmax
133  LOGICAL upper
134 * ..
135 * .. Intrinsic Functions ..
136  INTRINSIC dble, dimag
137 * ..
138 * .. External Functions ..
139  REAL slamch
140  LOGICAL lsame
141  EXTERNAL slamch, lsame
142 * ..
143 * .. Executable Statements ..
144 *
145  rmax = slamch( 'O' )
146  upper = lsame( uplo, 'U' )
147  IF( upper ) THEN
148  DO 20 j = 1, n
149  DO 10 i = 1, j
150  IF( ( dble( a( i, j ) ).LT.-rmax ) .OR.
151  $ ( dble( a( i, j ) ).GT.rmax ) .OR.
152  $ ( dimag( a( i, j ) ).LT.-rmax ) .OR.
153  $ ( dimag( a( i, j ) ).GT.rmax ) ) THEN
154  info = 1
155  GO TO 50
156  END IF
157  sa( i, j ) = a( i, j )
158  10 CONTINUE
159  20 CONTINUE
160  ELSE
161  DO 40 j = 1, n
162  DO 30 i = j, n
163  IF( ( dble( a( i, j ) ).LT.-rmax ) .OR.
164  $ ( dble( a( i, j ) ).GT.rmax ) .OR.
165  $ ( dimag( a( i, j ) ).LT.-rmax ) .OR.
166  $ ( dimag( a( i, j ) ).GT.rmax ) ) THEN
167  info = 1
168  GO TO 50
169  END IF
170  sa( i, j ) = a( i, j )
171  30 CONTINUE
172  40 CONTINUE
173  END IF
174  50 CONTINUE
175 *
176  RETURN
177 *
178 * End of ZLAT2C
179 *
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:69
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the caller graph for this function: