LAPACK 3.3.0
|
00001 SUBROUTINE ZLAG2C( M, N, A, LDA, SA, LDSA, INFO ) 00002 * 00003 * -- LAPACK PROTOTYPE auxiliary routine (version 3.1.2) -- 00004 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00005 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00006 * August 2007 00007 * 00008 * .. 00009 * .. Scalar Arguments .. 00010 INTEGER INFO, LDA, LDSA, M, N 00011 * .. 00012 * .. Array Arguments .. 00013 COMPLEX SA( LDSA, * ) 00014 COMPLEX*16 A( LDA, * ) 00015 * .. 00016 * 00017 * Purpose 00018 * ======= 00019 * 00020 * ZLAG2C converts a COMPLEX*16 matrix, SA, to a COMPLEX matrix, A. 00021 * 00022 * RMAX is the overflow for the SINGLE PRECISION arithmetic 00023 * ZLAG2C checks that all the entries of A are between -RMAX and 00024 * RMAX. If not the convertion is aborted and a flag is raised. 00025 * 00026 * This is an auxiliary routine so there is no argument checking. 00027 * 00028 * Arguments 00029 * ========= 00030 * 00031 * M (input) INTEGER 00032 * The number of lines of the matrix A. M >= 0. 00033 * 00034 * N (input) INTEGER 00035 * The number of columns of the matrix A. N >= 0. 00036 * 00037 * A (input) COMPLEX*16 array, dimension (LDA,N) 00038 * On entry, the M-by-N coefficient matrix A. 00039 * 00040 * LDA (input) INTEGER 00041 * The leading dimension of the array A. LDA >= max(1,M). 00042 * 00043 * SA (output) COMPLEX array, dimension (LDSA,N) 00044 * On exit, if INFO=0, the M-by-N coefficient matrix SA; if 00045 * INFO>0, the content of SA is unspecified. 00046 * 00047 * LDSA (input) INTEGER 00048 * The leading dimension of the array SA. LDSA >= max(1,M). 00049 * 00050 * INFO (output) INTEGER 00051 * = 0: successful exit. 00052 * = 1: an entry of the matrix A is greater than the SINGLE 00053 * PRECISION overflow threshold, in this case, the content 00054 * of SA in exit is unspecified. 00055 * 00056 * ========= 00057 * 00058 * .. Local Scalars .. 00059 INTEGER I, J 00060 DOUBLE PRECISION RMAX 00061 * .. 00062 * .. Intrinsic Functions .. 00063 INTRINSIC DBLE, DIMAG 00064 * .. 00065 * .. External Functions .. 00066 REAL SLAMCH 00067 EXTERNAL SLAMCH 00068 * .. 00069 * .. Executable Statements .. 00070 * 00071 RMAX = SLAMCH( 'O' ) 00072 DO 20 J = 1, N 00073 DO 10 I = 1, M 00074 IF( ( DBLE( A( I, J ) ).LT.-RMAX ) .OR. 00075 + ( DBLE( A( I, J ) ).GT.RMAX ) .OR. 00076 + ( DIMAG( A( I, J ) ).LT.-RMAX ) .OR. 00077 + ( DIMAG( A( I, J ) ).GT.RMAX ) ) THEN 00078 INFO = 1 00079 GO TO 30 00080 END IF 00081 SA( I, J ) = A( I, J ) 00082 10 CONTINUE 00083 20 CONTINUE 00084 INFO = 0 00085 30 CONTINUE 00086 RETURN 00087 * 00088 * End of ZLAG2C 00089 * 00090 END