| 1 | /* blas/sscal.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 sscal(n,sa,sx,incx) >*/ |
| 19 | /* Subroutine */ int sscal_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:278:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *n, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *sa, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *sx, 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 | |
| 24 | /* Local variables */ |
| 25 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__, m, mp1, nincx; |
| 26 | |
| 27 | |
| 28 | /* scales a vector by a constant. */ |
| 29 | /* uses unrolled loops for increment equal to 1. */ |
| 30 | /* jack dongarra, linpack, 3/11/78. */ |
| 31 | /* modified 3/93 to return if incx .le. 0. */ |
| 32 | /* modified 12/3/93, array(1) declarations changed to array(*) */ |
| 33 | |
| 34 | /*< real sa,sx(*) >*/ |
| 35 | /*< integer i,incx,m,mp1,n,nincx >*/ |
| 36 | |
| 37 | /*< if( n.le.0 .or. incx.le.0 )return >*/ |
| 38 | /* Parameter adjustments */ |
| 39 | --sx; |
| 40 | |
| 41 | /* Function Body */ |
| 42 | if (*n <= 0 || *incx <= 0) { |
| 43 | return 0; |
| 44 | } |
| 45 | /*< if(incx.eq.1)go to 20 >*/ |
| 46 | if (*incx == 1) { |
| 47 | goto L20; |
| 48 | } |
| 49 | |
| 50 | /* code for increment not equal to 1 */ |
| 51 | |
| 52 | /*< nincx = n*incx >*/ |
| 53 | nincx = *n * *incx; |
| 54 | /*< do 10 i = 1,nincx,incx >*/ |
| 55 | i__1 = nincx; |
| 56 | i__2 = *incx; |
| 57 | for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { |
| 58 | /*< sx(i) = sa*sx(i) >*/ |
| 59 | sx[i__] = *sa * sx[i__]; |
| 60 | /*< 10 continue >*/ |
| 61 | /* L10: */ |
| 62 | } |
| 63 | /*< return >*/ |
| 64 | return 0; |
| 65 | |
| 66 | /* code for increment equal to 1 */ |
| 67 | |
| 68 | |
| 69 | /* clean-up loop */ |
| 70 | |
| 71 | /*< 20 m = mod(n,5) >*/ |
| 72 | L20: |
| 73 | m = *n % 5; |
| 74 | /*< if( m .eq. 0 ) go to 40 >*/ |
| 75 | if (m == 0) { |
| 76 | goto L40; |
| 77 | } |
| 78 | /*< do 30 i = 1,m >*/ |
| 79 | i__2 = m; |
| 80 | for (i__ = 1; i__ <= i__2; ++i__) { |
| 81 | /*< sx(i) = sa*sx(i) >*/ |
| 82 | sx[i__] = *sa * sx[i__]; |
| 83 | /*< 30 continue >*/ |
| 84 | /* L30: */ |
| 85 | } |
| 86 | /*< if( n .lt. 5 ) return >*/ |
| 87 | if (*n < 5) { |
| 88 | return 0; |
| 89 | } |
| 90 | /*< 40 mp1 = m + 1 >*/ |
| 91 | L40: |
| 92 | mp1 = m + 1; |
| 93 | /*< do 50 i = mp1,n,5 >*/ |
| 94 | i__2 = *n; |
| 95 | for (i__ = mp1; i__ <= i__2; i__ += 5) { |
| 96 | /*< sx(i) = sa*sx(i) >*/ |
| 97 | sx[i__] = *sa * sx[i__]; |
| 98 | /*< sx(i + 1) = sa*sx(i + 1) >*/ |
| 99 | sx[i__ + 1] = *sa * sx[i__ + 1]; |
| 100 | /*< sx(i + 2) = sa*sx(i + 2) >*/ |
| 101 | sx[i__ + 2] = *sa * sx[i__ + 2]; |
| 102 | /*< sx(i + 3) = sa*sx(i + 3) >*/ |
| 103 | sx[i__ + 3] = *sa * sx[i__ + 3]; |
| 104 | /*< sx(i + 4) = sa*sx(i + 4) >*/ |
| 105 | sx[i__ + 4] = *sa * sx[i__ + 4]; |
| 106 | /*< 50 continue >*/ |
| 107 | /* L50: */ |
| 108 | } |
| 109 | /*< return >*/ |
| 110 | return 0; |
| 111 | /*< end >*/ |
| 112 | } /* sscal_ */ |
| 113 | |
| 114 | #ifdef __cplusplus |
| 115 | } |
| 116 | #endif |