Releases a reference for a DBCSR matrix If there are no references left, the matrix is destroyed.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(inout) | :: | matrix |
DBCSR matrix |
RECURSIVE SUBROUTINE dbcsr_release(matrix)
!! Releases a reference for a DBCSR matrix
!! If there are no references left, the matrix is destroyed.
TYPE(dbcsr_type), INTENT(INOUT) :: matrix
!! DBCSR matrix
matrix%refcount = matrix%refcount - 1
IF (matrix%refcount .EQ. 0) THEN
CALL dbcsr_destroy(matrix)
END IF
END SUBROUTINE dbcsr_release