| #include "f2c.h" |
| |
| int dlaset_(char *uplo, integer *m, integer *n, doublereal * |
| alpha, doublereal *beta, doublereal *a, integer *lda) |
| { |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| integer i__1, i__2, i__3; |
| |
| static integer i, j; |
| extern logical lsame_(char *, char *); |
| |
| |
| #define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)] |
| |
| if (lsame_(uplo, "U")) { |
| |
| |
| |
| |
| |
| i__1 = *n; |
| for (j = 2; j <= *n; ++j) { |
| |
| i__3 = j - 1; |
| i__2 = min(i__3,*m); |
| for (i = 1; i <= min(j-1,*m); ++i) { |
| A(i,j) = *alpha; |
| |
| } |
| |
| } |
| |
| } else if (lsame_(uplo, "L")) { |
| |
| |
| |
| |
| |
| i__1 = min(*m,*n); |
| for (j = 1; j <= min(*m,*n); ++j) { |
| i__2 = *m; |
| for (i = j + 1; i <= *m; ++i) { |
| A(i,j) = *alpha; |
| |
| } |
| |
| } |
| |
| } else { |
| |
| |
| |
| i__1 = *n; |
| for (j = 1; j <= *n; ++j) { |
| i__2 = *m; |
| for (i = 1; i <= *m; ++i) { |
| A(i,j) = *alpha; |
| |
| } |
| |
| } |
| } |
| |
| |
| |
| i__1 = min(*m,*n); |
| for (i = 1; i <= min(*m,*n); ++i) { |
| A(i,i) = *beta; |
| |
| } |
| |
| return 0; |
| |
| |
| |
| } |
| |