Skip to content

Commit

Permalink
remove support for unsuported julia versions
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith committed Jun 13, 2024
1 parent 686259b commit 14a0946
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
13 changes: 2 additions & 11 deletions src/JumpProcesses.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,8 @@ abstract type AbstractSSAIntegrator{Alg, IIP, U, T} <:
DiffEqBase.DEIntegrator{Alg, IIP, U, T} end

import Base.Threads
@static if VERSION < v"1.3"
seed_multiplier() = Threads.threadid()
else
seed_multiplier() = 1
end

@static if VERSION >= v"1.7.0"
const DEFAULT_RNG = Random.default_rng()
else
const DEFAULT_RNG = Xorshifts.Xoroshiro128Star(rand(UInt64))
end

const DEFAULT_RNG = Random.default_rng()

include("jumps.jl")
include("massaction_rates.jl")
Expand Down
2 changes: 1 addition & 1 deletion src/SSA_stepper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function DiffEqBase.__init(jump_prob::JumpProblem,
else
cb = deepcopy(jump_prob.jump_callback.discrete_callbacks[end])
if seed === nothing
Random.seed!(cb.condition.rng, seed_multiplier() * rand(UInt64))
Random.seed!(cb.condition.rng, rand(UInt64))
else
Random.seed!(cb.condition.rng, seed)
end
Expand Down
2 changes: 1 addition & 1 deletion src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function resetted_jump_problem(_jump_prob, seed)
if !isempty(jump_prob.jump_callback.discrete_callbacks)
if seed === nothing
Random.seed!(jump_prob.jump_callback.discrete_callbacks[1].condition.rng,
seed_multiplier() * rand(UInt64))
rand(UInt64))
else
Random.seed!(jump_prob.jump_callback.discrete_callbacks[1].condition.rng, seed)
end
Expand Down

0 comments on commit 14a0946

Please sign in to comment.