LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ sdsdot()

real function sdsdot ( integer  N,
real  SB,
real, dimension(*)  SX,
integer  INCX,
real, dimension(*)  SY,
integer  INCY 
)

SDSDOT

Purpose:
 
Parameters
[in]N
          N is INTEGER
          number of elements in input vector(s)
[in]SB
          SB is REAL
          single precision scalar to be added to inner product
[in]SX
          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
          single precision vector with N elements
[in]INCX
          INCX is INTEGER
          storage spacing between elements of SX
[in]SY
          SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
          single precision vector with N elements
[in]INCY
          INCY is INTEGER
          storage spacing between elements of SY
Author
Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
Further Details:
    REFERENCES

    C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T.
    Krogh, Basic linear algebra subprograms for Fortran
    usage, Algorithm No. 539, Transactions on Mathematical
    Software 5, 3 (September 1979), pp. 308-323.

    REVISION HISTORY  (YYMMDD)

    791001  DATE WRITTEN
    890531  Changed all specific intrinsics to generic.  (WRB)
    890831  Modified array declarations.  (WRB)
    890831  REVISION DATE from Version 3.2
    891214  Prologue converted to Version 4.0 format.  (BAB)
    920310  Corrected definition of LX in DESCRIPTION.  (WRB)
    920501  Reformatted the REFERENCES section.  (WRB)
    070118  Reformat to LAPACK coding style
Purpose:
 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2017

Definition at line 166 of file sdsdot.f.

166 *
167 * -- Reference BLAS level1 routine (version 3.8.0) --
168 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
169 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
170 * November 2017
171 *
172 * .. Scalar Arguments ..
173  REAL sb
174  INTEGER incx,incy,n
175 * ..
176 * .. Array Arguments ..
177  REAL sx(*),sy(*)
178 * ..
179 *
180 * PURPOSE
181 * =======
182 *
183 * Compute the inner product of two vectors with extended
184 * precision accumulation.
185 *
186 * Returns S.P. result with dot product accumulated in D.P.
187 * SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY),
188 * where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is
189 * defined in a similar way using INCY.
190 *
191 * AUTHOR
192 * ======
193 * Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
194 * Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
195 *
196 * ARGUMENTS
197 * =========
198 *
199 * N (input) INTEGER
200 * number of elements in input vector(s)
201 *
202 * SB (input) REAL
203 * single precision scalar to be added to inner product
204 *
205 * SX (input) REAL array, dimension (N)
206 * single precision vector with N elements
207 *
208 * INCX (input) INTEGER
209 * storage spacing between elements of SX
210 *
211 * SY (input) REAL array, dimension (N)
212 * single precision vector with N elements
213 *
214 * INCY (input) INTEGER
215 * storage spacing between elements of SY
216 *
217 * SDSDOT (output) REAL
218 * single precision dot product (SB if N .LE. 0)
219 *
220 * Further Details
221 * ===============
222 *
223 * REFERENCES
224 *
225 * C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T.
226 * Krogh, Basic linear algebra subprograms for Fortran
227 * usage, Algorithm No. 539, Transactions on Mathematical
228 * Software 5, 3 (September 1979), pp. 308-323.
229 *
230 * REVISION HISTORY (YYMMDD)
231 *
232 * 791001 DATE WRITTEN
233 * 890531 Changed all specific intrinsics to generic. (WRB)
234 * 890831 Modified array declarations. (WRB)
235 * 890831 REVISION DATE from Version 3.2
236 * 891214 Prologue converted to Version 4.0 format. (BAB)
237 * 920310 Corrected definition of LX in DESCRIPTION. (WRB)
238 * 920501 Reformatted the REFERENCES section. (WRB)
239 * 070118 Reformat to LAPACK coding style
240 *
241 * =====================================================================
242 *
243 * .. Local Scalars ..
244  DOUBLE PRECISION dsdot
245  INTEGER i,kx,ky,ns
246 * ..
247 * .. Intrinsic Functions ..
248  INTRINSIC dble
249 * ..
250  dsdot = sb
251  IF (n.LE.0) THEN
252  sdsdot = dsdot
253  RETURN
254  END IF
255  IF (incx.EQ.incy .AND. incx.GT.0) THEN
256 *
257 * Code for equal and positive increments.
258 *
259  ns = n*incx
260  DO i = 1,ns,incx
261  dsdot = dsdot + dble(sx(i))*dble(sy(i))
262  END DO
263  ELSE
264 *
265 * Code for unequal or nonpositive increments.
266 *
267  kx = 1
268  ky = 1
269  IF (incx.LT.0) kx = 1 + (1-n)*incx
270  IF (incy.LT.0) ky = 1 + (1-n)*incy
271  DO i = 1,n
272  dsdot = dsdot + dble(sx(kx))*dble(sy(ky))
273  kx = kx + incx
274  ky = ky + incy
275  END DO
276  END IF
277  sdsdot = dsdot
278  RETURN
real function sdsdot(N, SB, SX, INCX, SY, INCY)
SDSDOT
Definition: sdsdot.f:166
double precision function dsdot(N, SX, INCX, SY, INCY)
DSDOT
Definition: dsdot.f:121
Here is the caller graph for this function: