3 /* Table of constant values */
5 static doublereal c_b7 = 1.;
6 static integer c__1 = 1;
8 /* Subroutine */ int dlauu2_(char *uplo, integer *n, doublereal *a, integer *
11 /* System generated locals */
12 integer a_dim1, a_offset, i__1, i__2, i__3;
17 extern doublereal ddot_(integer *, doublereal *, integer *, doublereal *,
19 extern /* Subroutine */ int dscal_(integer *, doublereal *, doublereal *,
21 extern logical lsame_(char *, char *);
22 extern /* Subroutine */ int dgemv_(char *, integer *, integer *,
23 doublereal *, doublereal *, integer *, doublereal *, integer *,
24 doublereal *, doublereal *, integer *);
26 extern /* Subroutine */ int xerbla_(char *, integer *);
29 /* -- LAPACK auxiliary routine (version 3.1) -- */
30 /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
33 /* .. Scalar Arguments .. */
35 /* .. Array Arguments .. */
41 /* DLAUU2 computes the product U * U' or L' * L, where the triangular */
42 /* factor U or L is stored in the upper or lower triangular part of */
45 /* If UPLO = 'U' or 'u' then the upper triangle of the result is stored, */
46 /* overwriting the factor U in A. */
47 /* If UPLO = 'L' or 'l' then the lower triangle of the result is stored, */
48 /* overwriting the factor L in A. */
50 /* This is the unblocked form of the algorithm, calling Level 2 BLAS. */
55 /* UPLO (input) CHARACTER*1 */
56 /* Specifies whether the triangular factor stored in the array A */
57 /* is upper or lower triangular: */
58 /* = 'U': Upper triangular */
59 /* = 'L': Lower triangular */
61 /* N (input) INTEGER */
62 /* The order of the triangular factor U or L. N >= 0. */
64 /* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) */
65 /* On entry, the triangular factor U or L. */
66 /* On exit, if UPLO = 'U', the upper triangle of A is */
67 /* overwritten with the upper triangle of the product U * U'; */
68 /* if UPLO = 'L', the lower triangle of A is overwritten with */
69 /* the lower triangle of the product L' * L. */
71 /* LDA (input) INTEGER */
72 /* The leading dimension of the array A. LDA >= max(1,N). */
74 /* INFO (output) INTEGER */
75 /* = 0: successful exit */
76 /* < 0: if INFO = -k, the k-th argument had an illegal value */
78 /* ===================================================================== */
80 /* .. Parameters .. */
82 /* .. Local Scalars .. */
84 /* .. External Functions .. */
86 /* .. External Subroutines .. */
88 /* .. Intrinsic Functions .. */
90 /* .. Executable Statements .. */
92 /* Test the input parameters. */
94 /* Parameter adjustments */
96 a_offset = 1 + a_dim1;
101 upper = lsame_(uplo, "U");
102 if (! upper && ! lsame_(uplo, "L")) {
106 } else if (*lda < max(1,*n)) {
111 xerbla_("DLAUU2", &i__1);
115 /* Quick return if possible */
123 /* Compute the product U * U'. */
126 for (i__ = 1; i__ <= i__1; ++i__) {
127 aii = a[i__ + i__ * a_dim1];
130 a[i__ + i__ * a_dim1] = ddot_(&i__2, &a[i__ + i__ * a_dim1],
131 lda, &a[i__ + i__ * a_dim1], lda);
134 dgemv_("No transpose", &i__2, &i__3, &c_b7, &a[(i__ + 1) *
135 a_dim1 + 1], lda, &a[i__ + (i__ + 1) * a_dim1], lda, &
136 aii, &a[i__ * a_dim1 + 1], &c__1);
138 dscal_(&i__, &aii, &a[i__ * a_dim1 + 1], &c__1);
145 /* Compute the product L' * L. */
148 for (i__ = 1; i__ <= i__1; ++i__) {
149 aii = a[i__ + i__ * a_dim1];
152 a[i__ + i__ * a_dim1] = ddot_(&i__2, &a[i__ + i__ * a_dim1], &
153 c__1, &a[i__ + i__ * a_dim1], &c__1);
156 dgemv_("Transpose", &i__2, &i__3, &c_b7, &a[i__ + 1 + a_dim1],
157 lda, &a[i__ + 1 + i__ * a_dim1], &c__1, &aii, &a[i__
160 dscal_(&i__, &aii, &a[i__ + a_dim1], lda);