Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gha3mi committed Dec 29, 2023
1 parent 38ef089 commit 13d9f95
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
23 changes: 12 additions & 11 deletions src/forbenchmark_coarray.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module forbenchmark_coarray
!! author: Seyed Ali Ghasemi

#if defined(USE_COARRAY)

Expand All @@ -12,17 +13,17 @@ module forbenchmark_coarray
public benchmark

!===============================================================================
!> author: Seyed Ali Ghasemi
type :: mark_co
!! author: Seyed Ali Ghasemi
type(timer) :: time
real(rk) :: flops
end type mark_co
!===============================================================================


!===============================================================================
!> author: Seyed Ali Ghasemi
type :: mark
!! author: Seyed Ali Ghasemi
character(:), allocatable :: method
character(:), allocatable :: description
real(rk) :: elapsed_time_min
Expand All @@ -37,8 +38,8 @@ module forbenchmark_coarray


!===============================================================================
!> author: Seyed Ali Ghasemi
type :: benchmark
!! author: Seyed Ali Ghasemi
type(mark_co), dimension(:), allocatable :: marks_co[:]
type(mark), dimension(:), allocatable :: marks
character(:), allocatable :: filename
Expand All @@ -58,8 +59,8 @@ module forbenchmark_coarray
contains

!===============================================================================
!> author: Seyed Ali Ghasemi
elemental impure subroutine init(this, nmarks, title, filename, nloops)
elemental impure subroutine init(this, nmarks, title, filename, nloops)
!! author: Seyed Ali Ghasemi
use, intrinsic :: iso_fortran_env, only: compiler_version, compiler_options

class(benchmark), intent(inout) :: this
Expand Down Expand Up @@ -156,8 +157,8 @@ end subroutine init


!===============================================================================
!> author: Seyed Ali Ghasemi
impure subroutine start_benchmark(this, imark, method, description, argi, argr)
!! author: Seyed Ali Ghasemi
use face

class(benchmark), intent(inout) :: this
Expand Down Expand Up @@ -209,8 +210,8 @@ end subroutine start_benchmark


!===============================================================================
!> author: Seyed Ali Ghasemi
impure subroutine stop_benchmark(this, imark, flops)
!! author: Seyed Ali Ghasemi
use face

interface
Expand Down Expand Up @@ -296,8 +297,8 @@ end subroutine stop_benchmark


!===============================================================================
!> author: Seyed Ali Ghasemi
impure subroutine write_benchmark(this, imark)
!! author: Seyed Ali Ghasemi
class(benchmark), intent(inout) :: this
integer, intent(in) :: imark
integer :: nunit
Expand Down Expand Up @@ -350,8 +351,8 @@ end subroutine write_benchmark


!===============================================================================
!> author: Seyed Ali Ghasemi
pure elemental subroutine finalize_mark(this)
!! author: Seyed Ali Ghasemi
class(mark), intent(inout) :: this

if (allocated(this%method)) deallocate(this%method)
Expand All @@ -361,8 +362,8 @@ end subroutine finalize_mark


!===============================================================================
!> author: Seyed Ali Ghasemi
elemental impure subroutine finalize(this)
!! author: Seyed Ali Ghasemi
class(benchmark), intent(inout) :: this
integer :: nunit
logical :: exist
Expand Down Expand Up @@ -400,8 +401,8 @@ end subroutine finalize


!===============================================================================
!> author: Seyed Ali Ghasemi
impure function current_date_and_time() result(datetime)
!! author: Seyed Ali Ghasemi
character(21) :: datetime
character(10) :: date
character(8) :: time
Expand Down
19 changes: 10 additions & 9 deletions src/forbenchmark_default.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module forbenchmark_default
!! author: Seyed Ali Ghasemi

use kinds
use fortime, only: timer
Expand All @@ -10,8 +11,8 @@ module forbenchmark_default
public benchmark

!===============================================================================
!> author: Seyed Ali Ghasemi
type :: mark
!! author: Seyed Ali Ghasemi
character(:), allocatable :: method
character(:), allocatable :: description
type(timer) :: time
Expand All @@ -24,8 +25,8 @@ module forbenchmark_default


!===============================================================================
!> author: Seyed Ali Ghasemi
type :: benchmark
!! author: Seyed Ali Ghasemi
type(mark), dimension(:), allocatable :: marks
character(:), allocatable :: filename
integer :: nloops
Expand All @@ -43,8 +44,8 @@ module forbenchmark_default
contains

!===============================================================================
!> author: Seyed Ali Ghasemi
elemental impure subroutine init(this, nmarks, title, filename, nloops)
!! author: Seyed Ali Ghasemi
use, intrinsic :: iso_fortran_env, only: compiler_version, compiler_options

class(benchmark), intent(inout) :: this
Expand Down Expand Up @@ -103,8 +104,8 @@ end subroutine init


!===============================================================================
!> author: Seyed Ali Ghasemi
impure subroutine start_benchmark(this, imark, method, description, argi, argr)
!! author: Seyed Ali Ghasemi
use face

class(benchmark), intent(inout) :: this
Expand Down Expand Up @@ -154,8 +155,8 @@ end subroutine start_benchmark


!===============================================================================
!> author: Seyed Ali Ghasemi
impure subroutine stop_benchmark(this, imark, flops)
!! author: Seyed Ali Ghasemi

interface
impure function Fun(argi, argr)
Expand Down Expand Up @@ -191,8 +192,8 @@ end subroutine stop_benchmark


!===============================================================================
!> author: Seyed Ali Ghasemi
impure subroutine write_benchmark(this, imark)
!! author: Seyed Ali Ghasemi
class(benchmark), intent(inout) :: this
integer, intent(in) :: imark
integer :: nunit
Expand Down Expand Up @@ -224,8 +225,8 @@ end subroutine write_benchmark


!===============================================================================
!> author: Seyed Ali Ghasemi
elemental pure subroutine finalize_mark(this)
!! author: Seyed Ali Ghasemi
class(mark), intent(inout) :: this

if (allocated(this%method)) deallocate(this%method)
Expand All @@ -235,8 +236,8 @@ end subroutine finalize_mark


!===============================================================================
!> author: Seyed Ali Ghasemi
elemental impure subroutine finalize(this)
!! author: Seyed Ali Ghasemi
class(benchmark), intent(inout) :: this
integer :: nunit
logical :: exist
Expand All @@ -262,8 +263,8 @@ end subroutine finalize


!===============================================================================
!> author: Seyed Ali Ghasemi
impure function current_date_and_time() result(datetime)
!! author: Seyed Ali Ghasemi
character(21) :: datetime
character(10) :: date
character(8) :: time
Expand Down

0 comments on commit 13d9f95

Please sign in to comment.