change the signs of vector elements.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
vector dimension. |
||
| real(kind=wp), | intent(in) | :: | x(*) |
x(n) input vector. |
||
| real(kind=wp), | intent(out) | :: | y(*) |
y(n) output vector where |
pure subroutine mxvneg(n,x,y) integer,intent(in) :: n !! vector dimension. real(wp),intent(in) :: x(*) !! x(n) input vector. real(wp),intent(out) :: y(*) !! y(n) output vector where `y:= - x`. integer :: i do i = 1 , n y(i) = -x(i) end do end subroutine mxvneg