MeterNode Derived Type

type, public, extends(AbstractMeterNode) :: MeterNode


Inherits

type~~meternode~~InheritsGraph type~meternode MeterNode type~abstractmeter AbstractMeter type~meternode->type~abstractmeter meter type~abstractmeternode AbstractMeterNode type~meternode->type~abstractmeternode type~meternodevector MeterNodeVector type~meternode->type~meternodevector children type~v_wrapper~3 v_Wrapper type~meternodevector->type~v_wrapper~3 elements type~v_wrapper~3->type~abstractmeternode item

Inherited by

type~~meternode~~InheritedByGraph type~meternode MeterNode type~baseprofiler BaseProfiler type~baseprofiler->type~meternode root_node type~meternodeiterator MeterNodeIterator type~meternodeiterator->type~meternode reference type~distributedprofiler DistributedProfiler type~distributedprofiler->type~baseprofiler type~memoryprofiler MemoryProfiler type~memoryprofiler->type~baseprofiler type~timeprofiler TimeProfiler type~timeprofiler->type~baseprofiler type~mapl_metacomp MAPL_MetaComp type~mapl_metacomp->type~distributedprofiler t_profiler type~historytrajectory HistoryTrajectory type~historytrajectory->type~mapl_metacomp GENSTATE type~masksamplergeosat MaskSamplerGeosat type~masksamplergeosat->type~mapl_metacomp GENSTATE type~stationsampler StationSampler type~stationsampler->type~mapl_metacomp GENSTATE

Constructor

public interface MeterNode

  • private function new_MeterNode(name, meter, depth) result(tree)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: name
    class(AbstractMeter), intent(in) :: meter
    integer, intent(in), optional :: depth

    Return Value type(MeterNode)


Type-Bound Procedures

procedure, public :: accumulate

  • private recursive subroutine accumulate(this, other)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(inout) :: this
    class(AbstractMeterNode), intent(in), target :: other

procedure, public :: add_child

  • private subroutine add_child(this, name, meter)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(inout), target :: this
    character(len=*), intent(in) :: name
    class(AbstractMeter), intent(in) :: meter

procedure, public :: begin

  • private function begin(this) result(iterator)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(in), target :: this

    $ iterator = MeterNodeIterator(this)

    Return Value class(AbstractMeterNodeIterator), allocatable

procedure, public :: end

  • private function end(this) result(iterator)

    $ iterator = MeterNodeIterator(this)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(in), target :: this

    Return Value class(AbstractMeterNodeIterator), allocatable

procedure, public :: find_child

  • private function find_child(this, name) result(idx)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(in) :: this
    character(len=*), intent(in) :: name

    Return Value integer

procedure, public :: get_child

  • private function get_child(this, name) result(child)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(inout), target :: this
    character(len=*), intent(in) :: name

    Return Value class(AbstractMeterNode), pointer

procedure, public :: get_depth

  • private function get_depth(this) result(depth)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(in) :: this

    Return Value integer

procedure, public :: get_exclusive

  • private function get_exclusive(this) result(exclusive)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(in) :: this

    Return Value real(kind=REAL64)

procedure, public :: get_inclusive

  • private function get_inclusive(this) result(inclusive)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(in) :: this

    Return Value real(kind=REAL64)

procedure, public :: get_meter

  • private function get_meter(this) result(meter)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(in), target :: this

    Return Value class(AbstractMeter), pointer

procedure, public :: get_name

  • private function get_name(this) result(name)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(in), target :: this

    Return Value character(len=:), pointer

procedure, public :: get_num_children

  • private function get_num_children(this) result(num_children)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(in), target :: this

    Return Value integer

procedure, public :: get_num_nodes

  • private recursive function get_num_nodes(this) result(num_nodes)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(in), target :: this

    Return Value integer

procedure, public :: has_child

  • private function has_child(this, name)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(in), target :: this
    character(len=*), intent(in) :: name

    Return Value logical

procedure, public :: reset

  • private recursive subroutine reset(this)

    Arguments

    Type IntentOptional Attributes Name
    class(MeterNode), intent(inout), target :: this

Source Code

   type, extends(AbstractMeterNode) :: MeterNode
      private

      ! Node data
      class(AbstractMeter), allocatable :: meter
      character(:), allocatable :: name

      ! Tree structure
      integer :: depth
      type (MeterNodeVector) :: children
      integer :: last_child_accessed = 0

   contains
      procedure :: get_meter
      procedure :: get_name
      procedure :: get_depth
      procedure :: get_inclusive
      procedure :: get_exclusive
      procedure :: add_child
      procedure :: find_child
      procedure :: get_child
      procedure :: has_child
      procedure :: get_num_nodes
      procedure :: get_num_children

      procedure :: accumulate
      procedure :: reset

      procedure :: begin
      procedure :: end
   end type MeterNode