Blame thirdparty/openblas/xianyi-OpenBLAS-e6e87a2/reference/cscalf.f
|
kusano |
2b45e8 |
subroutine cscalf(n,ca,cx,incx)
|
|
kusano |
2b45e8 |
c
|
|
kusano |
2b45e8 |
c scales a vector by a constant.
|
|
kusano |
2b45e8 |
c jack dongarra, linpack, 3/11/78.
|
|
kusano |
2b45e8 |
c modified 3/93 to return if incx .le. 0.
|
|
kusano |
2b45e8 |
c modified 12/3/93, array(1) declarations changed to array(*)
|
|
kusano |
2b45e8 |
c
|
|
kusano |
2b45e8 |
complex ca,cx(*)
|
|
kusano |
2b45e8 |
integer i,incx,n,nincx
|
|
kusano |
2b45e8 |
c
|
|
kusano |
2b45e8 |
if( n.le.0 .or. incx.le.0 )return
|
|
kusano |
2b45e8 |
if(incx.eq.1)go to 20
|
|
kusano |
2b45e8 |
c
|
|
kusano |
2b45e8 |
c code for increment not equal to 1
|
|
kusano |
2b45e8 |
c
|
|
kusano |
2b45e8 |
nincx = n*incx
|
|
kusano |
2b45e8 |
do 10 i = 1,nincx,incx
|
|
kusano |
2b45e8 |
cx(i) = ca*cx(i)
|
|
kusano |
2b45e8 |
10 continue
|
|
kusano |
2b45e8 |
return
|
|
kusano |
2b45e8 |
c
|
|
kusano |
2b45e8 |
c code for increment equal to 1
|
|
kusano |
2b45e8 |
c
|
|
kusano |
2b45e8 |
20 do 30 i = 1,n
|
|
kusano |
2b45e8 |
cx(i) = ca*cx(i)
|
|
kusano |
2b45e8 |
30 continue
|
|
kusano |
2b45e8 |
return
|
|
kusano |
2b45e8 |
end
|