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

Public Member Functions

subroutine dcclockstop0 (clk, err)
 

Detailed Description

Definition at line 175 of file dc_clock.f90.

Member Function/Subroutine Documentation

◆ dcclockstop0()

subroutine dc_clock::stop::dcclockstop0 ( type(clock), intent(inout)  clk,
logical, intent(out), optional  err 
)

計測の一時停止

このサブルーチンを呼んだ時点で計測を一時停止します。

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

Parameters
[in,out]clkCLOCK 型変数
[out]errエラーフラグ (省略可)。エラー時に .true.。

Definition at line 351 of file dc_clock.f90.

352 use dc_message, only: messagenotify
353 use dc_string, only: tochar
355 use dc_date, only: evalsec, operator(+), operator(-)
356 use dc_date_types, only: dc_difftime
357 use dc_types, only: dp
358 !$ use omp_lib
359 implicit none
360 type(CLOCK), intent(inout):: clk
361 logical, intent(out), optional:: err
362 character(STRING):: cause_c
363 real(DP):: stop_time
364 integer:: stat
365 character(*), parameter:: subname = 'DCClockStop'
366 continue
367 call beginsub(subname)
368 stat = dc_noerr
369 cause_c = 'CLOCK'
370 if (.not. clk % initialized) then
371 call messagenotify('W', subname, 'Call Create before Stop in dc_clock.')
372 call dbgmessage('Ignored because input argument was not initialized.')
373 stat = dc_enotinit
374 goto 999
375 elseif (clk % start_time < 0.0_dp) then
376 call messagenotify('W', subname, 'Call Start before Stop in dc_clock.')
377 call dbgmessage('Ignored because input argument was not started.')
378 goto 999
379 end if
380 call cpu_time(stop_time)
381 !$ stop_time = omp_get_wtime()
382 clk % elapsed_time = clk % elapsed_time + stop_time - clk % start_time
383 clk % start_time = - 1.0
384 call dbgmessage('name=%c, cpu_time=%f, elapsed_time=%f', &
385 & c1=trim(clk % name), d=(/stop_time, clk % elapsed_time/))
386999 continue
387 call storeerror(stat, subname, err, cause_c)
388 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

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