LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 double precision function dsdot ( integer N, real, dimension(*) SX, integer INCX, real, dimension(*) SY, integer INCY )

DSDOT

Purpose:
``` Compute the inner product of two vectors with extended
precision accumulation and result.

Returns D.P. dot product accumulated in D.P., for S.P. SX and SY
DSDOT = sum for I = 0 to N-1 of  SX(LX+I*INCX) * SY(LY+I*INCY),
where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is
defined in a similar way using INCY.```
Parameters
 [in] N ``` N is INTEGER number of elements in input vector(s)``` [in] SX ``` SX is REAL array, dimension(N) single precision vector with N elements``` [in] INCX ``` INCX is INTEGER storage spacing between elements of SX``` [in] SY ``` SY is REAL array, dimension(N) single precision vector with N elements``` [in] INCY ``` INCY is INTEGER storage spacing between elements of SY```
Returns
DSDOT
```          DSDOT is DOUBLE PRECISION
DSDOT  double precision dot product (zero if N.LE.0)```
Date
November 2011
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
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 style (JL)```

Definition at line 121 of file dsdot.f.

121 *
122 * -- Reference BLAS level1 routine (version 3.4.0) --
123 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
124 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
125 * November 2011
126 *
127 * .. Scalar Arguments ..
128  INTEGER incx,incy,n
129 * ..
130 * .. Array Arguments ..
131  REAL sx(*),sy(*)
132 * ..
133 *
134 * Authors:
135 * ========
136 * Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
137 * Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
138 *
139 * =====================================================================
140 *
141 * .. Local Scalars ..
142  INTEGER i,kx,ky,ns
143 * ..
144 * .. Intrinsic Functions ..
145  INTRINSIC dble
146 * ..
147  dsdot = 0.0d0
148  IF (n.LE.0) RETURN
149  IF (incx.EQ.incy .AND. incx.GT.0) THEN
150 *
151 * Code for equal, positive, non-unit increments.
152 *
153  ns = n*incx
154  DO i = 1,ns,incx
155  dsdot = dsdot + dble(sx(i))*dble(sy(i))
156  END DO
157  ELSE
158 *
159 * Code for unequal or nonpositive increments.
160 *
161  kx = 1
162  ky = 1
163  IF (incx.LT.0) kx = 1 + (1-n)*incx
164  IF (incy.LT.0) ky = 1 + (1-n)*incy
165  DO i = 1,n
166  dsdot = dsdot + dble(sx(kx))*dble(sy(ky))
167  kx = kx + incx
168  ky = ky + incy
169  END DO
170  END IF
171  RETURN
double precision function dsdot(N, SX, INCX, SY, INCY)
DSDOT
Definition: dsdot.f:121

Here is the caller graph for this function: