my_ICOPY Subroutine

subroutine my_ICOPY(N, ZX, INCX, ZY, INCY)

Arguments

Type IntentOptional AttributesName
integer :: N
integer :: ZX(*)
integer :: INCX
integer :: ZY(*)
integer :: INCY

Called by

proc~~my_icopy~~CalledByGraph proc~my_icopy my_ICOPY proc~comms_scatterv_int_3 comms_scatterv_int_3 proc~comms_scatterv_int_3->proc~my_icopy proc~comms_scatterv_int_1 comms_scatterv_int_1 proc~comms_scatterv_int_1->proc~my_icopy proc~comms_scatterv_int_2 comms_scatterv_int_2 proc~comms_scatterv_int_2->proc~my_icopy interface~comms_scatterv comms_scatterv interface~comms_scatterv->proc~comms_scatterv_int_3 interface~comms_scatterv->proc~comms_scatterv_int_1 interface~comms_scatterv->proc~comms_scatterv_int_2 proc~k_path k_path proc~k_path->interface~comms_scatterv

Contents

Source Code


Source Code

subroutine my_ICOPY(N, ZX, INCX, ZY, INCY)
  !     .. Scalar Arguments ..
  integer INCX, INCY, N
  !     ..
  !     .. Array Arguments ..
  integer ZX(*), ZY(*)
  !     ..
  !
  !  Purpose
  !  =======
  !
  !     copies a vector, x, to a vector, y.
  !     jack dongarra, linpack, 4/11/78.
  !     modified 12/3/93, array(1) declarations changed to array(*)
  !
  !
  !     .. Local Scalars ..
  integer I, IX, IY
  !     ..
  if (N .le. 0) return
  if (INCX .eq. 1 .and. INCY .eq. 1) GO TO 20
  !
  !        code for unequal increments or equal increments
  !          not equal to 1
  !
  IX = 1
  IY = 1
  if (INCX .lt. 0) IX = (-N + 1)*INCX + 1
  if (INCY .lt. 0) IY = (-N + 1)*INCY + 1
  do I = 1, N
    ZY(IY) = ZX(IX)
    IX = IX + INCX
    IY = IY + INCY
  end do
  return
  !
  !        code for both increments equal to 1
  !
20 do I = 1, N
    ZY(I) = ZX(I)
  end do
  return
end subroutine my_ICOPY