LAPACK  3.9.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:
   Compute the inner product of two vectors with extended
   precision accumulation.

   Returns S.P. result with dot product accumulated in D.P.
   SDSDOT = SB + 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]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)
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2017
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

Definition at line 115 of file sdsdot.f.

115 *
116 * -- Reference BLAS level1 routine (version 3.8.0) --
117 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
118 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
119 * November 2017
120 *
121 * .. Scalar Arguments ..
122  REAL SB
123  INTEGER INCX,INCY,N
124 * ..
125 * .. Array Arguments ..
126  REAL SX(*),SY(*)
127 * .. Local Scalars ..
128  DOUBLE PRECISION DSDOT
129  INTEGER I,KX,KY,NS
130 * ..
131 * .. Intrinsic Functions ..
132  INTRINSIC dble
133 * ..
134  dsdot = sb
135  IF (n.LE.0) THEN
136  sdsdot = dsdot
137  RETURN
138  END IF
139  IF (incx.EQ.incy .AND. incx.GT.0) THEN
140 *
141 * Code for equal and positive increments.
142 *
143  ns = n*incx
144  DO i = 1,ns,incx
145  dsdot = dsdot + dble(sx(i))*dble(sy(i))
146  END DO
147  ELSE
148 *
149 * Code for unequal or nonpositive increments.
150 *
151  kx = 1
152  ky = 1
153  IF (incx.LT.0) kx = 1 + (1-n)*incx
154  IF (incy.LT.0) ky = 1 + (1-n)*incy
155  DO i = 1,n
156  dsdot = dsdot + dble(sx(kx))*dble(sy(ky))
157  kx = kx + incx
158  ky = ky + incy
159  END DO
160  END IF
161  sdsdot = dsdot
162  RETURN
Here is the call graph for this function:
Here is the caller graph for this function:
dsdot
double precision function dsdot(N, SX, INCX, SY, INCY)
DSDOT
Definition: dsdot.f:121
sdsdot
real function sdsdot(N, SB, SX, INCX, SY, INCY)
SDSDOT
Definition: sdsdot.f:115