SwapVectors.F


c**********************************************************************
#include "author.inc"
c*    $Id: SwapVectors.F,v 1.4 1995/07/30 17:49:31 turner Exp $
c*
c*    Swaps the elements of vectors x and y.
c*
c*    <PARAMETER LIST>
c*
c*     Input:
c*      n - number of elements
c*
c*     In/Out:
c*      x - vector x
c*      y - vector y
c*
c*     Output:
c*      status - return status
c*
#include "copyright.inc"
c**********************************************************************
      subroutine JT_SwapVectors (n, x, y, status)
      implicit none
c
c ... Input:
      integer n
c
c ... In/Out:
      real x(n), y(n)
c
c ... Output:
      integer status
c
#ifdef use_blas
      call SSWAP (n, x, 1, y, 1)
#else
c ... Local:
      integer i
      real save
c
      do i=1,n
       save = y(i)
       y(i) = x(i)
       x(i) = save
      enddo
#endif
c
      status = 0
      return
      end