dbcsr_list Module

An array-based list which grows on demand. When the internal array is full, a new array of twice the size will be allocated and the items are copied over. This list can also be used as a stack. Have look at list_push(), list_pop() and list_peek().

Note

it's not possible to put all templates in a single module because this would lead to circular dependencies (timer_env_type contains list_routinestat_type and list_callstackentry_type, and list_timerenv_type contains timer_env_type)



Variables

Type Visibility Attributes Name Initial
character(len=*), private, parameter :: moduleN = 'dbcsr_list'

Interfaces

public interface list_init

  • public subroutine list_timerenv_init(list, initial_capacity)

    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.

    Arguments

    Type IntentOptional Attributes Name
    type(list_timerenv_type), intent(inout) :: list
    integer, intent(in), optional :: initial_capacity

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

  • public subroutine list_routinestat_init(list, initial_capacity)

    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.

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinestat_type), intent(inout) :: list
    integer, intent(in), optional :: initial_capacity

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

  • public subroutine list_routinereport_init(list, initial_capacity)

    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.

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinereport_type), intent(inout) :: list
    integer, intent(in), optional :: initial_capacity

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

  • public subroutine list_callstackentry_init(list, initial_capacity)

    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.

    Arguments

    Type IntentOptional Attributes Name
    type(list_callstackentry_type), intent(inout) :: list
    integer, intent(in), optional :: initial_capacity

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

public interface list_isready

public interface list_push

public interface list_pop

  • public function list_timerenv_pop(list) result(value)

    Returns the last element in the list and removes it. Is equivialent to: value = list_timerenv_get(list, list_timerenv_size(list)) call list_timerenv_del(list, list_timerenv_size(list))

    Arguments

    Type IntentOptional Attributes Name
    type(list_timerenv_type), intent(inout) :: list

    Return Value type(timer_env_type), POINTER

  • public function list_routinestat_pop(list) result(value)

    Returns the last element in the list and removes it. Is equivialent to: value = list_routinestat_get(list, list_routinestat_size(list)) call list_routinestat_del(list, list_routinestat_size(list))

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinestat_type), intent(inout) :: list

    Return Value type(routine_stat_type), POINTER

  • public function list_routinereport_pop(list) result(value)

    Returns the last element in the list and removes it. Is equivialent to: value = list_routinereport_get(list, list_routinereport_size(list)) call list_routinereport_del(list, list_routinereport_size(list))

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinereport_type), intent(inout) :: list

    Return Value type(routine_report_type), POINTER

  • public function list_callstackentry_pop(list) result(value)

    Returns the last element in the list and removes it. Is equivialent to: value = list_callstackentry_get(list, list_callstackentry_size(list)) call list_callstackentry_del(list, list_callstackentry_size(list))

    Arguments

    Type IntentOptional Attributes Name
    type(list_callstackentry_type), intent(inout) :: list

    Return Value type(callstack_entry_type)

public interface list_peek

  • public function list_timerenv_peek(list) result(value)

    Returns the last element in the list. Is equivalent to: list_timerenv_get(list, list_timerenv_size(list))

    Arguments

    Type IntentOptional Attributes Name
    type(list_timerenv_type), intent(inout) :: list

    Return Value type(timer_env_type), POINTER

  • public function list_routinestat_peek(list) result(value)

    Returns the last element in the list. Is equivalent to: list_routinestat_get(list, list_routinestat_size(list))

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinestat_type), intent(inout) :: list

    Return Value type(routine_stat_type), POINTER

  • public function list_routinereport_peek(list) result(value)

    Returns the last element in the list. Is equivalent to: list_routinereport_get(list, list_routinereport_size(list))

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinereport_type), intent(inout) :: list

    Return Value type(routine_report_type), POINTER

  • public function list_callstackentry_peek(list) result(value)

    Returns the last element in the list. Is equivalent to: list_callstackentry_get(list, list_callstackentry_size(list))

    Arguments

    Type IntentOptional Attributes Name
    type(list_callstackentry_type), intent(inout) :: list

    Return Value type(callstack_entry_type)

private interface list_insert

  • public subroutine list_timerenv_insert(list, value, pos)

    Inserts the given value at the given position within the list. Values which lay behind the insertion-position move one position up.

    Arguments

    Type IntentOptional Attributes Name
    type(list_timerenv_type), intent(inout) :: list
    type(timer_env_type), intent(in), POINTER :: value
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+2 .

  • public subroutine list_routinestat_insert(list, value, pos)

    Inserts the given value at the given position within the list. Values which lay behind the insertion-position move one position up.

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinestat_type), intent(inout) :: list
    type(routine_stat_type), intent(in), POINTER :: value
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+2 .

  • public subroutine list_routinereport_insert(list, value, pos)

    Inserts the given value at the given position within the list. Values which lay behind the insertion-position move one position up.

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinereport_type), intent(inout) :: list
    type(routine_report_type), intent(in), POINTER :: value
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+2 .

  • public subroutine list_callstackentry_insert(list, value, pos)

    Inserts the given value at the given position within the list. Values which lay behind the insertion-position move one position up.

    Arguments

    Type IntentOptional Attributes Name
    type(list_callstackentry_type), intent(inout) :: list
    type(callstack_entry_type), intent(in) :: value
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+2 .

private interface list_set

  • public subroutine list_timerenv_set(list, value, pos)

    Assings the given value to the given position in the list. Thereby, the former value at that position gets overwritten. If the position is out of bounds, the program stops.

    Arguments

    Type IntentOptional Attributes Name
    type(list_timerenv_type), intent(inout) :: list
    type(timer_env_type), intent(in), POINTER :: value
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+1.

  • public subroutine list_routinestat_set(list, value, pos)

    Assings the given value to the given position in the list. Thereby, the former value at that position gets overwritten. If the position is out of bounds, the program stops.

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinestat_type), intent(inout) :: list
    type(routine_stat_type), intent(in), POINTER :: value
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+1.

  • public subroutine list_routinereport_set(list, value, pos)

    Assings the given value to the given position in the list. Thereby, the former value at that position gets overwritten. If the position is out of bounds, the program stops.

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinereport_type), intent(inout) :: list
    type(routine_report_type), intent(in), POINTER :: value
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+1.

  • public subroutine list_callstackentry_set(list, value, pos)

    Assings the given value to the given position in the list. Thereby, the former value at that position gets overwritten. If the position is out of bounds, the program stops.

    Arguments

    Type IntentOptional Attributes Name
    type(list_callstackentry_type), intent(inout) :: list
    type(callstack_entry_type), intent(in) :: value
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+1.

public interface list_get

  • public function list_timerenv_get(list, pos) result(value)

    Returns the value at the given position from the list.

    Arguments

    Type IntentOptional Attributes Name
    type(list_timerenv_type), intent(in) :: list
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+1 .

    Return Value type(timer_env_type), POINTER

  • public function list_routinestat_get(list, pos) result(value)

    Returns the value at the given position from the list.

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinestat_type), intent(in) :: list
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+1 .

    Return Value type(routine_stat_type), POINTER

  • public function list_routinereport_get(list, pos) result(value)

    Returns the value at the given position from the list.

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinereport_type), intent(in) :: list
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+1 .

    Return Value type(routine_report_type), POINTER

  • public function list_callstackentry_get(list, pos) result(value)

    Returns the value at the given position from the list.

    Arguments

    Type IntentOptional Attributes Name
    type(list_callstackentry_type), intent(in) :: list
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+1 .

    Return Value type(callstack_entry_type)

private interface list_del

  • public subroutine list_timerenv_del(list, pos)

    Removes the value at the given position from the list.

    Arguments

    Type IntentOptional Attributes Name
    type(list_timerenv_type), intent(inout) :: list
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+1 .

  • public subroutine list_routinestat_del(list, pos)

    Removes the value at the given position from the list.

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinestat_type), intent(inout) :: list
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+1 .

  • public subroutine list_routinereport_del(list, pos)

    Removes the value at the given position from the list.

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinereport_type), intent(inout) :: list
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+1 .

  • public subroutine list_callstackentry_del(list, pos)

    Removes the value at the given position from the list.

    Arguments

    Type IntentOptional Attributes Name
    type(list_callstackentry_type), intent(inout) :: list
    integer, intent(in) :: pos

    Position in the list - must fulfill 0 < pos < list_size+1 .

private interface list_clear

public interface list_size

public interface list_destroy

  • public subroutine list_timerenv_destroy(list)

    Deallocated the internal data-structures of the given list. Caution: If the stored values are pointers, their targets will not get deallocated by this routine.

    Arguments

    Type IntentOptional Attributes Name
    type(list_timerenv_type), intent(inout) :: list
  • public subroutine list_routinestat_destroy(list)

    Deallocated the internal data-structures of the given list. Caution: If the stored values are pointers, their targets will not get deallocated by this routine.

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinestat_type), intent(inout) :: list
  • public subroutine list_routinereport_destroy(list)

    Deallocated the internal data-structures of the given list. Caution: If the stored values are pointers, their targets will not get deallocated by this routine.

    Arguments

    Type IntentOptional Attributes Name
    type(list_routinereport_type), intent(inout) :: list
  • public subroutine list_callstackentry_destroy(list)

    Deallocated the internal data-structures of the given list. Caution: If the stored values are pointers, their targets will not get deallocated by this routine.

    Arguments

    Type IntentOptional Attributes Name
    type(list_callstackentry_type), intent(inout) :: list