AdvancedMeter Derived Type

type, public, extends(AbstractMeter) :: AdvancedMeter


Inherits

type~~advancedmeter~~InheritsGraph type~advancedmeter AdvancedMeter type~abstractgauge AbstractGauge type~advancedmeter->type~abstractgauge gauge type~abstractmeter AbstractMeter type~advancedmeter->type~abstractmeter

Inherited by

type~~advancedmeter~~InheritedByGraph type~advancedmeter AdvancedMeter type~distributedmeter DistributedMeter type~distributedmeter->type~advancedmeter

Constructor

public interface AdvancedMeter

  • private function new_AdvancedMeter(gauge) result(meter)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractGauge), intent(in) :: gauge

    Return Value type(AdvancedMeter)


Type-Bound Procedures

procedure, public :: accumulate

  • private subroutine accumulate(this, lap)

    Arguments

    Type IntentOptional Attributes Name
    class(AdvancedMeter), intent(inout) :: this
    class(AbstractMeter), intent(in) :: lap

procedure, public :: add_cycle

  • private subroutine add_cycle(this, increment)

    Arguments

    Type IntentOptional Attributes Name
    class(AdvancedMeter), intent(inout) :: this
    real(kind=REAL64), intent(in) :: increment

procedure, public :: finalize

  • private subroutine finalize(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractMeter), intent(in) :: this
    integer, intent(out), optional :: rc

procedure, public :: get_max_cycle

  • private function get_max_cycle(this) result(max_cycle)

    Arguments

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

    Return Value real(kind=REAL64)

procedure, public :: get_mean_cycle

  • private function get_mean_cycle(this) result(mean_cycle)

    Arguments

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

    Return Value real(kind=REAL64)

procedure, public :: get_min_cycle

  • private function get_min_cycle(this) result(min_cycle)

    Arguments

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

    Return Value real(kind=REAL64)

procedure, public :: get_num_cycles

  • private function get_num_cycles(this) result(num_cycles)

    Arguments

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

    Return Value integer

procedure, public :: get_overhead

  • private function get_overhead(this) result(overhead)

    Arguments

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

    Return Value real(kind=REAL64)

procedure, public :: get_relative_deviation

  • private function get_relative_deviation(this) result(relative_deviation)

    Arguments

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

    Return Value real(kind=REAL64)

procedure, public :: get_standard_deviation

  • private function get_standard_deviation(this) result(standard_deviation)

    Arguments

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

    Return Value real(kind=REAL64)

procedure, public :: get_status

  • private function get_status(this) result(status)

    Arguments

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

    Return Value integer

procedure, public :: get_sum_square_deviation

  • private function get_sum_square_deviation(this) result(sum_square_deviation)

    Arguments

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

    Return Value real(kind=REAL64)

procedure, public :: get_total

  • private function get_total(this) result(val)

    Arguments

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

    Return Value real(kind=REAL64)

procedure, public :: is_active

  • private function is_active(this)

    Arguments

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

    Return Value logical

procedure, public :: reset

  • private subroutine reset(this)

    Arguments

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

procedure, public :: start

  • private subroutine start(this)

    Arguments

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

procedure, public :: stop

  • private subroutine stop(this)

    Arguments

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

Source Code

   type, extends(AbstractMeter) :: AdvancedMeter
      private

      class(AbstractGauge), allocatable :: gauge
      real(kind=REAL64) :: start_value

      real(kind=REAL64) :: total = 0
      logical :: active = .false.
      integer :: status = MAPL_METER_IS_VALID

      real(kind=REAL64) :: min_cycle = huge(1._REAL64)
      real(kind=REAL64) :: max_cycle = 0.
      real(kind=REAL64) :: sum_square_deviation = 0.

      integer :: num_cycles = 0

   contains

      procedure :: start
      procedure :: stop
      
      procedure :: reset
      procedure :: is_active
      procedure :: get_status
      procedure :: get_overhead

      procedure :: get_total

      procedure :: get_min_cycle
      procedure :: get_max_cycle
      procedure :: get_mean_cycle
      procedure :: get_sum_square_deviation
      procedure :: get_standard_deviation
      procedure :: get_relative_deviation
      procedure :: get_num_cycles

      procedure :: add_cycle
      procedure :: accumulate


   end type AdvancedMeter