z_eq_y_plus_x.F


c**********************************************************************
#include "author.inc"
c*    $Id: z_eq_y_plus_x.F,v 1.6 1995/07/30 17:49:47 turner Exp $
c*
c*    Computes z = y+x
c*
c*    <PARAMETER LIST>
c*
c*     Input:
c*      n - number of elements
c*      x - x-vector
c*      y - y-vector
c*
c*     Output:
c*      z - destination vector
c*      status - return status
c*
#include "copyright.inc"
c**********************************************************************
      subroutine JT_z_eq_y_plus_x (n, x, y, z, status)
      implicit none
c
c ... Input:
      integer n
      real x(n), y(n)
c
c ... Output:
      integer status
      real z(n)
c
c ... Local:
#ifdef use_blas
      real one
      parameter (one=1.0d0)
c
      call SCOPY (n, y, 1, z, 1)       ! z = y
      call SAXPY (n, one, x, 1, z, 1)  ! z = z + x
#else
      integer i
c
      do i=1,n
       z(i) = y(i) + x(i)
      enddo
#endif
c
      status = 0
      return
      end