1 /* ddot.f -- translated by f2c (version 20061008).
2 You must link the resulting object file with libf2c:
3 on Microsoft Windows system, link with libf2c.lib;
4 on Linux or Unix systems, link with .../path/to/libf2c.a -lm
5 or, if you install libf2c.a in a standard place, with -lf2c -lm
6 -- in that order, at the end of the command line, as in
8 Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
10 http://www.netlib.org/f2c/libf2c.zip
16 doublereal ddot_(integer *n, doublereal *dx, integer *incx, doublereal *dy,
19 /* System generated locals */
24 integer i__, m, ix, iy, mp1;
27 /* .. Scalar Arguments .. */
29 /* .. Array Arguments .. */
35 /* forms the dot product of two vectors. */
36 /* uses unrolled loops for increments equal to one. */
37 /* jack dongarra, linpack, 3/11/78. */
38 /* modified 12/3/93, array(1) declarations changed to array(*) */
41 /* .. Local Scalars .. */
43 /* .. Intrinsic Functions .. */
45 /* Parameter adjustments */
55 if (*incx == 1 && *incy == 1) {
59 /* code for unequal increments or equal increments */
65 ix = (-(*n) + 1) * *incx + 1;
68 iy = (-(*n) + 1) * *incy + 1;
71 for (i__ = 1; i__ <= i__1; ++i__) {
72 dtemp += dx[ix] * dy[iy];
80 /* code for both increments equal to 1 */
91 for (i__ = 1; i__ <= i__1; ++i__) {
92 dtemp += dx[i__] * dy[i__];
101 for (i__ = mp1; i__ <= i__1; i__ += 5) {
102 dtemp = dtemp + dx[i__] * dy[i__] + dx[i__ + 1] * dy[i__ + 1] + dx[
103 i__ + 2] * dy[i__ + 2] + dx[i__ + 3] * dy[i__ + 3] + dx[i__ +