| 1 | /* blas/dasum.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 | /*< double precision function dasum(n,dx,incx) >*/ |
| 19 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! dasum_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:36:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *n, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *dx, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *incx) |
| 20 | { |
| 21 | /* System generated locals */ |
| 22 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__1, i__2; |
| 23 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! ret_val, d__1, d__2, d__3, d__4, d__5, d__6; |
| 24 | |
| 25 | /* Local variables */ |
| 26 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__, m, mp1; |
| 27 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! dtemp; |
| 28 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! nincx; |
| 29 | |
| 30 | |
| 31 | /* takes the sum of the absolute values. */ |
| 32 | /* jack dongarra, linpack, 3/11/78. */ |
| 33 | /* modified 3/93 to return if incx .le. 0. */ |
| 34 | /* modified 12/3/93, array(1) declarations changed to array(*) */ |
| 35 | |
| 36 | /*< double precision dx(*),dtemp >*/ |
| 37 | /*< integer i,incx,m,mp1,n,nincx >*/ |
| 38 | |
| 39 | /*< dasum = 0.0d0 >*/ |
| 40 | /* Parameter adjustments */ |
| 41 | --dx; |
| 42 | |
| 43 | /* Function Body */ |
| 44 | ret_val = 0.; |
| 45 | /*< dtemp = 0.0d0 >*/ |
| 46 | dtemp = 0.; |
| 47 | /*< if( n.le.0 .or. incx.le.0 )return >*/ |
| 48 | if (*n <= 0 || *incx <= 0) { |
| 49 | return ret_val; |
| 50 | } |
| 51 | /*< if(incx.eq.1)go to 20 >*/ |
| 52 | if (*incx == 1) { |
| 53 | goto L20; |
| 54 | } |
| 55 | |
| 56 | /* code for increment not equal to 1 */ |
| 57 | |
| 58 | /*< nincx = n*incx >*/ |
| 59 | nincx = *n * *incx; |
| 60 | /*< do 10 i = 1,nincx,incx >*/ |
| 61 | i__1 = nincx; |
| 62 | i__2 = *incx; |
| 63 | for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { |
| 64 | /*< dtemp = dtemp + dabs(dx(i)) >*/ |
| 65 | dtemp += (d__1 = dx[i__], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)); |
| 66 | /*< 10 continue >*/ |
| 67 | /* L10: */ |
| 68 | } |
| 69 | /*< dasum = dtemp >*/ |
| 70 | ret_val = dtemp; |
| 71 | /*< return >*/ |
| 72 | return ret_val; |
| 73 | |
| 74 | /* code for increment equal to 1 */ |
| 75 | |
| 76 | |
| 77 | /* clean-up loop */ |
| 78 | |
| 79 | /*< 20 m = mod(n,6) >*/ |
| 80 | L20: |
| 81 | m = *n % 6; |
| 82 | /*< if( m .eq. 0 ) go to 40 >*/ |
| 83 | if (m == 0) { |
| 84 | goto L40; |
| 85 | } |
| 86 | /*< do 30 i = 1,m >*/ |
| 87 | i__2 = m; |
| 88 | for (i__ = 1; i__ <= i__2; ++i__) { |
| 89 | /*< dtemp = dtemp + dabs(dx(i)) >*/ |
| 90 | dtemp += (d__1 = dx[i__], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)); |
| 91 | /*< 30 continue >*/ |
| 92 | /* L30: */ |
| 93 | } |
| 94 | /*< if( n .lt. 6 ) go to 60 >*/ |
| 95 | if (*n < 6) { |
| 96 | goto L60; |
| 97 | } |
| 98 | /*< 40 mp1 = m + 1 >*/ |
| 99 | L40: |
| 100 | mp1 = m + 1; |
| 101 | /*< do 50 i = mp1,n,6 >*/ |
| 102 | i__2 = *n; |
| 103 | for (i__ = mp1; i__ <= i__2; i__ += 6) { |
| 104 | /*< >*/ |
| 105 | dtemp = dtemp + (d__1 = dx[i__], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)) + (d__2 = dx[i__ + 1], |
| 106 | abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__2)) + (d__3 = dx[i__ + 2], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__3)) + (d__4 = dx[i__ |
| 107 | + 3], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__4)) + (d__5 = dx[i__ + 4], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__5)) + (d__6 = |
| 108 | dx[i__ + 5], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__6)); |
| 109 | /*< 50 continue >*/ |
| 110 | /* L50: */ |
| 111 | } |
| 112 | /*< 60 dasum = dtemp >*/ |
| 113 | L60: |
| 114 | ret_val = dtemp; |
| 115 | /*< return >*/ |
| 116 | return ret_val; |
| 117 | /*< end >*/ |
| 118 | } /* dasum_ */ |
| 119 | |
| 120 | #ifdef __cplusplus |
| 121 | } |
| 122 | #endif |