Subroutine */
| 7816 | } /* drot_ */ |
| 7817 | |
| 7818 | /* Subroutine */ int dscal_(integer *n, doublereal *da, doublereal *dx, |
| 7819 | integer *incx) |
| 7820 | { |
| 7821 | /* System generated locals */ |
| 7822 | integer i__1, i__2; |
| 7823 | |
| 7824 | /* Local variables */ |
| 7825 | static integer i__, m, mp1, nincx; |
| 7826 | |
| 7827 | |
| 7828 | /* |
| 7829 | Purpose |
| 7830 | ======= |
| 7831 | |
| 7832 | DSCAL scales a vector by a constant. |
| 7833 | uses unrolled loops for increment equal to one. |
| 7834 | |
| 7835 | Further Details |
| 7836 | =============== |
| 7837 | |
| 7838 | jack dongarra, linpack, 3/11/78. |
| 7839 | modified 3/93 to return if incx .le. 0. |
| 7840 | modified 12/3/93, array(1) declarations changed to array(*) |
| 7841 | |
| 7842 | ===================================================================== |
| 7843 | */ |
| 7844 | |
| 7845 | /* Parameter adjustments */ |
| 7846 | --dx; |
| 7847 | |
| 7848 | /* Function Body */ |
| 7849 | if (*n <= 0 || *incx <= 0) { |
| 7850 | return 0; |
| 7851 | } |
| 7852 | if (*incx == 1) { |
| 7853 | goto L20; |
| 7854 | } |
| 7855 | |
| 7856 | /* code for increment not equal to 1 */ |
| 7857 | |
| 7858 | nincx = *n * *incx; |
| 7859 | i__1 = nincx; |
| 7860 | i__2 = *incx; |
| 7861 | for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { |
| 7862 | dx[i__] = *da * dx[i__]; |
| 7863 | /* L10: */ |
| 7864 | } |
| 7865 | return 0; |
| 7866 | |
| 7867 | /* |
| 7868 | code for increment equal to 1 |
| 7869 | |
| 7870 | |
| 7871 | clean-up loop |
| 7872 | */ |
| 7873 | |
| 7874 | L20: |
| 7875 | m = *n % 5; |
no outgoing calls
no test coverage detected