HP MLIB User's Guide Vol. 1 7th Ed.
86 HP MLIB User’s Guide
SDOT/DDOT/CDOTC/CDOTU/ZDOTC/ZDOTU Dot product
x Array of length lenx = (n−1)×|incx|+1 containing the
n-vector x. x is used in conjugated form by CDOTC and
ZDOTC and in unconjugated form by the other
subprograms.
incx Increment for the array x:
incx ≥ 0 x is stored forward in array x; that is,
x
i
is stored in x((i−1)×incx+1).
incx < 0 x is stored backward in array x; that
is, x
i
is stored in x((i−n)×incx+1).
Use incx = 1 if the vector x is stored contiguously in
array x; that is, if x
i
is stored in x(i). Refer to “BLAS
Indexing Conventions” in the introduction to this
chapter.
y Array of length leny = (n−1)×|incy|+1 containing the
n-vector y.
incy Increment for the array y:
incy ≥ 0 y is stored forward in array y; that is,
y
i
is stored in y((i−1)×incy+1).
incy < 0 y is stored backward in array y; that
is, y
i
is stored in y((i−n)×incy+1).
Use incy = 1 if the vector y is stored contiguously in
array y; that is, if y
i
is stored in y(i). Refer to “BLAS
Indexing Conventions” in the introduction to this
chapter.
res Pointer to output (for use with Intel compilers only).
Output s The resulting value of the dot product. If , then
. Otherwise,
unless the subprogram name is CDOTC or ZDOTC, in
which case
Notes If incx = 0, then x
i
= x(1) for all i. If incy = 0, then y
i
= y(1) for all i. In either
of these cases, another VECLIB subprogram would be more efficient.
n 0≤
s 0=
sx
i
y
i
i 1=
n
∑
=
sx
i
y
i
i 1=
n
∑
=