| 1 | /* blas/cswap.f -- translated by f2c (version 20050501). |
| 2 | You must link the resulting object file with libf2c: |
| 3 | on Microsoft Windows system, link with libf2c.lib; |
| 4 | on Linux or Unix systems, link with .../path/to/libf2c.a -lm |
| 5 | or, if you install libf2c.a in a standard place, with -lf2c -lm |
| 6 | -- in that order, at the end of the command line, as in |
| 7 | cc *.o -lf2c -lm |
| 8 | Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., |
| 9 | |
| 10 | http://www.netlib.org/f2c/libf2c.zip |
| 11 | */ |
| 12 | |
| 13 | #ifdef __cplusplus |
| 14 | extern "C" { |
| 15 | #endif |
| 16 | #include "v3p_netlib.h"cxx . . $ `<file>/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib.h`/ |
| 17 | |
| 18 | /*< subroutine cswap (n,cx,incx,cy,incy) >*/ |
| 19 | /* Subroutine */ int cswap_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:34:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *n, complexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:55:9`! *cx, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *incx, complexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:55:9`! * |
| 20 | cy, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *incy) |
| 21 | { |
| 22 | /* System generated locals */ |
| 23 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__1, i__2, i__3; |
| 24 | |
| 25 | /* Local variables */ |
| 26 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__, ix, iy; |
| 27 | complexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:55:9`! ctemp; |
| 28 | |
| 29 | |
| 30 | /* interchanges two vectors. */ |
| 31 | /* jack dongarra, linpack, 3/11/78. */ |
| 32 | /* modified 12/3/93, array(1) declarations changed to array(*) */ |
| 33 | |
| 34 | /*< complex cx(*),cy(*),ctemp >*/ |
| 35 | /*< integer i,incx,incy,ix,iy,n >*/ |
| 36 | |
| 37 | /*< if(n.le.0)return >*/ |
| 38 | /* Parameter adjustments */ |
| 39 | --cy; |
| 40 | --cx; |
| 41 | |
| 42 | /* Function Body */ |
| 43 | if (*n <= 0) { |
| 44 | return 0; |
| 45 | } |
| 46 | /*< if(incx.eq.1.and.incy.eq.1)go to 20 >*/ |
| 47 | if (*incx == 1 && *incy == 1) { |
| 48 | goto L20; |
| 49 | } |
| 50 | |
| 51 | /* code for unequal increments or equal increments not equal */ |
| 52 | /* to 1 */ |
| 53 | |
| 54 | /*< ix = 1 >*/ |
| 55 | ix = 1; |
| 56 | /*< iy = 1 >*/ |
| 57 | iy = 1; |
| 58 | /*< if(incx.lt.0)ix = (-n+1)*incx + 1 >*/ |
| 59 | if (*incx < 0) { |
| 60 | ix = (-(*n) + 1) * *incx + 1; |
| 61 | } |
| 62 | /*< if(incy.lt.0)iy = (-n+1)*incy + 1 >*/ |
| 63 | if (*incy < 0) { |
| 64 | iy = (-(*n) + 1) * *incy + 1; |
| 65 | } |
| 66 | /*< do 10 i = 1,n >*/ |
| 67 | i__1 = *n; |
| 68 | for (i__ = 1; i__ <= i__1; ++i__) { |
| 69 | /*< ctemp = cx(ix) >*/ |
| 70 | i__2 = ix; |
| 71 | ctemp.rcxx . . $ $anonymous_type_ec17f80a666933f6_0#r. = cx[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_0#r., ctemp.icxx . . $ $anonymous_type_ec17f80a666933f6_0#i. = cx[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_0#i.; |
| 72 | /*< cx(ix) = cy(iy) >*/ |
| 73 | i__2 = ix; |
| 74 | i__3 = iy; |
| 75 | cx[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_0#r. = cy[i__3].rcxx . . $ $anonymous_type_ec17f80a666933f6_0#r., cx[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_0#i. = cy[i__3].icxx . . $ $anonymous_type_ec17f80a666933f6_0#i.; |
| 76 | /*< cy(iy) = ctemp >*/ |
| 77 | i__2 = iy; |
| 78 | cy[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_0#r. = ctemp.rcxx . . $ $anonymous_type_ec17f80a666933f6_0#r., cy[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_0#i. = ctemp.icxx . . $ $anonymous_type_ec17f80a666933f6_0#i.; |
| 79 | /*< ix = ix + incx >*/ |
| 80 | ix += *incx; |
| 81 | /*< iy = iy + incy >*/ |
| 82 | iy += *incy; |
| 83 | /*< 10 continue >*/ |
| 84 | /* L10: */ |
| 85 | } |
| 86 | /*< return >*/ |
| 87 | return 0; |
| 88 | |
| 89 | /* code for both increments equal to 1 */ |
| 90 | /*< 20 do 30 i = 1,n >*/ |
| 91 | L20: |
| 92 | i__1 = *n; |
| 93 | for (i__ = 1; i__ <= i__1; ++i__) { |
| 94 | /*< ctemp = cx(i) >*/ |
| 95 | i__2 = i__; |
| 96 | ctemp.rcxx . . $ $anonymous_type_ec17f80a666933f6_0#r. = cx[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_0#r., ctemp.icxx . . $ $anonymous_type_ec17f80a666933f6_0#i. = cx[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_0#i.; |
| 97 | /*< cx(i) = cy(i) >*/ |
| 98 | i__2 = i__; |
| 99 | i__3 = i__; |
| 100 | cx[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_0#r. = cy[i__3].rcxx . . $ $anonymous_type_ec17f80a666933f6_0#r., cx[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_0#i. = cy[i__3].icxx . . $ $anonymous_type_ec17f80a666933f6_0#i.; |
| 101 | /*< cy(i) = ctemp >*/ |
| 102 | i__2 = i__; |
| 103 | cy[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_0#r. = ctemp.rcxx . . $ $anonymous_type_ec17f80a666933f6_0#r., cy[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_0#i. = ctemp.icxx . . $ $anonymous_type_ec17f80a666933f6_0#i.; |
| 104 | /*< 30 continue >*/ |
| 105 | /* L30: */ |
| 106 | } |
| 107 | /*< return >*/ |
| 108 | return 0; |
| 109 | /*< end >*/ |
| 110 | } /* cswap_ */ |
| 111 | |
| 112 | #ifdef __cplusplus |
| 113 | } |
| 114 | #endif |