|
58 | 58 | # calculate the next jump / jump time |
59 | 59 | function generate_jumps!(p::DirectJumpAggregation, integrator, u, params, t) |
60 | 60 | p.sum_rate, ttnj = time_to_next_jump(p, u, params, t) |
61 | | - @fastmath p.next_jump_time = t + ttnj |
| 61 | + p.next_jump_time = t + ttnj |
62 | 62 | @inbounds p.next_jump = searchsortedfirst(p.cur_rates, rand(p.rng) * p.sum_rate) |
63 | 63 | nothing |
64 | 64 | end |
65 | 65 |
|
66 | 66 | ######################## SSA specific helper routines ######################## |
67 | 67 |
|
68 | 68 | # tuple-based constant jumps |
69 | | -@fastmath function time_to_next_jump(p::DirectJumpAggregation{T, S, F1, F2, RNG}, u, params, |
70 | | - t) where {T, S, F1 <: Tuple, F2 <: Tuple, RNG} |
| 69 | +function time_to_next_jump(p::DirectJumpAggregation{T, S, F1, F2, RNG}, u, params, |
| 70 | + t) where {T, S, F1 <: Tuple, F2 <: Tuple, RNG} |
71 | 71 | prev_rate = zero(t) |
72 | 72 | new_rate = zero(t) |
73 | 73 | cur_rates = p.cur_rates |
|
108 | 108 | end |
109 | 109 |
|
110 | 110 | # function wrapper-based constant jumps |
111 | | -@fastmath function time_to_next_jump(p::DirectJumpAggregation{T, S, F1, F2, RNG}, u, params, |
112 | | - t) where {T, S, F1 <: AbstractArray, |
113 | | - F2 <: AbstractArray, RNG} |
| 111 | +function time_to_next_jump(p::DirectJumpAggregation{T, S, F1, F2, RNG}, u, params, |
| 112 | + t) where {T, S, F1 <: AbstractArray, F2 <: AbstractArray, RNG} |
114 | 113 | prev_rate = zero(t) |
115 | 114 | new_rate = zero(t) |
116 | 115 | cur_rates = p.cur_rates |
|
0 commit comments