Release all storage and reset the matrix to an empty 0 by 0 one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(csr_t), | intent(inout) | :: | self |
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