flop_recorder_type Derived Type

type, public :: flop_recorder_type

the flop recorder type simply contains a flop count this should be the largest possible integer in the planet currently this will overflow for zetta flops


Inherited by

type~~flop_recorder_type~~InheritedByGraph type~flop_recorder_type flop_recorder_type type~flop_rate_type flop_rate_type type~flop_rate_type->type~flop_recorder_type m_flops

Components

Type Visibility Attributes Name Initial
integer(kind=int64), private :: flop_count = 0_int64

Type-Bound Procedures

procedure, public :: add => add_flops

  • private subroutine add_flops(self, flops)

    Add an int64 variable which contains the FLOPs we use int64 since we might reach very large FLOP counts

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(flop_recorder_type), intent(inout) :: self
    integer(kind=int64), intent(in) :: flops

procedure, public :: get => get_flops

  • private function get_flops(self) result(flops)

    Get the int64 number of FLOPs we currently have in the counter

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(flop_recorder_type), intent(in) :: self

    Return Value integer(kind=int64)

procedure, public :: reset => reset_flop_counter

Source Code

   type :: flop_recorder_type
    !! the flop recorder type simply contains a flop count
    !! this should be the largest possible integer in the planet
    !! currently this will overflow for zetta flops

      private
      integer(int64) :: flop_count = 0_int64

   contains

      procedure :: add => add_flops
      procedure :: get => get_flops
      procedure :: reset => reset_flop_counter

   end type flop_recorder_type