~ubuntu-branches/ubuntu/trusty/nwchem/trusty-proposed

« back to all changes in this revision

Viewing changes to src/blas/single/ssymv.f

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Daniel Leidert, Andreas Tille, Michael Banck
  • Date: 2013-07-04 12:14:55 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130704121455-5tvsx2qabor3nrui
Tags: 6.3-1
* New upstream release.
* Fixes anisotropic properties (Closes: #696361).
* New features include:
  + Multi-reference coupled cluster (MRCC) approaches
  + Hybrid DFT calculations with short-range HF 
  + New density-functionals including Minnesota (M08, M11) and HSE hybrid
    functionals
  + X-ray absorption spectroscopy (XAS) with TDDFT
  + Analytical gradients for the COSMO solvation model
  + Transition densities from TDDFT 
  + DFT+U and Electron-Transfer (ET) methods for plane wave calculations
  + Exploitation of space group symmetry in plane wave geometry optimizations
  + Local density of states (LDOS) collective variable added to Metadynamics
  + Various new XC functionals added for plane wave calculations, including
    hybrid and range-corrected ones
  + Electric field gradients with relativistic corrections 
  + Nudged Elastic Band optimization method
  + Updated basis sets and ECPs 

[ Daniel Leidert ]
* debian/watch: Fixed.

[ Andreas Tille ]
* debian/upstream: References

[ Michael Banck ]
* debian/upstream (Name): New field.
* debian/patches/02_makefile_flags.patch: Refreshed.
* debian/patches/06_statfs_kfreebsd.patch: Likewise.
* debian/patches/07_ga_target_force_linux.patch: Likewise.
* debian/patches/05_avoid_inline_assembler.patch: Removed, no longer needed.
* debian/patches/09_backported_6.1.1_fixes.patch: Likewise.
* debian/control (Build-Depends): Added gfortran-4.7 and gcc-4.7.
* debian/patches/10_force_gcc-4.7.patch: New patch, explicitly sets
  gfortran-4.7 and gcc-4.7, fixes test suite hang with gcc-4.8 (Closes:
  #701328, #713262).
* debian/testsuite: Added tests for COSMO analytical gradients and MRCC.
* debian/rules (MRCC_METHODS): New variable, required to enable MRCC methods.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
      SUBROUTINE SSYMV ( UPLO, N, ALPHA, A, LDA, X, INCX,
2
 
     $                   BETA, Y, INCY )
3
 
*
4
 
* $Id: ssymv.f 19695 2010-10-29 16:51:02Z d3y133 $
 
1
*> \brief \b SSYMV
 
2
*
 
3
*  =========== DOCUMENTATION ===========
 
4
*
 
5
* Online html documentation available at 
 
6
*            http://www.netlib.org/lapack/explore-html/ 
 
7
*
 
8
*  Definition:
 
9
*  ===========
 
10
*
 
11
*       SUBROUTINE SSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
 
12
 
13
*       .. Scalar Arguments ..
 
14
*       REAL ALPHA,BETA
 
15
*       INTEGER INCX,INCY,LDA,N
 
16
*       CHARACTER UPLO
 
17
*       ..
 
18
*       .. Array Arguments ..
 
19
*       REAL A(LDA,*),X(*),Y(*)
 
20
*       ..
 
21
*  
 
22
*
 
23
*> \par Purpose:
 
24
*  =============
 
25
*>
 
26
*> \verbatim
 
27
*>
 
28
*> SSYMV  performs the matrix-vector  operation
 
29
*>
 
30
*>    y := alpha*A*x + beta*y,
 
31
*>
 
32
*> where alpha and beta are scalars, x and y are n element vectors and
 
33
*> A is an n by n symmetric matrix.
 
34
*> \endverbatim
 
35
*
 
36
*  Arguments:
 
37
*  ==========
 
38
*
 
39
*> \param[in] UPLO
 
40
*> \verbatim
 
41
*>          UPLO is CHARACTER*1
 
42
*>           On entry, UPLO specifies whether the upper or lower
 
43
*>           triangular part of the array A is to be referenced as
 
44
*>           follows:
 
45
*>
 
46
*>              UPLO = 'U' or 'u'   Only the upper triangular part of A
 
47
*>                                  is to be referenced.
 
48
*>
 
49
*>              UPLO = 'L' or 'l'   Only the lower triangular part of A
 
50
*>                                  is to be referenced.
 
51
*> \endverbatim
 
52
*>
 
53
*> \param[in] N
 
54
*> \verbatim
 
55
*>          N is INTEGER
 
56
*>           On entry, N specifies the order of the matrix A.
 
57
*>           N must be at least zero.
 
58
*> \endverbatim
 
59
*>
 
60
*> \param[in] ALPHA
 
61
*> \verbatim
 
62
*>          ALPHA is REAL
 
63
*>           On entry, ALPHA specifies the scalar alpha.
 
64
*> \endverbatim
 
65
*>
 
66
*> \param[in] A
 
67
*> \verbatim
 
68
*>          A is REAL array of DIMENSION ( LDA, n ).
 
69
*>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 
70
*>           upper triangular part of the array A must contain the upper
 
71
*>           triangular part of the symmetric matrix and the strictly
 
72
*>           lower triangular part of A is not referenced.
 
73
*>           Before entry with UPLO = 'L' or 'l', the leading n by n
 
74
*>           lower triangular part of the array A must contain the lower
 
75
*>           triangular part of the symmetric matrix and the strictly
 
76
*>           upper triangular part of A is not referenced.
 
77
*> \endverbatim
 
78
*>
 
79
*> \param[in] LDA
 
80
*> \verbatim
 
81
*>          LDA is INTEGER
 
82
*>           On entry, LDA specifies the first dimension of A as declared
 
83
*>           in the calling (sub) program. LDA must be at least
 
84
*>           max( 1, n ).
 
85
*> \endverbatim
 
86
*>
 
87
*> \param[in] X
 
88
*> \verbatim
 
89
*>          X is REAL array of dimension at least
 
90
*>           ( 1 + ( n - 1 )*abs( INCX ) ).
 
91
*>           Before entry, the incremented array X must contain the n
 
92
*>           element vector x.
 
93
*> \endverbatim
 
94
*>
 
95
*> \param[in] INCX
 
96
*> \verbatim
 
97
*>          INCX is INTEGER
 
98
*>           On entry, INCX specifies the increment for the elements of
 
99
*>           X. INCX must not be zero.
 
100
*> \endverbatim
 
101
*>
 
102
*> \param[in] BETA
 
103
*> \verbatim
 
104
*>          BETA is REAL
 
105
*>           On entry, BETA specifies the scalar beta. When BETA is
 
106
*>           supplied as zero then Y need not be set on input.
 
107
*> \endverbatim
 
108
*>
 
109
*> \param[in,out] Y
 
110
*> \verbatim
 
111
*>          Y is REAL array of dimension at least
 
112
*>           ( 1 + ( n - 1 )*abs( INCY ) ).
 
113
*>           Before entry, the incremented array Y must contain the n
 
114
*>           element vector y. On exit, Y is overwritten by the updated
 
115
*>           vector y.
 
116
*> \endverbatim
 
117
*>
 
118
*> \param[in] INCY
 
119
*> \verbatim
 
120
*>          INCY is INTEGER
 
121
*>           On entry, INCY specifies the increment for the elements of
 
122
*>           Y. INCY must not be zero.
 
123
*> \endverbatim
 
124
*
 
125
*  Authors:
 
126
*  ========
 
127
*
 
128
*> \author Univ. of Tennessee 
 
129
*> \author Univ. of California Berkeley 
 
130
*> \author Univ. of Colorado Denver 
 
131
*> \author NAG Ltd. 
 
132
*
 
133
*> \date November 2011
 
134
*
 
135
*> \ingroup single_blas_level2
 
136
*
 
137
*> \par Further Details:
 
138
*  =====================
 
139
*>
 
140
*> \verbatim
 
141
*>
 
142
*>  Level 2 Blas routine.
 
143
*>  The vector and matrix arguments are not referenced when N = 0, or M = 0
 
144
*>
 
145
*>  -- Written on 22-October-1986.
 
146
*>     Jack Dongarra, Argonne National Lab.
 
147
*>     Jeremy Du Croz, Nag Central Office.
 
148
*>     Sven Hammarling, Nag Central Office.
 
149
*>     Richard Hanson, Sandia National Labs.
 
150
*> \endverbatim
 
151
*>
 
152
*  =====================================================================
 
153
      SUBROUTINE SSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
 
154
*
 
155
*  -- Reference BLAS level2 routine (version 3.4.0) --
 
156
*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 
157
*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 
158
*     November 2011
5
159
*
6
160
*     .. Scalar Arguments ..
7
 
      REAL               ALPHA, BETA
8
 
      INTEGER            INCX, INCY, LDA, N
9
 
      CHARACTER*1        UPLO
 
161
      REAL ALPHA,BETA
 
162
      INTEGER INCX,INCY,LDA,N
 
163
      CHARACTER UPLO
 
164
*     ..
10
165
*     .. Array Arguments ..
11
 
      REAL               A( LDA, * ), X( * ), Y( * )
 
166
      REAL A(LDA,*),X(*),Y(*)
12
167
*     ..
13
168
*
14
 
*  Purpose
15
 
*  =======
16
 
*
17
 
*  SSYMV  performs the matrix-vector  operation
18
 
*
19
 
*     y := alpha*A*x + beta*y,
20
 
*
21
 
*  where alpha and beta are scalars, x and y are n element vectors and
22
 
*  A is an n by n symmetric matrix.
23
 
*
24
 
*  Parameters
25
 
*  ==========
26
 
*
27
 
*  UPLO   - CHARACTER*1.
28
 
*           On entry, UPLO specifies whether the upper or lower
29
 
*           triangular part of the array A is to be referenced as
30
 
*           follows:
31
 
*
32
 
*              UPLO = 'U' or 'u'   Only the upper triangular part of A
33
 
*                                  is to be referenced.
34
 
*
35
 
*              UPLO = 'L' or 'l'   Only the lower triangular part of A
36
 
*                                  is to be referenced.
37
 
*
38
 
*           Unchanged on exit.
39
 
*
40
 
*  N      - INTEGER.
41
 
*           On entry, N specifies the order of the matrix A.
42
 
*           N must be at least zero.
43
 
*           Unchanged on exit.
44
 
*
45
 
*  ALPHA  - REAL            .
46
 
*           On entry, ALPHA specifies the scalar alpha.
47
 
*           Unchanged on exit.
48
 
*
49
 
*  A      - REAL             array of DIMENSION ( LDA, n ).
50
 
*           Before entry with  UPLO = 'U' or 'u', the leading n by n
51
 
*           upper triangular part of the array A must contain the upper
52
 
*           triangular part of the symmetric matrix and the strictly
53
 
*           lower triangular part of A is not referenced.
54
 
*           Before entry with UPLO = 'L' or 'l', the leading n by n
55
 
*           lower triangular part of the array A must contain the lower
56
 
*           triangular part of the symmetric matrix and the strictly
57
 
*           upper triangular part of A is not referenced.
58
 
*           Unchanged on exit.
59
 
*
60
 
*  LDA    - INTEGER.
61
 
*           On entry, LDA specifies the first dimension of A as declared
62
 
*           in the calling (sub) program. LDA must be at least
63
 
*           max( 1, n ).
64
 
*           Unchanged on exit.
65
 
*
66
 
*  X      - REAL             array of dimension at least
67
 
*           ( 1 + ( n - 1 )*abs( INCX ) ).
68
 
*           Before entry, the incremented array X must contain the n
69
 
*           element vector x.
70
 
*           Unchanged on exit.
71
 
*
72
 
*  INCX   - INTEGER.
73
 
*           On entry, INCX specifies the increment for the elements of
74
 
*           X. INCX must not be zero.
75
 
*           Unchanged on exit.
76
 
*
77
 
*  BETA   - REAL            .
78
 
*           On entry, BETA specifies the scalar beta. When BETA is
79
 
*           supplied as zero then Y need not be set on input.
80
 
*           Unchanged on exit.
81
 
*
82
 
*  Y      - REAL             array of dimension at least
83
 
*           ( 1 + ( n - 1 )*abs( INCY ) ).
84
 
*           Before entry, the incremented array Y must contain the n
85
 
*           element vector y. On exit, Y is overwritten by the updated
86
 
*           vector y.
87
 
*
88
 
*  INCY   - INTEGER.
89
 
*           On entry, INCY specifies the increment for the elements of
90
 
*           Y. INCY must not be zero.
91
 
*           Unchanged on exit.
92
 
*
93
 
*
94
 
*  Level 2 Blas routine.
95
 
*
96
 
*  -- Written on 22-October-1986.
97
 
*     Jack Dongarra, Argonne National Lab.
98
 
*     Jeremy Du Croz, Nag Central Office.
99
 
*     Sven Hammarling, Nag Central Office.
100
 
*     Richard Hanson, Sandia National Labs.
101
 
*
 
169
*  =====================================================================
102
170
*
103
171
*     .. Parameters ..
104
 
      REAL               ONE         , ZERO
105
 
      PARAMETER        ( ONE = 1.0E+0, ZERO = 0.0E+0 )
 
172
      REAL ONE,ZERO
 
173
      PARAMETER (ONE=1.0E+0,ZERO=0.0E+0)
 
174
*     ..
106
175
*     .. Local Scalars ..
107
 
      REAL               TEMP1, TEMP2
108
 
      INTEGER            I, INFO, IX, IY, J, JX, JY, KX, KY
 
176
      REAL TEMP1,TEMP2
 
177
      INTEGER I,INFO,IX,IY,J,JX,JY,KX,KY
 
178
*     ..
109
179
*     .. External Functions ..
110
 
      LOGICAL            LSAME
111
 
      EXTERNAL           LSAME
 
180
      LOGICAL LSAME
 
181
      EXTERNAL LSAME
 
182
*     ..
112
183
*     .. External Subroutines ..
113
 
      EXTERNAL           XERBLA
 
184
      EXTERNAL XERBLA
 
185
*     ..
114
186
*     .. Intrinsic Functions ..
115
 
      INTRINSIC          MAX
 
187
      INTRINSIC MAX
116
188
*     ..
117
 
*     .. Executable Statements ..
118
189
*
119
190
*     Test the input parameters.
120
191
*
121
192
      INFO = 0
122
 
      IF     ( .NOT.LSAME( UPLO, 'U' ).AND.
123
 
     $         .NOT.LSAME( UPLO, 'L' )      )THEN
124
 
         INFO = 1
125
 
      ELSE IF( N.LT.0 )THEN
126
 
         INFO = 2
127
 
      ELSE IF( LDA.LT.MAX( 1, N ) )THEN
128
 
         INFO = 5
129
 
      ELSE IF( INCX.EQ.0 )THEN
130
 
         INFO = 7
131
 
      ELSE IF( INCY.EQ.0 )THEN
132
 
         INFO = 10
 
193
      IF (.NOT.LSAME(UPLO,'U') .AND. .NOT.LSAME(UPLO,'L')) THEN
 
194
          INFO = 1
 
195
      ELSE IF (N.LT.0) THEN
 
196
          INFO = 2
 
197
      ELSE IF (LDA.LT.MAX(1,N)) THEN
 
198
          INFO = 5
 
199
      ELSE IF (INCX.EQ.0) THEN
 
200
          INFO = 7
 
201
      ELSE IF (INCY.EQ.0) THEN
 
202
          INFO = 10
133
203
      END IF
134
 
      IF( INFO.NE.0 )THEN
135
 
         CALL XERBLA( 'SSYMV ', INFO )
136
 
         RETURN
 
204
      IF (INFO.NE.0) THEN
 
205
          CALL XERBLA('SSYMV ',INFO)
 
206
          RETURN
137
207
      END IF
138
208
*
139
209
*     Quick return if possible.
140
210
*
141
 
      IF( ( N.EQ.0 ).OR.( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) )
142
 
     $   RETURN
 
211
      IF ((N.EQ.0) .OR. ((ALPHA.EQ.ZERO).AND. (BETA.EQ.ONE))) RETURN
143
212
*
144
213
*     Set up the start points in  X  and  Y.
145
214
*
146
 
      IF( INCX.GT.0 )THEN
147
 
         KX = 1
 
215
      IF (INCX.GT.0) THEN
 
216
          KX = 1
148
217
      ELSE
149
 
         KX = 1 - ( N - 1 )*INCX
 
218
          KX = 1 - (N-1)*INCX
150
219
      END IF
151
 
      IF( INCY.GT.0 )THEN
152
 
         KY = 1
 
220
      IF (INCY.GT.0) THEN
 
221
          KY = 1
153
222
      ELSE
154
 
         KY = 1 - ( N - 1 )*INCY
 
223
          KY = 1 - (N-1)*INCY
155
224
      END IF
156
225
*
157
226
*     Start the operations. In this version the elements of A are
160
229
*
161
230
*     First form  y := beta*y.
162
231
*
163
 
      IF( BETA.NE.ONE )THEN
164
 
         IF( INCY.EQ.1 )THEN
165
 
            IF( BETA.EQ.ZERO )THEN
166
 
               DO 10, I = 1, N
167
 
                  Y( I ) = ZERO
168
 
   10          CONTINUE
169
 
            ELSE
170
 
               DO 20, I = 1, N
171
 
                  Y( I ) = BETA*Y( I )
172
 
   20          CONTINUE
173
 
            END IF
174
 
         ELSE
175
 
            IY = KY
176
 
            IF( BETA.EQ.ZERO )THEN
177
 
               DO 30, I = 1, N
178
 
                  Y( IY ) = ZERO
179
 
                  IY      = IY   + INCY
180
 
   30          CONTINUE
181
 
            ELSE
182
 
               DO 40, I = 1, N
183
 
                  Y( IY ) = BETA*Y( IY )
184
 
                  IY      = IY           + INCY
185
 
   40          CONTINUE
186
 
            END IF
187
 
         END IF
 
232
      IF (BETA.NE.ONE) THEN
 
233
          IF (INCY.EQ.1) THEN
 
234
              IF (BETA.EQ.ZERO) THEN
 
235
                  DO 10 I = 1,N
 
236
                      Y(I) = ZERO
 
237
   10             CONTINUE
 
238
              ELSE
 
239
                  DO 20 I = 1,N
 
240
                      Y(I) = BETA*Y(I)
 
241
   20             CONTINUE
 
242
              END IF
 
243
          ELSE
 
244
              IY = KY
 
245
              IF (BETA.EQ.ZERO) THEN
 
246
                  DO 30 I = 1,N
 
247
                      Y(IY) = ZERO
 
248
                      IY = IY + INCY
 
249
   30             CONTINUE
 
250
              ELSE
 
251
                  DO 40 I = 1,N
 
252
                      Y(IY) = BETA*Y(IY)
 
253
                      IY = IY + INCY
 
254
   40             CONTINUE
 
255
              END IF
 
256
          END IF
188
257
      END IF
189
 
      IF( ALPHA.EQ.ZERO )
190
 
     $   RETURN
191
 
      IF( LSAME( UPLO, 'U' ) )THEN
 
258
      IF (ALPHA.EQ.ZERO) RETURN
 
259
      IF (LSAME(UPLO,'U')) THEN
192
260
*
193
261
*        Form  y  when A is stored in upper triangle.
194
262
*
195
 
         IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN
196
 
            DO 60, J = 1, N
197
 
               TEMP1 = ALPHA*X( J )
198
 
               TEMP2 = ZERO
199
 
               DO 50, I = 1, J - 1
200
 
                  Y( I ) = Y( I ) + TEMP1*A( I, J )
201
 
                  TEMP2  = TEMP2  + A( I, J )*X( I )
202
 
   50          CONTINUE
203
 
               Y( J ) = Y( J ) + TEMP1*A( J, J ) + ALPHA*TEMP2
204
 
   60       CONTINUE
205
 
         ELSE
206
 
            JX = KX
207
 
            JY = KY
208
 
            DO 80, J = 1, N
209
 
               TEMP1 = ALPHA*X( JX )
210
 
               TEMP2 = ZERO
211
 
               IX    = KX
212
 
               IY    = KY
213
 
               DO 70, I = 1, J - 1
214
 
                  Y( IY ) = Y( IY ) + TEMP1*A( I, J )
215
 
                  TEMP2   = TEMP2   + A( I, J )*X( IX )
216
 
                  IX      = IX      + INCX
217
 
                  IY      = IY      + INCY
218
 
   70          CONTINUE
219
 
               Y( JY ) = Y( JY ) + TEMP1*A( J, J ) + ALPHA*TEMP2
220
 
               JX      = JX      + INCX
221
 
               JY      = JY      + INCY
222
 
   80       CONTINUE
223
 
         END IF
 
263
          IF ((INCX.EQ.1) .AND. (INCY.EQ.1)) THEN
 
264
              DO 60 J = 1,N
 
265
                  TEMP1 = ALPHA*X(J)
 
266
                  TEMP2 = ZERO
 
267
                  DO 50 I = 1,J - 1
 
268
                      Y(I) = Y(I) + TEMP1*A(I,J)
 
269
                      TEMP2 = TEMP2 + A(I,J)*X(I)
 
270
   50             CONTINUE
 
271
                  Y(J) = Y(J) + TEMP1*A(J,J) + ALPHA*TEMP2
 
272
   60         CONTINUE
 
273
          ELSE
 
274
              JX = KX
 
275
              JY = KY
 
276
              DO 80 J = 1,N
 
277
                  TEMP1 = ALPHA*X(JX)
 
278
                  TEMP2 = ZERO
 
279
                  IX = KX
 
280
                  IY = KY
 
281
                  DO 70 I = 1,J - 1
 
282
                      Y(IY) = Y(IY) + TEMP1*A(I,J)
 
283
                      TEMP2 = TEMP2 + A(I,J)*X(IX)
 
284
                      IX = IX + INCX
 
285
                      IY = IY + INCY
 
286
   70             CONTINUE
 
287
                  Y(JY) = Y(JY) + TEMP1*A(J,J) + ALPHA*TEMP2
 
288
                  JX = JX + INCX
 
289
                  JY = JY + INCY
 
290
   80         CONTINUE
 
291
          END IF
224
292
      ELSE
225
293
*
226
294
*        Form  y  when A is stored in lower triangle.
227
295
*
228
 
         IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN
229
 
            DO 100, J = 1, N
230
 
               TEMP1  = ALPHA*X( J )
231
 
               TEMP2  = ZERO
232
 
               Y( J ) = Y( J )       + TEMP1*A( J, J )
233
 
               DO 90, I = J + 1, N
234
 
                  Y( I ) = Y( I ) + TEMP1*A( I, J )
235
 
                  TEMP2  = TEMP2  + A( I, J )*X( I )
236
 
   90          CONTINUE
237
 
               Y( J ) = Y( J ) + ALPHA*TEMP2
238
 
  100       CONTINUE
239
 
         ELSE
240
 
            JX = KX
241
 
            JY = KY
242
 
            DO 120, J = 1, N
243
 
               TEMP1   = ALPHA*X( JX )
244
 
               TEMP2   = ZERO
245
 
               Y( JY ) = Y( JY )       + TEMP1*A( J, J )
246
 
               IX      = JX
247
 
               IY      = JY
248
 
               DO 110, I = J + 1, N
249
 
                  IX      = IX      + INCX
250
 
                  IY      = IY      + INCY
251
 
                  Y( IY ) = Y( IY ) + TEMP1*A( I, J )
252
 
                  TEMP2   = TEMP2   + A( I, J )*X( IX )
253
 
  110          CONTINUE
254
 
               Y( JY ) = Y( JY ) + ALPHA*TEMP2
255
 
               JX      = JX      + INCX
256
 
               JY      = JY      + INCY
257
 
  120       CONTINUE
258
 
         END IF
 
296
          IF ((INCX.EQ.1) .AND. (INCY.EQ.1)) THEN
 
297
              DO 100 J = 1,N
 
298
                  TEMP1 = ALPHA*X(J)
 
299
                  TEMP2 = ZERO
 
300
                  Y(J) = Y(J) + TEMP1*A(J,J)
 
301
                  DO 90 I = J + 1,N
 
302
                      Y(I) = Y(I) + TEMP1*A(I,J)
 
303
                      TEMP2 = TEMP2 + A(I,J)*X(I)
 
304
   90             CONTINUE
 
305
                  Y(J) = Y(J) + ALPHA*TEMP2
 
306
  100         CONTINUE
 
307
          ELSE
 
308
              JX = KX
 
309
              JY = KY
 
310
              DO 120 J = 1,N
 
311
                  TEMP1 = ALPHA*X(JX)
 
312
                  TEMP2 = ZERO
 
313
                  Y(JY) = Y(JY) + TEMP1*A(J,J)
 
314
                  IX = JX
 
315
                  IY = JY
 
316
                  DO 110 I = J + 1,N
 
317
                      IX = IX + INCX
 
318
                      IY = IY + INCY
 
319
                      Y(IY) = Y(IY) + TEMP1*A(I,J)
 
320
                      TEMP2 = TEMP2 + A(I,J)*X(IX)
 
321
  110             CONTINUE
 
322
                  Y(JY) = Y(JY) + ALPHA*TEMP2
 
323
                  JX = JX + INCX
 
324
                  JY = JY + INCY
 
325
  120         CONTINUE
 
326
          END IF
259
327
      END IF
260
328
*
261
329
      RETURN