| 1 | /* lapack/single/slaset.f -- translated by f2c (version 20050501). |
| 2 | You must link the resulting object file with libf2c: |
| 3 | on Microsoft Windows system, link with libf2c.lib; |
| 4 | on Linux or Unix systems, link with .../path/to/libf2c.a -lm |
| 5 | or, if you install libf2c.a in a standard place, with -lf2c -lm |
| 6 | -- in that order, at the end of the command line, as in |
| 7 | cc *.o -lf2c -lm |
| 8 | Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., |
| 9 | |
| 10 | http://www.netlib.org/f2c/libf2c.zip |
| 11 | */ |
| 12 | |
| 13 | #ifdef __cplusplus |
| 14 | extern "C" { |
| 15 | #endif |
| 16 | #include "v3p_netlib.h"cxx . . $ `<file>/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib.h`/ |
| 17 | |
| 18 | /*< SUBROUTINE SLASET( UPLO, M, N, ALPHA, BETA, A, LDA ) >*/ |
| 19 | /* Subroutine */ int slaset_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:262:9`!(char *uplo, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *m, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *n, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *alpha, |
| 20 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *beta, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *a, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *lda, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`! uplo_len) |
| 21 | { |
| 22 | /* System generated locals */ |
| 23 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! a_dim1, a_offset, i__1, i__2, i__3; |
| 24 | |
| 25 | /* Local variables */ |
| 26 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__, j; |
| 27 | extern logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(const char *, const char *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!); |
| 28 | (void)uplo_len; |
| 29 | |
| 30 | /* -- LAPACK auxiliary routine (version 3.0) -- */ |
| 31 | /* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., */ |
| 32 | /* Courant Institute, Argonne National Lab, and Rice University */ |
| 33 | /* October 31, 1992 */ |
| 34 | |
| 35 | /* .. Scalar Arguments .. */ |
| 36 | /*< CHARACTER UPLO >*/ |
| 37 | /*< INTEGER LDA, M, N >*/ |
| 38 | /*< REAL ALPHA, BETA >*/ |
| 39 | /* .. */ |
| 40 | /* .. Array Arguments .. */ |
| 41 | /*< REAL A( LDA, * ) >*/ |
| 42 | /* .. */ |
| 43 | |
| 44 | /* Purpose */ |
| 45 | /* ======= */ |
| 46 | |
| 47 | /* SLASET initializes an m-by-n matrix A to BETA on the diagonal and */ |
| 48 | /* ALPHA on the offdiagonals. */ |
| 49 | |
| 50 | /* Arguments */ |
| 51 | /* ========= */ |
| 52 | |
| 53 | /* UPLO (input) CHARACTER*1 */ |
| 54 | /* Specifies the part of the matrix A to be set. */ |
| 55 | /* = 'U': Upper triangular part is set; the strictly lower */ |
| 56 | /* triangular part of A is not changed. */ |
| 57 | /* = 'L': Lower triangular part is set; the strictly upper */ |
| 58 | /* triangular part of A is not changed. */ |
| 59 | /* Otherwise: All of the matrix A is set. */ |
| 60 | |
| 61 | /* M (input) INTEGER */ |
| 62 | /* The number of rows of the matrix A. M >= 0. */ |
| 63 | |
| 64 | /* N (input) INTEGER */ |
| 65 | /* The number of columns of the matrix A. N >= 0. */ |
| 66 | |
| 67 | /* ALPHA (input) REAL */ |
| 68 | /* The constant to which the offdiagonal elements are to be set. */ |
| 69 | |
| 70 | /* BETA (input) REAL */ |
| 71 | /* The constant to which the diagonal elements are to be set. */ |
| 72 | |
| 73 | /* A (input/output) REAL array, dimension (LDA,N) */ |
| 74 | /* On exit, the leading m-by-n submatrix of A is set as follows: */ |
| 75 | |
| 76 | /* if UPLO = 'U', A(i,j) = ALPHA, 1<=i<=j-1, 1<=j<=n, */ |
| 77 | /* if UPLO = 'L', A(i,j) = ALPHA, j+1<=i<=m, 1<=j<=n, */ |
| 78 | /* otherwise, A(i,j) = ALPHA, 1<=i<=m, 1<=j<=n, i.ne.j, */ |
| 79 | |
| 80 | /* and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n). */ |
| 81 | |
| 82 | /* LDA (input) INTEGER */ |
| 83 | /* The leading dimension of the array A. LDA >= max(1,M). */ |
| 84 | |
| 85 | /* ===================================================================== */ |
| 86 | |
| 87 | /* .. Local Scalars .. */ |
| 88 | /*< INTEGER I, J >*/ |
| 89 | /* .. */ |
| 90 | /* .. External Functions .. */ |
| 91 | /*< LOGICAL LSAME >*/ |
| 92 | /*< EXTERNAL LSAME >*/ |
| 93 | /* .. */ |
| 94 | /* .. Intrinsic Functions .. */ |
| 95 | /*< INTRINSIC MIN >*/ |
| 96 | /* .. */ |
| 97 | /* .. Executable Statements .. */ |
| 98 | |
| 99 | /*< IF( LSAME( UPLO, 'U' ) ) THEN >*/ |
| 100 | /* Parameter adjustments */ |
| 101 | a_dim1 = *lda; |
| 102 | a_offset = 1 + a_dim1; |
| 103 | a -= a_offset; |
| 104 | |
| 105 | /* Function Body */ |
| 106 | if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(uplo, "U", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 107 | |
| 108 | /* Set the strictly upper triangular or trapezoidal part of the */ |
| 109 | /* array to ALPHA. */ |
| 110 | |
| 111 | /*< DO 20 J = 2, N >*/ |
| 112 | i__1 = *n; |
| 113 | for (j = 2; j <= i__1; ++j) { |
| 114 | /*< DO 10 I = 1, MIN( J-1, M ) >*/ |
| 115 | /* Computing MIN */ |
| 116 | i__3 = j - 1; |
| 117 | i__2 = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(i__3,*m); |
| 118 | for (i__ = 1; i__ <= i__2; ++i__) { |
| 119 | /*< A( I, J ) = ALPHA >*/ |
| 120 | a[i__ + j * a_dim1] = *alpha; |
| 121 | /*< 10 CONTINUE >*/ |
| 122 | /* L10: */ |
| 123 | } |
| 124 | /*< 20 CONTINUE >*/ |
| 125 | /* L20: */ |
| 126 | } |
| 127 | |
| 128 | /*< ELSE IF( LSAME( UPLO, 'L' ) ) THEN >*/ |
| 129 | } else if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(uplo, "L", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 130 | |
| 131 | /* Set the strictly lower triangular or trapezoidal part of the */ |
| 132 | /* array to ALPHA. */ |
| 133 | |
| 134 | /*< DO 40 J = 1, MIN( M, N ) >*/ |
| 135 | i__1 = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(*m,*n); |
| 136 | for (j = 1; j <= i__1; ++j) { |
| 137 | /*< DO 30 I = J + 1, M >*/ |
| 138 | i__2 = *m; |
| 139 | for (i__ = j + 1; i__ <= i__2; ++i__) { |
| 140 | /*< A( I, J ) = ALPHA >*/ |
| 141 | a[i__ + j * a_dim1] = *alpha; |
| 142 | /*< 30 CONTINUE >*/ |
| 143 | /* L30: */ |
| 144 | } |
| 145 | /*< 40 CONTINUE >*/ |
| 146 | /* L40: */ |
| 147 | } |
| 148 | |
| 149 | /*< ELSE >*/ |
| 150 | } else { |
| 151 | |
| 152 | /* Set the leading m-by-n submatrix to ALPHA. */ |
| 153 | |
| 154 | /*< DO 60 J = 1, N >*/ |
| 155 | i__1 = *n; |
| 156 | for (j = 1; j <= i__1; ++j) { |
| 157 | /*< DO 50 I = 1, M >*/ |
| 158 | i__2 = *m; |
| 159 | for (i__ = 1; i__ <= i__2; ++i__) { |
| 160 | /*< A( I, J ) = ALPHA >*/ |
| 161 | a[i__ + j * a_dim1] = *alpha; |
| 162 | /*< 50 CONTINUE >*/ |
| 163 | /* L50: */ |
| 164 | } |
| 165 | /*< 60 CONTINUE >*/ |
| 166 | /* L60: */ |
| 167 | } |
| 168 | /*< END IF >*/ |
| 169 | } |
| 170 | |
| 171 | /* Set the first min(M,N) diagonal elements to BETA. */ |
| 172 | |
| 173 | /*< DO 70 I = 1, MIN( M, N ) >*/ |
| 174 | i__1 = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(*m,*n); |
| 175 | for (i__ = 1; i__ <= i__1; ++i__) { |
| 176 | /*< A( I, I ) = BETA >*/ |
| 177 | a[i__ + i__ * a_dim1] = *beta; |
| 178 | /*< 70 CONTINUE >*/ |
| 179 | /* L70: */ |
| 180 | } |
| 181 | |
| 182 | /*< RETURN >*/ |
| 183 | return 0; |
| 184 | |
| 185 | /* End of SLASET */ |
| 186 | |
| 187 | /*< END >*/ |
| 188 | } /* slaset_ */ |
| 189 | |
| 190 | #ifdef __cplusplus |
| 191 | } |
| 192 | #endif |