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

Function dcopy_

numpy/linalg/lapack_lite/f2c_blas.c:6642–6736  ·  view source on GitHub ↗

Subroutine */

Source from the content-addressed store, hash-verified

6640} /* dcabs1_ */
6641
6642/* Subroutine */ int dcopy_(integer *n, doublereal *dx, integer *incx,
6643 doublereal *dy, integer *incy)
6644{
6645 /* System generated locals */
6646 integer i__1;
6647
6648 /* Local variables */
6649 static integer i__, m, ix, iy, mp1;
6650
6651
6652/*
6653 Purpose
6654 =======
6655
6656 DCOPY copies a vector, x, to a vector, y.
6657 uses unrolled loops for increments equal to one.
6658
6659 Further Details
6660 ===============
6661
6662 jack dongarra, linpack, 3/11/78.
6663 modified 12/3/93, array(1) declarations changed to array(*)
6664
6665 =====================================================================
6666*/
6667
6668 /* Parameter adjustments */
6669 --dy;
6670 --dx;
6671
6672 /* Function Body */
6673 if (*n <= 0) {
6674 return 0;
6675 }
6676 if (*incx == 1 && *incy == 1) {
6677 goto L20;
6678 }
6679
6680/*
6681 code for unequal increments or equal increments
6682 not equal to 1
6683*/
6684
6685 ix = 1;
6686 iy = 1;
6687 if (*incx < 0) {
6688 ix = (-(*n) + 1) * *incx + 1;
6689 }
6690 if (*incy < 0) {
6691 iy = (-(*n) + 1) * *incy + 1;
6692 }
6693 i__1 = *n;
6694 for (i__ = 1; i__ <= i__1; ++i__) {
6695 dy[iy] = dx[ix];
6696 ix += *incx;
6697 iy += *incy;
6698/* L10: */
6699 }

Callers 15

dbdsdc_Function · 0.85
dlaed0_Function · 0.85
dlaed1_Function · 0.85
dlaed2_Function · 0.85
dlaed3_Function · 0.85
dlaed8_Function · 0.85
dlaed9_Function · 0.85
dlaeda_Function · 0.85
dlahqr_Function · 0.85
dlahr2_Function · 0.85
dlals0_Function · 0.85
dlalsa_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected