stopwatch Derived Type

type, public :: stopwatch


Contents

Source Code


Components

TypeVisibility AttributesNameInitial
integer, private :: icontxt
real(kind=psb_dpk_), private :: partial
real(kind=psb_dpk_), private :: split
real(kind=psb_dpk_), private :: total

Type-Bound Procedures

procedure, public :: partial_

  • interface

    private module function partial_(sw)

    Arguments

    Type IntentOptional AttributesName
    class(stopwatch), intent(in) :: sw

    Return Value real(kind=psb_dpk_)

generic, public :: reset => reset_stopwatch

generic, public :: synchro => synchro_stopwatch

generic, public :: tic => tic_stopwatch

generic, public :: toc => toc_stopwatch

procedure, public :: total_

  • interface

    private module function total_(sw)

    Arguments

    Type IntentOptional AttributesName
    class(stopwatch), intent(in) :: sw

    Return Value real(kind=psb_dpk_)

procedure, private :: reset_stopwatch

  • interface

    private module subroutine reset_stopwatch(sw)

    Arguments

    Type IntentOptional AttributesName
    class(stopwatch), intent(inout) :: sw

procedure, private :: synchro_stopwatch

  • interface

    private module subroutine synchro_stopwatch(sw)

    Arguments

    Type IntentOptional AttributesName
    class(stopwatch), intent(inout) :: sw

procedure, private :: tic_stopwatch

  • interface

    private module subroutine tic_stopwatch(sw)

    Arguments

    Type IntentOptional AttributesName
    class(stopwatch), intent(inout) :: sw

procedure, private :: toc_stopwatch

  • interface

    private module subroutine toc_stopwatch(sw)

    Arguments

    Type IntentOptional AttributesName
    class(stopwatch), intent(inout) :: sw

Source Code

    TYPE stopwatch
        PRIVATE
        INTEGER :: icontxt
        REAL(psb_dpk_) :: total
        REAL(psb_dpk_) :: split
        REAL(psb_dpk_) :: partial
    CONTAINS
        PROCEDURE :: partial_, total_   ! Getters
        PROCEDURE, PRIVATE :: synchro_stopwatch, tic_stopwatch, toc_stopwatch  !Setters
        GENERIC, PUBLIC :: synchro => synchro_stopwatch
        GENERIC, PUBLIC :: tic => tic_stopwatch
        GENERIC, PUBLIC :: toc => toc_stopwatch
        PROCEDURE, PRIVATE :: reset_stopwatch
        GENERIC, PUBLIC:: reset => reset_stopwatch
    END TYPE stopwatch