LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
real function sdsdot ( integer  N,
real  SB,
real, dimension(*)  SX,
integer  INCX,
real, dimension(*)  SY,
integer  INCY 
)

SDSDOT

Purpose:
 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 142 of file sdsdot.f.

142 *
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..--
146 * November 2011
147 *
148 * .. Scalar Arguments ..
149  REAL sb
150  INTEGER incx,incy,n
151 * ..
152 * .. Array Arguments ..
153  REAL sx(*),sy(*)
154 * ..
155 *
156 * PURPOSE
157 * =======
158 *
159 * Compute the inner product of two vectors with extended
160 * precision accumulation.
161 *
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.
166 *
167 * AUTHOR
168 * ======
169 * Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
170 * Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
171 *
172 * ARGUMENTS
173 * =========
174 *
175 * N (input) INTEGER
176 * number of elements in input vector(s)
177 *
178 * SB (input) REAL
179 * single precision scalar to be added to inner product
180 *
181 * SX (input) REAL array, dimension (N)
182 * single precision vector with N elements
183 *
184 * INCX (input) INTEGER
185 * storage spacing between elements of SX
186 *
187 * SY (input) REAL array, dimension (N)
188 * single precision vector with N elements
189 *
190 * INCY (input) INTEGER
191 * storage spacing between elements of SY
192 *
193 * SDSDOT (output) REAL
194 * single precision dot product (SB if N .LE. 0)
195 *
196 * Further Details
197 * ===============
198 *
199 * REFERENCES
200 *
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.
205 *
206 * REVISION HISTORY (YYMMDD)
207 *
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
216 *
217 * =====================================================================
218 *
219 * .. Local Scalars ..
220  DOUBLE PRECISION dsdot
221  INTEGER i,kx,ky,ns
222 * ..
223 * .. Intrinsic Functions ..
224  INTRINSIC dble
225 * ..
226  dsdot = sb
227  IF (n.LE.0) THEN
228  sdsdot = dsdot
229  RETURN
230  END IF
231  IF (incx.EQ.incy .AND. incx.GT.0) THEN
232 *
233 * Code for equal and positive increments.
234 *
235  ns = n*incx
236  DO i = 1,ns,incx
237  dsdot = dsdot + dble(sx(i))*dble(sy(i))
238  END DO
239  ELSE
240 *
241 * Code for unequal or nonpositive increments.
242 *
243  kx = 1
244  ky = 1
245  IF (incx.LT.0) kx = 1 + (1-n)*incx
246  IF (incy.LT.0) ky = 1 + (1-n)*incy
247  DO i = 1,n
248  dsdot = dsdot + dble(sx(kx))*dble(sy(ky))
249  kx = kx + incx
250  ky = ky + incy
251  END DO
252  END IF
253  sdsdot = dsdot
254  RETURN
real function sdsdot(N, SB, SX, INCX, SY, INCY)
SDSDOT
Definition: sdsdot.f:142
double precision function dsdot(N, SX, INCX, SY, INCY)
DSDOT
Definition: dsdot.f:121

Here is the caller graph for this function: