k-th row of a dense symmetric matrix a is copied to the vector x.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
order of the matrix a. |
||
| real(kind=wp), | intent(in) | :: | a(*) |
|
||
| real(kind=wp), | intent(out) | :: | x(*) |
x(n) output vector. |
||
| integer, | intent(in) | :: | k |
index of copied row. |
pure subroutine mxdsmv(n,a,x,k) integer,intent(in) :: k !! index of copied row. integer,intent(in) :: n !! order of the matrix a. real(wp),intent(in) :: a(*) !! `a(n*(n+1)/2)` dense symmetric matrix !! stored in the packed form. real(wp),intent(out) :: x(*) !! x(n) output vector. integer :: i , l l = k*(k-1)/2 do i = 1 , n if ( i<=k ) then l = l + 1 else l = l + i - 1 endif x(i) = a(l) end do end subroutine mxdsmv