pf_random_fill_exp Interface

public interface pf_random_fill_exp

Fills v with consecutive Exp(1) draws of one stream, starting at draw (default 1).

v is a rank-1 real(real64) array, intent(out); i is integer(int32) or integer(int64); seed and draw are integer(int64). Element k is exactly pf_random_exp_at(seed, i, draw+k-1) -- to within the libm caveat that entry describes, and exactly as far as chunking is concerned: a prefix is a prefix and a fill split at any boundary agrees with a whole one, on every compiler. A zero-sized v is a defined no-op.

Precondition on the draw axis: draw + size(v) - 1 must not exceed huge(int64) -- the same bound, for the same reason, as pf_random_fill_draws.

No threads=, deliberately. Every element is a pure function of its coordinates, so the caller wraps their own !$omp parallel do around any chunking they like and gets the same answer at any thread count. An internal thread count would be less flexible and no faster.


Module Procedures

private pure subroutine pf_random_fill_exp_i32(seed, i, v, draw)

pf_random_fill_exp from an integer(int32) stream index.

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: seed

the stream family's seed

integer(kind=int32), intent(in) :: i

stream index; sign-extends, so any value is valid

real(kind=real64), intent(out) :: v(:)

filled with values draw .. draw+size(v)-1

integer(kind=int64), intent(in), optional :: draw

1-based starting value index; absent means 1

private pure subroutine pf_random_fill_exp_i64(seed, i, v, draw)

pf_random_fill_exp from an integer(int64) stream index.

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: seed

the stream family's seed

integer(kind=int64), intent(in) :: i

stream index; every value is valid

real(kind=real64), intent(out) :: v(:)

filled with values draw .. draw+size(v)-1

integer(kind=int64), intent(in), optional :: draw

1-based starting value index; absent means 1