Ensures that mempool has at least the given capacity.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_mempool_type), | POINTER | :: | pool | |||
integer, | intent(in) | :: | capacity |
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