@@ -4,6 +4,7 @@ module DSFMT
44
55import Base: copy, copy!, == , hash
66using Base. GMP. MPZ
7+ using dSFMT_jll
78
89export DSFMT_state, dsfmt_get_min_array_size, dsfmt_get_idstring,
910 dsfmt_init_gen_rand, dsfmt_init_by_array, dsfmt_gv_init_by_array,
@@ -44,36 +45,36 @@ hash(s::DSFMT_state, h::UInt) = hash(s.val, h)
4445# # wrapper functions
4546
4647function dsfmt_get_idstring ()
47- idstring = ccall ((:dsfmt_get_idstring ,: libdSFMT ),
48+ idstring = ccall ((:dsfmt_get_idstring ,libdSFMT),
4849 Ptr{UInt8},
4950 ())
5051 return unsafe_string (idstring)
5152end
5253
5354function dsfmt_get_min_array_size ()
54- min_array_size = ccall ((:dsfmt_get_min_array_size ,: libdSFMT ),
55+ min_array_size = ccall ((:dsfmt_get_min_array_size ,libdSFMT),
5556 Int32,
5657 ())
5758end
5859
5960const dsfmt_min_array_size = dsfmt_get_min_array_size ()
6061
6162function dsfmt_init_gen_rand (s:: DSFMT_state , seed:: UInt32 )
62- ccall ((:dsfmt_init_gen_rand ,: libdSFMT ),
63+ ccall ((:dsfmt_init_gen_rand ,libdSFMT),
6364 Cvoid,
6465 (Ptr{Cvoid}, UInt32,),
6566 s. val, seed)
6667end
6768
6869function dsfmt_init_by_array (s:: DSFMT_state , seed:: Vector{UInt32} )
69- ccall ((:dsfmt_init_by_array ,: libdSFMT ),
70+ ccall ((:dsfmt_init_by_array ,libdSFMT),
7071 Cvoid,
7172 (Ptr{Cvoid}, Ptr{UInt32}, Int32),
7273 s. val, seed, length (seed))
7374end
7475
7576function dsfmt_gv_init_by_array (seed:: Vector{UInt32} )
76- ccall ((:dsfmt_gv_init_by_array ,: libdSFMT ),
77+ ccall ((:dsfmt_gv_init_by_array ,libdSFMT),
7778 Cvoid,
7879 (Ptr{UInt32}, Int32),
7980 seed, length (seed))
8283function dsfmt_fill_array_close1_open2! (s:: DSFMT_state , A:: Ptr{Float64} , n:: Int )
8384 @assert Csize_t (A) % 16 == 0 # the underlying C array must be 16-byte aligned
8485 @assert dsfmt_min_array_size <= n && iseven (n)
85- ccall ((:dsfmt_fill_array_close1_open2 ,: libdSFMT ),
86+ ccall ((:dsfmt_fill_array_close1_open2 ,libdSFMT),
8687 Cvoid,
8788 (Ptr{Cvoid}, Ptr{Float64}, Int),
8889 s. val, A, n)
9192function dsfmt_fill_array_close_open! (s:: DSFMT_state , A:: Ptr{Float64} , n:: Int )
9293 @assert Csize_t (A) % 16 == 0 # the underlying C array must be 16-byte aligned
9394 @assert dsfmt_min_array_size <= n && iseven (n)
94- ccall ((:dsfmt_fill_array_close_open ,: libdSFMT ),
95+ ccall ((:dsfmt_fill_array_close_open ,libdSFMT),
9596 Cvoid,
9697 (Ptr{Cvoid}, Ptr{Float64}, Int),
9798 s. val, A, n)
0 commit comments