~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to routines/blas/zaxpy.f

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      subroutine zaxpy(n,za,zx,incx,zy,incy)
 
2
c
 
3
c     constant times a vector plus a vector.
 
4
c     jack dongarra, 3/11/78.
 
5
c     modified 12/3/93, array(1) declarations changed to array(*)
 
6
c
 
7
      double complex zx(*),zy(*),za
 
8
      integer i,incx,incy,ix,iy,n
 
9
      double precision dcabs1
 
10
      if(n.le.0)return
 
11
      if (dcabs1(za) .eq. 0.0d0) return
 
12
      if (incx.eq.1.and.incy.eq.1)go to 20
 
13
c
 
14
c        code for unequal increments or equal increments
 
15
c          not equal to 1
 
16
c
 
17
      ix = 1
 
18
      iy = 1
 
19
      if(incx.lt.0)ix = (-n+1)*incx + 1
 
20
      if(incy.lt.0)iy = (-n+1)*incy + 1
 
21
      do 10 i = 1,n
 
22
        zy(iy) = zy(iy) + za*zx(ix)
 
23
        ix = ix + incx
 
24
        iy = iy + incy
 
25
   10 continue
 
26
      return
 
27
c
 
28
c        code for both increments equal to 1
 
29
c
 
30
   20 do 30 i = 1,n
 
31
        zy(i) = zy(i) + za*zx(i)
 
32
   30 continue
 
33
      return
 
34
      end