x_eq_sx.F


c**********************************************************************
#include "author.inc"
c*    $Id: x_eq_sx.F,v 1.5 1995/07/30 17:49:34 turner Exp $
c*
c*    Scales a vector by a scalar (x = x*s).
c*
c*    <PARAMETER LIST>
c*
c*     Input:
c*      n - number of elements
c*      s - scalar
c*
c*     In/Out:
c*      x - x-vector
c*
c*     Output:
c*      status - return status
c*
#include "copyright.inc"
c**********************************************************************
      subroutine JT_x_eq_sx (n, s, x, status)
      implicit none
c
c ... Input:
      integer n
      real s
c
c ... In/Out:
      real x(n)
c
c ... Output:
      integer status
c
#ifdef use_blas
      call SSCAL (n, s, x, 1)
#else
c ... Local:
      integer i
c
      do i=1,n
       x(i) = s*x(i)
      enddo
#endif
c
      status = 0
      return
      end