Generate an array of uniformally-distributed random deviates
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=Float64), | intent(out), | dimension(:) | :: | randomu | Array of uniform random deviates |
subroutine randu(randomu)
!+ Generate an array of uniformally-distributed random deviates
real(Float64), dimension(:), intent(out) :: randomu
!+ Array of uniform random deviates
integer :: i, thread_id
#ifdef _OMP
thread_id = OMP_get_thread_num() + 1
#else
thread_id = 1
#endif
randomu = 0.d0
do i=1,size(randomu)
randomu(i) = rng_uniform(rng(thread_id))
enddo
end subroutine randu