dbcsr_release Subroutine

public recursive subroutine dbcsr_release(matrix)

Releases a reference for a DBCSR matrix If there are no references left, the matrix is destroyed.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix

DBCSR matrix


Source Code

   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