dbcsr_list_routinereport Module



Derived Types

type, private ::  private_item_type_routinereport

Components

Type Visibility Attributes Name Initial
type(routine_report_type), private, POINTER :: value

type, private ::  private_item_p_type_routinereport

Components

Type Visibility Attributes Name Initial
type(private_item_type_routinereport), private, POINTER :: p => Null()

type, public ::  list_routinereport_type

Components

Type Visibility Attributes Name Initial
type(private_item_p_type_routinereport), private, DIMENSION(:), POINTER :: arr => Null()
integer, private :: size = -1

Functions

public function list_routinereport_isready(list) result(res)

Test if the given list has been initialized.

Arguments

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

Return Value logical

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_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_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_routinereport_size(list) result(size)

Returns the current size of the list.

Arguments

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

Return Value integer


Subroutines

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_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_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_routinereport_push(list, value)

Appends the given value at the end of the list.

Arguments

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

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_routinereport_clear(list)

Removes all values from the list. The list itself is not deallocated.

Arguments

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

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 .

private subroutine change_capacity_routinereport(list, new_capacity)

Internal routine for changing the size of the internal array.

Arguments

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