dbcsr_data_hold Subroutine

public subroutine dbcsr_data_hold(area)

Registers another use of the data area

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_data_obj), intent(inout) :: area

data area


Contents

Source Code


Source Code

   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