Provides random number generation procedures, mostly calling routine from Intel MKL VSL.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=ip), | private, | save | :: | seed | |||
| type(VSL_STREAM_STATE), | private, | save | :: | stream | 
Returns a random number from a uniform distribution.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in) | :: | lb | Lower bound | ||
| real(kind=rp), | intent(in) | :: | ub | Upper bound | 
Returns a random integer from a uniform distribution.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=ip), | intent(in) | :: | lb | |||
| integer(kind=ip), | intent(in) | :: | ub | 
Initializes a BRNG stream.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*) | :: | fn | Name of the file containing the RNG seed. | 
Deletes a BRNG stream.
Loads a BRNG stream from file fn.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | fn | 
Saves the RNG seed to file fn.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | fn | 
Saves a BRNG stream to file fn.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | fn | 
Returns a random vector from a uniform distribution.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in) | :: | lb | Lower bound | ||
| real(kind=rp), | intent(in) | :: | ub | Upper bound | ||
| real(kind=rp), | intent(out), | dimension(:) | :: | rv | ||
| integer(kind=ip), | intent(in), | optional | :: | block_size | 
Returns a random vector of integers from a uniform distribution.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=ip), | intent(in) | :: | lb | |||
| integer(kind=ip), | intent(in) | :: | ub | |||
| integer(kind=ip), | intent(out), | dimension(:) | :: | rv | ||
| integer(kind=ip), | intent(in), | optional | :: | block_size | 
Generates a random vector of integers from a gaussian distribution.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in) | :: | mean | |||
| real(kind=rp), | intent(in) | :: | std_dev | |||
| real(kind=rp), | intent(out), | dimension(:) | :: | rv | ||
| integer(kind=ip), | intent(in), | optional | :: | block_size | 
Generates a random vector from the surface of a unit sphere.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(out), | dimension(3) | :: | r(3) |