BraWl
Loading...
Searching...
No Matches
c_functions.f90
Go to the documentation of this file.
1
12
13 use iso_c_binding
14
15 implicit none
16
17 private
18
19 public :: genrand, f90_init_genrand
20
21 interface
22 ! Mersenne Twister PNRG
23 ! Needs to have seed set with f90_init_genrand()
24 pure function genrand() bind(C, name='genrand')
25 use, intrinsic :: iso_c_binding, only : c_double
26 real(c_double) :: genrand
27 end function genrand
28
29 ! Routine to set the seed for genrand
30 function f90_init_genrand(seedtime, my_rank) bind(C, name='f90_init_genrand')
31 use, intrinsic :: iso_c_binding, only : c_int
32 integer(C_int) :: f90_init_genrand
33 integer(C_int), value :: my_rank
34 integer(C_int), value :: seedtime
35 end function f90_init_genrand
36 end interface
37
38end module c_functions