MCPcopy Create free account
hub / github.com/numpy/numpy / ddot_

Function ddot_

numpy/linalg/lapack_lite/f2c_blas.c:6738–6835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6736} /* dcopy_ */
6737
6738doublereal ddot_(integer *n, doublereal *dx, integer *incx, doublereal *dy,
6739 integer *incy)
6740{
6741 /* System generated locals */
6742 integer i__1;
6743 doublereal ret_val;
6744
6745 /* Local variables */
6746 static integer i__, m, ix, iy, mp1;
6747 static doublereal dtemp;
6748
6749
6750/*
6751 Purpose
6752 =======
6753
6754 DDOT forms the dot product of two vectors.
6755 uses unrolled loops for increments equal to one.
6756
6757 Further Details
6758 ===============
6759
6760 jack dongarra, linpack, 3/11/78.
6761 modified 12/3/93, array(1) declarations changed to array(*)
6762
6763 =====================================================================
6764*/
6765
6766 /* Parameter adjustments */
6767 --dy;
6768 --dx;
6769
6770 /* Function Body */
6771 ret_val = 0.;
6772 dtemp = 0.;
6773 if (*n <= 0) {
6774 return ret_val;
6775 }
6776 if (*incx == 1 && *incy == 1) {
6777 goto L20;
6778 }
6779
6780/*
6781 code for unequal increments or equal increments
6782 not equal to 1
6783*/
6784
6785 ix = 1;
6786 iy = 1;
6787 if (*incx < 0) {
6788 ix = (-(*n) + 1) * *incx + 1;
6789 }
6790 if (*incy < 0) {
6791 iy = (-(*n) + 1) * *incy + 1;
6792 }
6793 i__1 = *n;
6794 for (i__ = 1; i__ <= i__1; ++i__) {
6795 dtemp += dx[ix] * dy[iy];

Callers 6

dlasd8_Function · 0.85
dlatrd_Function · 0.85
dlauu2_Function · 0.85
dpotf2_Function · 0.85
dsytd2_Function · 0.85
dtrevc_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected