dag_m Module

  • Jacob Williams, Damian Rouson, Robert Singleterry, Brad Richardson
  • 2020-Nov-30
  • Copyright (c) 2020, Sourcery Institute, BSD 3-clause license Copyright (c) 2018 Jacob Williams
  • v1.0
  • 40 statements
  • Source File

Uses

  • module~~dag_m~~UsesGraph module~dag_m dag_m iso_fortran_env iso_fortran_env module~dag_m->iso_fortran_env module~vertex_m vertex_m module~dag_m->module~vertex_m module~task_m task_m module~vertex_m->module~task_m module~payload_m payload_m module~task_m->module~payload_m

Used by

  • module~~dag_m~~UsedByGraph module~dag_m dag_m module~runner_m runner_m module~runner_m->module~dag_m

Contents


Interfaces

public interface dag_t

  • private function construct_from_vertices(vertices) result(dag)

    Construct a dag_t object from an array of (unsorted) vertex_t objects (result contains a topologically sorted index array)

    Arguments

    TypeIntentOptionalAttributesName
    type(vertex_t), intent(in) :: vertices(:)

    Return Value type(dag_t)


Derived Types

type, public :: dag_t

Encapsulate a graph as an array of vertices, each storing dependency information

Components

TypeVisibilityAttributesNameInitial
type(vertex_t), private, allocatable:: vertices(:)

Constructor

private function construct_from_vertices(vertices)

Construct a dag_t object from an array of (unsorted) vertex_t objects (result contains a topologically sorted index array)

Type-Bound Procedures

procedure, public :: dependencies_for
procedure, public :: depends_on

Functions

private function construct_from_vertices(vertices) result(dag)

Construct a dag_t object from an array of (unsorted) vertex_t objects (result contains a topologically sorted index array)

Arguments

TypeIntentOptionalAttributesName
type(vertex_t), intent(in) :: vertices(:)

Return Value type(dag_t)

private pure function dependencies_for(self, vertex_id) result(dependency_ids)

Result is an array of the ids on which vertex_id depends

Arguments

TypeIntentOptionalAttributesName
class(dag_t), intent(in) :: self
integer, intent(in) :: vertex_id

Return Value integer,allocatable, (:)

private pure function depends_on(self, vertex_num) result(dependencies)

Result is an array of the vertex numbers that depend on on vertex vertex_num

Arguments

TypeIntentOptionalAttributesName
class(dag_t), intent(in) :: self
integer, intent(in) :: vertex_num

Return Value integer,allocatable, (:)