Registers another use of the data area
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_data_obj), | intent(inout) | :: | area |
data area |
SUBROUTINE dbcsr_data_hold(area)
!! Registers another use of the data area
TYPE(dbcsr_data_obj), INTENT(INOUT) :: area
!! data area
IF (careful_mod) THEN
IF (.NOT. ASSOCIATED(area%d)) &
DBCSR_ABORT("Can't hold an empty data area.")
IF (area%d%refcount <= 0) &
DBCSR_ABORT("Should not hold an area with zero references.")
END IF
IF (.NOT. ASSOCIATED(area%d)) THEN
RETURN
END IF
!$OMP ATOMIC
area%d%refcount = area%d%refcount + 1
END SUBROUTINE dbcsr_data_hold