dbcsr_mempool_limit_capacity Subroutine

public subroutine dbcsr_mempool_limit_capacity(pool, capacity)

Ensures that mempool has at least the given capacity.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_mempool_type), POINTER :: pool
integer, intent(in) :: capacity

Source Code

   SUBROUTINE dbcsr_mempool_limit_capacity(pool, capacity)
      !! Ensures that mempool has at least the given capacity.
      TYPE(dbcsr_mempool_type), POINTER                  :: pool
      INTEGER, INTENT(IN)                                :: capacity

      IF (.NOT. ASSOCIATED(pool)) RETURN
!$    CALL OMP_SET_LOCK(pool%lock)
      pool%capacity = MAX(pool%capacity, capacity)
!$    CALL OMP_UNSET_LOCK(pool%lock)

   END SUBROUTINE dbcsr_mempool_limit_capacity