MCPcopy Create free account
hub / github.com/numpy/numpy / sscal_

Function sscal_

numpy/linalg/lapack_lite/f2c_blas.c:12418–12498  ·  view source on GitHub ↗

Subroutine */

Source from the content-addressed store, hash-verified

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
12473L20:
12474 m = *n % 5;
12475 if (m == 0) {

Callers 15

cheevd_Function · 0.85
claed8_Function · 0.85
clatrs_Function · 0.85
sbdsqr_Function · 0.85
sgebak_Function · 0.85
sgebal_Function · 0.85
sgeev_Function · 0.85
sgetf2_Function · 0.85
slabrd_Function · 0.85
slaed2_Function · 0.85
slaed8_Function · 0.85
slahr2_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected