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

Function zscal_

numpy/linalg/lapack_lite/f2c_blas.c:19087–19153  ·  view source on GitHub ↗

Subroutine */

Source from the content-addressed store, hash-verified

19085} /* zherk_ */
19086
19087/* Subroutine */ int zscal_(integer *n, doublecomplex *za, doublecomplex *zx,
19088 integer *incx)
19089{
19090 /* System generated locals */
19091 integer i__1, i__2, i__3;
19092 doublecomplex z__1;
19093
19094 /* Local variables */
19095 static integer i__, ix;
19096
19097
19098/*
19099 Purpose
19100 =======
19101
19102 ZSCAL scales a vector by a constant.
19103
19104 Further Details
19105 ===============
19106
19107 jack dongarra, 3/11/78.
19108 modified 3/93 to return if incx .le. 0.
19109 modified 12/3/93, array(1) declarations changed to array(*)
19110
19111 =====================================================================
19112*/
19113
19114 /* Parameter adjustments */
19115 --zx;
19116
19117 /* Function Body */
19118 if (*n <= 0 || *incx <= 0) {
19119 return 0;
19120 }
19121 if (*incx == 1) {
19122 goto L20;
19123 }
19124
19125/* code for increment not equal to 1 */
19126
19127 ix = 1;
19128 i__1 = *n;
19129 for (i__ = 1; i__ <= i__1; ++i__) {
19130 i__2 = ix;
19131 i__3 = ix;
19132 z__1.r = za->r * zx[i__3].r - za->i * zx[i__3].i, z__1.i = za->r * zx[
19133 i__3].i + za->i * zx[i__3].r;
19134 zx[i__2].r = z__1.r, zx[i__2].i = z__1.i;
19135 ix += *incx;
19136/* L10: */
19137 }
19138 return 0;
19139
19140/* code for increment equal to 1 */
19141
19142L20:
19143 i__1 = *n;
19144 for (i__ = 1; i__ <= i__1; ++i__) {

Callers 10

zgeev_Function · 0.85
zgetf2_Function · 0.85
zlabrd_Function · 0.85
zlahqr_Function · 0.85
zlahr2_Function · 0.85
zlarfg_Function · 0.85
zlatrd_Function · 0.85
ztrti2_Function · 0.85
zung2r_Function · 0.85
zungl2_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected