Allocates the internal data-structures of the given list. This has to be called before any of the other routines. For deallocation call list_[valuetype]_destroy.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(list_callstackentry_type), | intent(inout) | :: | list | |||
integer, | intent(in), | optional | :: | initial_capacity |
The initial size of the internal array (default=11). |
SUBROUTINE list_callstackentry_init(list, initial_capacity) # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" !! Allocates the internal data-structures of the given list. # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" !! This has to be called before any of the other routines. # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" !! For deallocation call list_[valuetype]_destroy. # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" TYPE(list_callstackentry_type), intent(inout) :: list # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" INTEGER, INTENT(in), OPTIONAL :: initial_capacity # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" !! The initial size of the internal array (default=11). # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" INTEGER :: stat # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" INTEGER :: initial_capacity_ # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" initial_capacity_ = 11 # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" If(PRESENT(initial_capacity)) initial_capacity_ = initial_capacity # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" IF(initial_capacity_ < 0) & # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" DBCSR_ABORT("list_callstackentry_create: initial_capacity < 0") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" IF(ASSOCIATED(list%arr)) & # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" DBCSR_ABORT("list_callstackentry_create: list is already initialized.") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" ALLOCATE(list%arr(initial_capacity_), stat=stat) # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" IF (stat/=0)& # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" DBCSR_ABORT("list_callstackentry_init: allocation failed") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" list%size = 0 # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" END SUBROUTINE list_callstackentry_init