gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dc_clock::dcclockget Interface Reference

Public Member Functions

subroutine dcclockgetr (clk, sec, err)
 
subroutine dcclockgetd (clk, sec, err)
 

Detailed Description

Definition at line 138 of file dc_clock.f90.

Member Function/Subroutine Documentation

◆ dcclockgetd()

subroutine dc_clock::dcclockget::dcclockgetd ( type(clock), intent(in)  clk,
real(dp), intent(out)  sec,
logical, intent(out), optional  err 
)

CPU 時間 (単位: 秒) の取得 (倍精度)

CPU 時間 (単位: 秒) を sec に取得します。

clk に対して DCClockCreate による初期化が行われていない場合、 エラーを発生させます。err を与える場合には err に .true. が返り、 プログラムは続行されます。

Parameters
[in]clkCLOCK 型変数
[out]secCPU 時間 (秒、倍精度)
[out]errエラーフラグ (省略可)。エラー時に .true.。

Definition at line 471 of file dc_clock.f90.

472 use dc_types, only: dp
473 use dc_string, only: cprintf
474 use dc_message, only: messagenotify
475 use dc_date, only: evalsec
477 implicit none
478 type(CLOCK), intent(in):: clk
479 real(DP), intent(out):: sec
480 logical, intent(out), optional:: err
481 character(STRING):: cause_c
482 integer:: stat
483 character(*), parameter:: subname = 'DCClockGetD'
484 continue
485 call beginsub(subname)
486 stat = dc_noerr
487 cause_c = 'CLOCK'
488 if (.not. clk % initialized) then
489 call messagenotify('W', subname, 'Call Create before Get in dc_clock.')
490 call dbgmessage('Ignored because input argument was not initialized.')
491 stat = dc_enotinit
492 goto 999
493 end if
494 sec = clk % elapsed_time
495 call dbgmessage('name=%c, return sec=<%f>', &
496 & c1=trim(clk % name), d=(/sec/))
497999 continue
498 call storeerror(stat, subname, err, cause_c)
499 call endsub(subname)
日付および時刻に関する手続きを提供するモジュール
Definition dc_date.f90:57
エラー処理用モジュール
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
integer, parameter, public dc_noerr
エラー等を保持
Definition dc_error.f90:468
integer, parameter, public dc_enotinit
-400 以下: dc ユーティリティのエラー
Definition dc_error.f90:534
メッセージの出力
文字型変数の操作
Definition dc_string.f90:83
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public dp
倍精度実数型変数
Definition dc_types.f90:92

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_enotinit, dc_error::dc_noerr, dc_types::dp, dc_trace::endsub(), and dc_error::storeerror().

Here is the call graph for this function:

◆ dcclockgetr()

subroutine dc_clock::dcclockget::dcclockgetr ( type(clock), intent(in)  clk,
real, intent(out)  sec,
logical, intent(out), optional  err 
)

CPU 時間 (単位: 秒) の取得 (単精度)

CPU 時間 (単位: 秒) を sec に取得します。

clk に対して DCClockCreate による初期化が行われていない場合、 エラーを発生させます。err を与える場合には err に .true. が返り、 プログラムは続行されます。

Parameters
[in]clkCLOCK 型変数
[out]secCPU 時間 (秒、単精度)
[out]errエラーフラグ (省略可)。エラー時に .true.。

Definition at line 416 of file dc_clock.f90.

417 use dc_message, only: messagenotify
418 use dc_date, only: evalsec
419 use dc_string, only: cprintft
421 implicit none
422 type(CLOCK), intent(in):: clk
423 real, intent(out):: sec
424 logical, intent(out), optional:: err
425 character(STRING):: cause_c
426 integer:: stat
427 character(*), parameter:: subname = 'DCClockGetR'
428 continue
429 call beginsub(subname)
430 stat = dc_noerr
431 cause_c = 'CLOCK'
432 if (.not. clk % initialized) then
433 call messagenotify('W', subname, 'Call Create before Get in dc_clock.')
434 call dbgmessage('Ignored because input argument was not initialized.')
435 stat = dc_enotinit
436 goto 999
437 end if
438 sec = real(clk % elapsed_time, kind=kind(sec))
439 call dbgmessage('name=%c, return sec=<%r>', &
440 & c1=trim(clk % name), r=(/sec/))
441999 continue
442 call storeerror(stat, subname, err, cause_c)
443 call endsub(subname)

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_enotinit, dc_error::dc_noerr, dc_trace::endsub(), and dc_error::storeerror().

Here is the call graph for this function:

The documentation for this interface was generated from the following file: