ext/lbfgsb/src/blas.c in lbfgsb-0.3.2 vs ext/lbfgsb/src/blas.c in lbfgsb-0.4.0

- old
+ new

@@ -3,12 +3,11 @@ * or “3-clause license”) * Please read attached file License.txt */ #include "blas.h" -int lbfgsb_rb_daxpy_(long *n, double *da, double *dx, long *incx, double *dy, long *incy) -{ +int lbfgsb_rb_daxpy_(long* n, double* da, double* dx, long* incx, double* dy, long* incy) { long i__1; static long i__, m, ix, iy, mp1; --dy; --dx; @@ -68,12 +67,11 @@ dy[i__ + 3] += *da * dx[i__ + 3]; } return 0; } -int lbfgsb_rb_dcopy_(long *n, double *dx, long *incx, double *dy, long *incy) -{ +int lbfgsb_rb_dcopy_(long* n, double* dx, long* incx, double* dy, long* incy) { long i__1; static long i__, m, ix, iy, mp1; --dy; --dx; @@ -133,12 +131,11 @@ dy[i__ + 6] = dx[i__ + 6]; } return 0; } -double lbfgsb_rb_ddot_(long *n, double *dx, long *incx, double *dy, long *incy) -{ +double lbfgsb_rb_ddot_(long* n, double* dx, long* incx, double* dy, long* incy) { long i__1; double ret_val; static long i__, m, ix, iy, mp1; static double dtemp; @@ -192,19 +189,18 @@ } L40: mp1 = m + 1; i__1 = *n; for (i__ = mp1; i__ <= i__1; i__ += 5) { - dtemp = dtemp + dx[i__] * dy[i__] + dx[i__ + 1] * dy[i__ + 1] - + dx[i__ + 2] * dy[i__ + 2] + dx[i__ + 3] * dy[i__ + 3] + dx[i__ + 4] * dy[i__ + 4]; + dtemp = dtemp + dx[i__] * dy[i__] + dx[i__ + 1] * dy[i__ + 1] + dx[i__ + 2] * dy[i__ + 2] + dx[i__ + 3] * dy[i__ + 3] + + dx[i__ + 4] * dy[i__ + 4]; } L60: ret_val = dtemp; return ret_val; } -int lbfgsb_rb_dscal_(long *n, double *da, double *dx, long *incx) -{ +int lbfgsb_rb_dscal_(long* n, double* da, double* dx, long* incx) { long i__1, i__2; static long i__, m, mp1, nincx; --dx;