, assembled CC format
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I4), | intent(in) | :: | n | |||
integer(kind=I4), | intent(in) | :: | nz | |||
real(kind=R8), | intent(in), | dimension(n) | :: | x | ||
real(kind=R8), | intent(out), | dimension(n) | :: | y | ||
real(kind=R8), | intent(in), | dimension(nz) | :: | a_elt | ||
integer(kind=I4), | intent(in), | dimension(nz ) | :: | irow | ||
integer(kind=I4), | intent(in), | dimension(n+1) | :: | jptr | ||
integer(kind=I4), | intent(in) | :: | slvt |
subroutine prod_a_x(n, nz, x, y, a_elt, irow, jptr, slvt)
implicit none
integer(kind=I4), intent(in) :: n, nz, slvt
real(kind=R8), dimension(nz), intent(in) :: a_elt
integer(kind=I4), dimension(nz ), intent(in) :: irow
integer(kind=I4), dimension(n+1), intent(in) :: jptr
real(kind=R8), dimension(n), intent(in) :: x
real(kind=R8), dimension(n), intent(out) :: y
integer(kind=I4) :: i, k, dec
y(1:n) = 0._R8
dec = 0
if (slvt==UMFP .or. slvt==SULU) dec = 1
do i = 1, n
do k = jptr(i), jptr(i+1)-1
y(irow(k +dec) +dec) = y(irow(k +dec) +dec) + x(i)*a_elt(k +dec)
enddo
enddo
return
endsubroutine prod_a_x