Loading...
Searching...
No Matches
workflow Module Reference

Definition

Provides properties and instance methods for the creation, modification, execution and deletion of a workflow. This object is used to execute the various steps involved when benchmarking.

type, public :: workflow 

Examples

The following example demonstrates some of the main members of the workflow class.
The steps are first loaded into the workflow using the method add .
It is then executed in the order the steps were added by invoking the function run . The function run returns a pointer to the next available step, i.e. the position of the next step in the entire workflow.

use benchmark_workflow
type(workflow), allocatable, target :: wf
class(workflow), pointer :: current
if(.not. allocated(wf)) allocate(wf)
call wf%add(setup())
if (.not. options%skip_prelude) then
call wf%add(system())
call wf%add(compiler())
call wf%add(dryrun())
end if
current => wf%run()

Remarks

Use the workflow class for situation where one has a clear series of steps to be performed sequentially

Note
This class does not support parallelization and may never will.

Constructors

Initializes a new instance of the workflow class

workflow(procedure(work))

type(workflow) function workflow(procedure(work) a)
Parameters
[in]aThe action to be performed

Examples

!foo() is a subroutine of type subroutine work(class(workflow))
wf = workflow(foo())

Remarks

Definition at line 59 of file Workflow.f90.


The documentation for this module was generated from the following file:

Variables

character(:), allocatable, public header
 Header is the first node of the linked list of actions.
 
class(workflow), pointer, public next => null()
 Next action in the linked list.
 

Static Public Attributes

procedure(work), pointer, nopass, public action => null()
 Action to be performed.
 

Methods

◆ add() [1/2]

generic, public add ( class(workflow), intent(inout), target this,
procedure(work) a )

Add a step to an existing workflow, described by an action object. The action is a s procedure implementing the work interface.

Parameters
[in,out]thisThe type bound to the method
[in]aThe action to be added

Remarks

Definition at line 53 of file Workflow.f90.

◆ add() [2/2]

generic, public add ( class(workflow), intent(inout), target this,
class(workflow), intent(in) w )

Add a step to an existing workflow, described by a workflow object.

Parameters
[in,out]thisThe type bound to the method
[in]wThe workflow to be added

Remarks

Definition at line 53 of file Workflow.f90.

◆ dispose()

procedure, pass, public dispose ( class(workflow), intent(inout) this)

Dispose resources associated with the bound type.

Parameters
[in,out]thisThe type bound to the method

Remarks

Definition at line 55 of file Workflow.f90.

◆ run()

procedure, pass, public run ( class(workflow), intent(inout), target this)

Add a step to an existing workflow, described by an action object. The action is a s procedure implementing the work interface.

Parameters
[in,out]thisThe type bound to the method
Returns
A pointer of type class(workflow), pointing to the next available step

Remarks

Definition at line 54 of file Workflow.f90.

Finalizer

◆ finalize()

final finalize ( type(workflow), intent(inout) this)
final

Definition at line 56 of file Workflow.f90.