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

Function scopy_

numpy/linalg/lapack_lite/f2c_blas.c:11245–11339  ·  view source on GitHub ↗

Subroutine */

Source from the content-addressed store, hash-verified

11243} /* scnrm2_ */
11244
11245/* Subroutine */ int scopy_(integer *n, real *sx, integer *incx, real *sy,
11246 integer *incy)
11247{
11248 /* System generated locals */
11249 integer i__1;
11250
11251 /* Local variables */
11252 static integer i__, m, ix, iy, mp1;
11253
11254
11255/*
11256 Purpose
11257 =======
11258
11259 SCOPY copies a vector, x, to a vector, y.
11260 uses unrolled loops for increments equal to 1.
11261
11262 Further Details
11263 ===============
11264
11265 jack dongarra, linpack, 3/11/78.
11266 modified 12/3/93, array(1) declarations changed to array(*)
11267
11268 =====================================================================
11269*/
11270
11271 /* Parameter adjustments */
11272 --sy;
11273 --sx;
11274
11275 /* Function Body */
11276 if (*n <= 0) {
11277 return 0;
11278 }
11279 if (*incx == 1 && *incy == 1) {
11280 goto L20;
11281 }
11282
11283/*
11284 code for unequal increments or equal increments
11285 not equal to 1
11286*/
11287
11288 ix = 1;
11289 iy = 1;
11290 if (*incx < 0) {
11291 ix = (-(*n) + 1) * *incx + 1;
11292 }
11293 if (*incy < 0) {
11294 iy = (-(*n) + 1) * *incy + 1;
11295 }
11296 i__1 = *n;
11297 for (i__ = 1; i__ <= i__1; ++i__) {
11298 sy[iy] = sx[ix];
11299 ix += *incx;
11300 iy += *incy;
11301/* L10: */
11302 }

Callers 15

claed0_Function · 0.85
claed8_Function · 0.85
sbdsdc_Function · 0.85
slaed0_Function · 0.85
slaed1_Function · 0.85
slaed2_Function · 0.85
slaed3_Function · 0.85
slaed8_Function · 0.85
slaed9_Function · 0.85
slaeda_Function · 0.85
slahqr_Function · 0.85
slahr2_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected