3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
11 * REAL FUNCTION SDSDOT(N,SB,SX,INCX,SY,INCY)
13 * .. Scalar Arguments ..
17 * .. Array Arguments ..
24 * Compute the inner product of two vectors with extended
25 * precision accumulation.
27 * Returns S.P. result with dot product accumulated in D.P.
28 * SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY),
29 * where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is
30 * defined in a similar way using INCY.
34 * Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
35 * Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
41 * number of elements in input vector(s)
44 * single precision scalar to be added to inner product
46 * SX (input) REAL array, dimension (N)
47 * single precision vector with N elements
49 * INCX (input) INTEGER
50 * storage spacing between elements of SX
52 * SY (input) REAL array, dimension (N)
53 * single precision vector with N elements
55 * INCY (input) INTEGER
56 * storage spacing between elements of SY
58 * SDSDOT (output) REAL
59 * single precision dot product (SB if N .LE. 0)
66 * C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T.
67 * Krogh, Basic linear algebra subprograms for Fortran
68 * usage, Algorithm No. 539, Transactions on Mathematical
69 * Software 5, 3 (September 1979), pp. 308-323.
71 * REVISION HISTORY (YYMMDD)
74 * 890531 Changed all specific intrinsics to generic. (WRB)
75 * 890831 Modified array declarations. (WRB)
76 * 890831 REVISION DATE from Version 3.2
77 * 891214 Prologue converted to Version 4.0 format. (BAB)
78 * 920310 Corrected definition of LX in DESCRIPTION. (WRB)
79 * 920501 Reformatted the REFERENCES section. (WRB)
80 * 070118 Reformat to LAPACK coding style
82 * =====================================================================
85 * DOUBLE PRECISION DSDOT
88 * .. Intrinsic Functions ..
96 * IF (INCX.EQ.INCY .AND. INCX.GT.0) THEN
98 * Code for equal and positive increments.
102 * DSDOT = DSDOT + DBLE(SX(I))*DBLE(SY(I))
106 * Code for unequal or nonpositive increments.
110 * IF (INCX.LT.0) KX = 1 + (1-N)*INCX
111 * IF (INCY.LT.0) KY = 1 + (1-N)*INCY
113 * DSDOT = DSDOT + DBLE(SX(KX))*DBLE(SY(KY))
131 *> \author Univ. of Tennessee
132 *> \author Univ. of California Berkeley
133 *> \author Univ. of Colorado Denver
136 *> \date November 2011
138 *> \ingroup single_blas_level1
140 * =====================================================================
141 REAL FUNCTION SDSDOT(N,SB,SX,INCX,SY,INCY)
143 * -- Reference BLAS level1 routine (version 3.4.0) --
144 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
145 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
148 * .. Scalar Arguments ..
152 * .. Array Arguments ..
159 * Compute the inner product of two vectors with extended
160 * precision accumulation.
162 * Returns S.P. result with dot product accumulated in D.P.
163 * SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY),
164 * where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is
165 * defined in a similar way using INCY.
169 * Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
170 * Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
176 * number of elements in input vector(s)
179 * single precision scalar to be added to inner product
181 * SX (input) REAL array, dimension (N)
182 * single precision vector with N elements
184 * INCX (input) INTEGER
185 * storage spacing between elements of SX
187 * SY (input) REAL array, dimension (N)
188 * single precision vector with N elements
190 * INCY (input) INTEGER
191 * storage spacing between elements of SY
193 * SDSDOT (output) REAL
194 * single precision dot product (SB if N .LE. 0)
201 * C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T.
202 * Krogh, Basic linear algebra subprograms for Fortran
203 * usage, Algorithm No. 539, Transactions on Mathematical
204 * Software 5, 3 (September 1979), pp. 308-323.
206 * REVISION HISTORY (YYMMDD)
208 * 791001 DATE WRITTEN
209 * 890531 Changed all specific intrinsics to generic. (WRB)
210 * 890831 Modified array declarations. (WRB)
211 * 890831 REVISION DATE from Version 3.2
212 * 891214 Prologue converted to Version 4.0 format. (BAB)
213 * 920310 Corrected definition of LX in DESCRIPTION. (WRB)
214 * 920501 Reformatted the REFERENCES section. (WRB)
215 * 070118 Reformat to LAPACK coding style
217 * =====================================================================
219 * .. Local Scalars ..
220 DOUBLE PRECISION DSDOT
223 * .. Intrinsic Functions ..
231 IF (INCX.EQ.INCY .AND. INCX.GT.0) THEN
233 * Code for equal and positive increments.
237 DSDOT = DSDOT + DBLE(SX(I))*DBLE(SY(I))
241 * Code for unequal or nonpositive increments.
245 IF (INCX.LT.0) KX = 1 + (1-N)*INCX
246 IF (INCY.LT.0) KY = 1 + (1-N)*INCY
248 DSDOT = DSDOT + DBLE(SX(KX))*DBLE(SY(KY))