dict_i4tuple_callstat_init Subroutine

private subroutine dict_i4tuple_callstat_init(dict, initial_capacity)

Allocates the internal data-structures of the given dictionary.

Arguments

Type IntentOptional Attributes Name
type(dict_i4tuple_callstat_type), intent(inout) :: dict
integer, intent(in), optional :: initial_capacity

The initial size of the internal array (default=11).


Source Code

      SUBROUTINE dict_i4tuple_callstat_init(dict, initial_capacity)
      !! Allocates the internal data-structures of the given dictionary.

         TYPE(dict_i4tuple_callstat_type), intent(inout)  :: dict
         INTEGER, INTENT(in), OPTIONAL                         :: initial_capacity
         !! The initial size of the internal array (default=11).

         INTEGER :: initial_capacity_
         initial_capacity_ = 11
         IF (PRESENT(initial_capacity)) initial_capacity_ = initial_capacity

         IF (initial_capacity_ < 1) &
            DBCSR_ABORT("dict_i4tuple_callstat_init: initial_capacity < 1")

         IF (ASSOCIATED(dict%buckets)) &
            DBCSR_ABORT("dict_i4tuple_callstat_init: dictionary is already initialized.")

         ALLOCATE (dict%buckets(initial_capacity_))
         dict%size = 0

      END SUBROUTINE dict_i4tuple_callstat_init