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