00001 /* zlaipd.f -- translated by f2c (version 20061008). 00002 You must link the resulting object file with libf2c: 00003 on Microsoft Windows system, link with libf2c.lib; 00004 on Linux or Unix systems, link with .../path/to/libf2c.a -lm 00005 or, if you install libf2c.a in a standard place, with -lf2c -lm 00006 -- in that order, at the end of the command line, as in 00007 cc *.o -lf2c -lm 00008 Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., 00009 00010 http://www.netlib.org/f2c/libf2c.zip 00011 */ 00012 00013 #include "f2c.h" 00014 #include "blaswrap.h" 00015 00016 /* Subroutine */ int zlaipd_(integer *n, doublecomplex *a, integer *inda, 00017 integer *vinda) 00018 { 00019 /* System generated locals */ 00020 integer i__1, i__2, i__3; 00021 doublereal d__1; 00022 doublecomplex z__1; 00023 00024 /* Local variables */ 00025 integer i__, ia, ixa; 00026 extern doublereal dlamch_(char *); 00027 doublereal bignum; 00028 00029 00030 /* -- LAPACK test routine (version 3.1) -- */ 00031 /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */ 00032 /* November 2006 */ 00033 00034 /* .. Scalar Arguments .. */ 00035 /* .. */ 00036 /* .. Array Arguments .. */ 00037 /* .. */ 00038 00039 /* Purpose */ 00040 /* ======= */ 00041 00042 /* ZLAIPD sets the imaginary part of the diagonal elements of a complex */ 00043 /* matrix A to a large value. This is used to test LAPACK routines for */ 00044 /* complex Hermitian matrices, which are not supposed to access or use */ 00045 /* the imaginary parts of the diagonals. */ 00046 00047 /* Arguments */ 00048 /* ========= */ 00049 00050 /* N (input) INTEGER */ 00051 /* The number of diagonal elements of A. */ 00052 00053 /* A (input/output) COMPLEX*16 array, dimension */ 00054 /* (1+(N-1)*INDA+(N-2)*VINDA) */ 00055 /* On entry, the complex (Hermitian) matrix A. */ 00056 /* On exit, the imaginary parts of the diagonal elements are set */ 00057 /* to BIGNUM = EPS / SAFMIN, where EPS is the machine epsilon and */ 00058 /* SAFMIN is the safe minimum. */ 00059 00060 /* INDA (input) INTEGER */ 00061 /* The increment between A(1) and the next diagonal element of A. */ 00062 /* Typical values are */ 00063 /* = LDA+1: square matrices with leading dimension LDA */ 00064 /* = 2: packed upper triangular matrix, starting at A(1,1) */ 00065 /* = N: packed lower triangular matrix, starting at A(1,1) */ 00066 00067 /* VINDA (input) INTEGER */ 00068 /* The change in the diagonal increment between columns of A. */ 00069 /* Typical values are */ 00070 /* = 0: no change, the row and column increments in A are fixed */ 00071 /* = 1: packed upper triangular matrix */ 00072 /* = -1: packed lower triangular matrix */ 00073 00074 /* ===================================================================== */ 00075 00076 /* .. Local Scalars .. */ 00077 /* .. */ 00078 /* .. External Functions .. */ 00079 /* .. */ 00080 /* .. Intrinsic Functions .. */ 00081 /* .. */ 00082 /* .. Executable Statements .. */ 00083 00084 /* Parameter adjustments */ 00085 --a; 00086 00087 /* Function Body */ 00088 bignum = dlamch_("Epsilon") / dlamch_("Safe minimum"); 00089 ia = 1; 00090 ixa = *inda; 00091 i__1 = *n; 00092 for (i__ = 1; i__ <= i__1; ++i__) { 00093 i__2 = ia; 00094 i__3 = ia; 00095 d__1 = a[i__3].r; 00096 z__1.r = d__1, z__1.i = bignum; 00097 a[i__2].r = z__1.r, a[i__2].i = z__1.i; 00098 ia += ixa; 00099 ixa += *vinda; 00100 /* L10: */ 00101 } 00102 return 0; 00103 } /* zlaipd_ */