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

Function dswap_

numpy/linalg/lapack_lite/f2c_blas.c:7901–8002  ·  view source on GitHub ↗

Subroutine */

Source from the content-addressed store, hash-verified

7899} /* dscal_ */
7900
7901/* Subroutine */ int dswap_(integer *n, doublereal *dx, integer *incx,
7902 doublereal *dy, integer *incy)
7903{
7904 /* System generated locals */
7905 integer i__1;
7906
7907 /* Local variables */
7908 static integer i__, m, ix, iy, mp1;
7909 static doublereal dtemp;
7910
7911
7912/*
7913 Purpose
7914 =======
7915
7916 interchanges two vectors.
7917 uses unrolled loops for increments equal one.
7918
7919 Further Details
7920 ===============
7921
7922 jack dongarra, linpack, 3/11/78.
7923 modified 12/3/93, array(1) declarations changed to array(*)
7924
7925 =====================================================================
7926*/
7927
7928 /* Parameter adjustments */
7929 --dy;
7930 --dx;
7931
7932 /* Function Body */
7933 if (*n <= 0) {
7934 return 0;
7935 }
7936 if (*incx == 1 && *incy == 1) {
7937 goto L20;
7938 }
7939
7940/*
7941 code for unequal increments or equal increments not equal
7942 to 1
7943*/
7944
7945 ix = 1;
7946 iy = 1;
7947 if (*incx < 0) {
7948 ix = (-(*n) + 1) * *incx + 1;
7949 }
7950 if (*incy < 0) {
7951 iy = (-(*n) + 1) * *incy + 1;
7952 }
7953 i__1 = *n;
7954 for (i__ = 1; i__ <= i__1; ++i__) {
7955 dtemp = dx[ix];
7956 dx[ix] = dy[iy];
7957 dy[iy] = dtemp;
7958 ix += *incx;

Callers 9

dbdsdc_Function · 0.85
dbdsqr_Function · 0.85
dgebak_Function · 0.85
dgebal_Function · 0.85
dgetf2_Function · 0.85
dlasdq_Function · 0.85
dlasy2_Function · 0.85
dstedc_Function · 0.85
dsteqr_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected