Subroutine */
| 12416 | } /* srot_ */ |
| 12417 | |
| 12418 | /* Subroutine */ int sscal_(integer *n, real *sa, real *sx, integer *incx) |
| 12419 | { |
| 12420 | /* System generated locals */ |
| 12421 | integer i__1, i__2; |
| 12422 | |
| 12423 | /* Local variables */ |
| 12424 | static integer i__, m, mp1, nincx; |
| 12425 | |
| 12426 | |
| 12427 | /* |
| 12428 | Purpose |
| 12429 | ======= |
| 12430 | |
| 12431 | scales a vector by a constant. |
| 12432 | uses unrolled loops for increment equal to 1. |
| 12433 | |
| 12434 | Further Details |
| 12435 | =============== |
| 12436 | |
| 12437 | jack dongarra, linpack, 3/11/78. |
| 12438 | modified 3/93 to return if incx .le. 0. |
| 12439 | modified 12/3/93, array(1) declarations changed to array(*) |
| 12440 | |
| 12441 | ===================================================================== |
| 12442 | */ |
| 12443 | |
| 12444 | /* Parameter adjustments */ |
| 12445 | --sx; |
| 12446 | |
| 12447 | /* Function Body */ |
| 12448 | if (*n <= 0 || *incx <= 0) { |
| 12449 | return 0; |
| 12450 | } |
| 12451 | if (*incx == 1) { |
| 12452 | goto L20; |
| 12453 | } |
| 12454 | |
| 12455 | /* code for increment not equal to 1 */ |
| 12456 | |
| 12457 | nincx = *n * *incx; |
| 12458 | i__1 = nincx; |
| 12459 | i__2 = *incx; |
| 12460 | for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { |
| 12461 | sx[i__] = *sa * sx[i__]; |
| 12462 | /* L10: */ |
| 12463 | } |
| 12464 | return 0; |
| 12465 | |
| 12466 | /* |
| 12467 | code for increment equal to 1 |
| 12468 | |
| 12469 | |
| 12470 | clean-up loop |
| 12471 | */ |
| 12472 | |
| 12473 | L20: |
| 12474 | m = *n % 5; |
| 12475 | if (m == 0) { |
no outgoing calls
no test coverage detected