Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2789_MathNetNumerics-Exploration/HeuristicLab.Algorithms.DataAnalysis.Experimental/sbart/caxpy.f @ 17185

Last change on this file since 17185 was 15457, checked in by gkronber, 7 years ago

#2789 added Finbarr O'Sullivan smoothing spline code

File size: 1.1 KB
Line 
1      SUBROUTINE CAXPY(N,CA,CX,INCX,CY,INCY)
2*     .. Scalar Arguments ..
3      COMPLEX CA
4      INTEGER INCX,INCY,N
5*     ..
6*     .. Array Arguments ..
7      COMPLEX CX(*),CY(*)
8*     ..
9*
10*  Purpose
11*  =======
12*
13*     CAXPY constant times a vector plus a vector.
14*
15*  Further Details
16*  ===============
17*
18*     jack dongarra, linpack, 3/11/78.
19*     modified 12/3/93, array(1) declarations changed to array(*)
20*
21*     .. Local Scalars ..
22      INTEGER I,IX,IY
23*     ..
24*     .. External Functions ..
25      REAL SCABS1
26      EXTERNAL SCABS1
27*     ..
28      IF (N.LE.0) RETURN
29      IF (SCABS1(CA).EQ.0.0E+0) RETURN
30      IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
31*
32*        code for unequal increments or equal increments
33*          not equal to 1
34*
35      IX = 1
36      IY = 1
37      IF (INCX.LT.0) IX = (-N+1)*INCX + 1
38      IF (INCY.LT.0) IY = (-N+1)*INCY + 1
39      DO 10 I = 1,N
40          CY(IY) = CY(IY) + CA*CX(IX)
41          IX = IX + INCX
42          IY = IY + INCY
43   10 CONTINUE
44      RETURN
45*
46*        code for both increments equal to 1
47*
48   20 DO 30 I = 1,N
49          CY(I) = CY(I) + CA*CX(I)
50   30 CONTINUE
51      RETURN
52      END
Note: See TracBrowser for help on using the repository browser.