Skip to content

Commit

Permalink
try VectorizedRNG.jl
Browse files Browse the repository at this point in the history
It just seems to segfault though?
  • Loading branch information
ChrisRackauckas committed May 18, 2020
1 parent 22bd1a9 commit 03f8294
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SparseDiffTools = "47a9eef4-7e08-11e9-0b38-333d64bd3804"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
VectorizedRNG = "33b4df10-0173-11e9-2a0c-851a7edac40e"

[compat]
ArrayInterface = "2.4"
Expand Down
2 changes: 2 additions & 0 deletions src/StochasticDiffEq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ module StochasticDiffEq

import RecursiveArrayTools: chain

import VectorizedRNG

using Logging, SparseArrays

using LinearAlgebra, Random, FillArrays
Expand Down
6 changes: 4 additions & 2 deletions src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,17 @@ function DiffEqBase.__init(
if typeof(prob) <: DiffEqBase.AbstractRODEProblem && prob.noise === nothing
rswm = isadaptive(alg) ? RSWM(adaptivealg=:RSwM3) : RSWM(adaptivealg=:RSwM1)
if isinplace(prob)
_rng = typeof(prob.u0) <: Array{Float64} ? VectorizedRNG.local_rng(_seed) :
Xorshifts.Xoroshiro128Plus(_seed)
#if isadaptive(alg) || callback !== nothing
if alg_needs_extra_process(alg)
W = WienerProcess!(t,rand_prototype,rand_prototype,
save_everystep=save_noise,
rng = Xorshifts.Xoroshiro128Plus(_seed))
rng = _rng)
else
W = WienerProcess!(t,rand_prototype,
save_everystep=save_noise,
rng = Xorshifts.Xoroshiro128Plus(_seed))
rng = _rng)
end
#=
else
Expand Down

0 comments on commit 03f8294

Please sign in to comment.