dtrace Function

pure function dtrace(A) result(t)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: A(:,:)

Return Value real(kind=8)


Source Code

pure function dtrace(A) result(t)
  real(8), intent(in) :: A(:,:)
  real(8)             :: t
  integer             :: i
  t = 0d0
  do i = 1,minval(shape(A))
     t = t + A(i,i)
  end do
end function dtrace