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

Function cscal_

numpy/linalg/lapack_lite/f2c_blas.c:3805–3871  ·  view source on GitHub ↗

Subroutine */

Source from the content-addressed store, hash-verified

3803} /* cherk_ */
3804
3805/* Subroutine */ int cscal_(integer *n, complex *ca, complex *cx, integer *
3806 incx)
3807{
3808 /* System generated locals */
3809 integer i__1, i__2, i__3, i__4;
3810 complex q__1;
3811
3812 /* Local variables */
3813 static integer i__, nincx;
3814
3815
3816/*
3817 Purpose
3818 =======
3819
3820 CSCAL scales a vector by a constant.
3821
3822 Further Details
3823 ===============
3824
3825 jack dongarra, linpack, 3/11/78.
3826 modified 3/93 to return if incx .le. 0.
3827 modified 12/3/93, array(1) declarations changed to array(*)
3828
3829 =====================================================================
3830*/
3831
3832 /* Parameter adjustments */
3833 --cx;
3834
3835 /* Function Body */
3836 if (*n <= 0 || *incx <= 0) {
3837 return 0;
3838 }
3839 if (*incx == 1) {
3840 goto L20;
3841 }
3842
3843/* code for increment not equal to 1 */
3844
3845 nincx = *n * *incx;
3846 i__1 = nincx;
3847 i__2 = *incx;
3848 for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
3849 i__3 = i__;
3850 i__4 = i__;
3851 q__1.r = ca->r * cx[i__4].r - ca->i * cx[i__4].i, q__1.i = ca->r * cx[
3852 i__4].i + ca->i * cx[i__4].r;
3853 cx[i__3].r = q__1.r, cx[i__3].i = q__1.i;
3854/* L10: */
3855 }
3856 return 0;
3857
3858/* code for increment equal to 1 */
3859
3860L20:
3861 i__2 = *n;
3862 for (i__ = 1; i__ <= i__2; ++i__) {

Callers 10

cgeev_Function · 0.85
cgetf2_Function · 0.85
clabrd_Function · 0.85
clahqr_Function · 0.85
clahr2_Function · 0.85
clarfg_Function · 0.85
clatrd_Function · 0.85
ctrti2_Function · 0.85
cung2r_Function · 0.85
cungl2_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected