Creates a memory pool.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_mempool_type), | POINTER | :: | pool |
SUBROUTINE dbcsr_mempool_create(pool)
!! Creates a memory pool.
TYPE(dbcsr_mempool_type), POINTER :: pool
IF (ASSOCIATED(pool)) DBCSR_ABORT("pool already allocated")
ALLOCATE (pool)
!$ CALL OMP_INIT_LOCK(pool%lock)
ALLOCATE (pool%root) !root always allocated, but unused. Simplifies looping.
END SUBROUTINE dbcsr_mempool_create