mxdsmm Subroutine

public pure subroutine mxdsmm(n, a, x, y)

multiplication of a dense symmetric matrix a by a vector x.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

order of the matrix a.

real(kind=wp), intent(in) :: a(*)

a(n*(n+1)/2) dense symmetric matrix stored in the packed form.

real(kind=wp), intent(in) :: x(*)

x(n) input vector.

real(kind=wp), intent(out) :: y(*)

y(n) output vector equal to a*x.


Called by

proc~~mxdsmm~~CalledByGraph proc~mxdsmm mxdsmm proc~dual_range_space_quad_prog psqp_class%dual_range_space_quad_prog proc~dual_range_space_quad_prog->proc~mxdsmm proc~update_tri_decomp_general update_tri_decomp_general proc~dual_range_space_quad_prog->proc~update_tri_decomp_general proc~update_tri_decomp_general->proc~mxdsmm proc~psqp psqp_class%psqp proc~psqp->proc~dual_range_space_quad_prog proc~psqpn psqp_class%psqpn proc~psqpn->proc~psqp

Source Code

      pure subroutine mxdsmm(n,a,x,y)

      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(in) :: x(*)  !! x(n)  input vector.
      real(wp),intent(out) :: y(*)  !! y(n)  output vector equal to ` a*x`.

      real(wp) :: temp
      integer :: i , j , k , l

      k = 0
      do i = 1 , n
         temp = 0.0_wp
         l = k
         do j = 1 , i
            l = l + 1
            temp = temp + a(l)*x(j)
         end do
         do j = i + 1 , n
            l = l + j - 1
            temp = temp + a(l)*x(j)
         end do
         y(i) = temp
         k = k + i
      end do

      end subroutine mxdsmm