csr_destroy Subroutine

private subroutine csr_destroy(self)

Release all storage and reset the matrix to an empty 0 by 0 one.

Type Bound

csr_t

Arguments

Type IntentOptional Attributes Name
class(csr_t), intent(inout) :: self

Called by

proc~~csr_destroy~~CalledByGraph proc~csr_destroy csr_t%csr_destroy proc~connected_components connected_components proc~connected_components->proc~csr_destroy proc~csr_build_from_coo csr_t%csr_build_from_coo proc~csr_build_from_coo->proc~csr_destroy proc~csr_transpose csr_t%csr_transpose proc~csr_transpose->proc~csr_destroy

Source Code

   subroutine csr_destroy(self)
      !! Release all storage and reset the matrix to an empty 0 by 0 one.
      class(csr_t), intent(inout) :: self

      if (allocated(self%row_ptr)) deallocate (self%row_ptr)
      if (allocated(self%col_idx)) deallocate (self%col_idx)
      if (allocated(self%values)) deallocate (self%values)
      self%nrow = 0
      self%ncol = 0
   end subroutine csr_destroy