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

Function zdscal_

numpy/linalg/lapack_lite/f2c_blas.c:15576–15644  ·  view source on GitHub ↗

Subroutine */

Source from the content-addressed store, hash-verified

15574} /* zdrot_ */
15575
15576/* Subroutine */ int zdscal_(integer *n, doublereal *da, doublecomplex *zx,
15577 integer *incx)
15578{
15579 /* System generated locals */
15580 integer i__1, i__2, i__3;
15581 doublecomplex z__1, z__2;
15582
15583 /* Local variables */
15584 static integer i__, ix;
15585
15586
15587/*
15588 Purpose
15589 =======
15590
15591 ZDSCAL scales a vector by a constant.
15592
15593 Further Details
15594 ===============
15595
15596 jack dongarra, 3/11/78.
15597 modified 3/93 to return if incx .le. 0.
15598 modified 12/3/93, array(1) declarations changed to array(*)
15599
15600 =====================================================================
15601*/
15602
15603 /* Parameter adjustments */
15604 --zx;
15605
15606 /* Function Body */
15607 if (*n <= 0 || *incx <= 0) {
15608 return 0;
15609 }
15610 if (*incx == 1) {
15611 goto L20;
15612 }
15613
15614/* code for increment not equal to 1 */
15615
15616 ix = 1;
15617 i__1 = *n;
15618 for (i__ = 1; i__ <= i__1; ++i__) {
15619 i__2 = ix;
15620 z__2.r = *da, z__2.i = 0.;
15621 i__3 = ix;
15622 z__1.r = z__2.r * zx[i__3].r - z__2.i * zx[i__3].i, z__1.i = z__2.r *
15623 zx[i__3].i + z__2.i * zx[i__3].r;
15624 zx[i__2].r = z__1.r, zx[i__2].i = z__1.i;
15625 ix += *incx;
15626/* L10: */
15627 }
15628 return 0;
15629
15630/* code for increment equal to 1 */
15631
15632L20:
15633 i__1 = *n;

Callers 9

zgebak_Function · 0.85
zgebal_Function · 0.85
zgeev_Function · 0.85
zlals0_Function · 0.85
zlarfg_Function · 0.85
zlatrs_Function · 0.85
zlauu2_Function · 0.85
zpotf2_Function · 0.85
ztrevc_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected