与えたシード列またはシステム時刻から逐次 PCG64 乱数列を初期化する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i32), | intent(in), | optional | :: | seed(:) |
subroutine seed_rng(seed) integer(i32), intent(in), optional :: seed(:) integer(i64) :: clk if (present(seed)) then call seed_random_stream(seed) else call system_clock(count=clk) call seed_random_stream([int(iand(clk, 2147483647_i64), i32), int(iand(ishft(clk, -31), 2147483647_i64), i32)]) end if end subroutine seed_rng