fills an array with random numbers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | idist |
type of distribution (1..3, see lapack docs) |
||
integer, | intent(inout), | DIMENSION(:) | :: | iseed |
requires each int to be in the range 0..2**12, and the iseed(4) odd |
|
integer, | intent(in) | :: | n | |||
type(dbcsr_data_obj), | intent(inout) | :: | x |
SUBROUTINE dbcsr_lapack_larnv(idist, iseed, n, x)
!! fills an array with random numbers
INTEGER, INTENT(IN) :: idist
!! type of distribution (1..3, see lapack docs)
INTEGER, DIMENSION(:), INTENT(INOUT) :: iseed
!! requires each int to be in the range 0..2**12, and the iseed(4) odd
INTEGER, INTENT(IN) :: n
TYPE(dbcsr_data_obj), INTENT(INOUT) :: x
SELECT CASE (x%d%data_type)
CASE (dbcsr_type_real_4)
CALL slarnv(idist, iseed, n, x%d%r_sp)
CASE (dbcsr_type_real_8)
CALL dlarnv(idist, iseed, n, x%d%r_dp)
CASE (dbcsr_type_complex_4)
CALL clarnv(idist, iseed, n, x%d%c_sp)
CASE (dbcsr_type_complex_8)
CALL zlarnv(idist, iseed, n, x%d%c_dp)
CASE default
DBCSR_ABORT("Invalid data type")
END SELECT
END SUBROUTINE dbcsr_lapack_larnv