Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excise staticarrays for staticarrayscore #144

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
ResettableStacks = "ae5879a3-cd67-5da8-be7f-38c6eb64a37b"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[weakdeps]
Expand All @@ -43,7 +43,7 @@ RecursiveArrayTools = "2"
ResettableStacks = "0.6, 1.0"
Requires = "1"
SciMLBase = "1"
StaticArrays = "0.10, 0.11, 0.12, 1.0"
StaticArraysCore = "1.4"
julia = "1.6"

[extras]
Expand Down
2 changes: 1 addition & 1 deletion src/DiffEqNoiseProcess.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module DiffEqNoiseProcess

using ResettableStacks, DiffEqBase, RecipesBase
using RecursiveArrayTools, StaticArrays, Random, Statistics
using RecursiveArrayTools, StaticArraysCore, Random, Statistics
using LinearAlgebra

import RandomNumbers: Xorshifts
Expand Down
4 changes: 2 additions & 2 deletions src/wiener.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const one_over_sqrt2 = 1 / sqrt(2)
@inline function wiener_randn(rng::AbstractRNG, proto::Array{T}) where {T}
randn(rng, size(proto))
end
@inline function wiener_randn(rng::AbstractRNG, proto::T) where {T <: SArray}
@inline function wiener_randn(rng::AbstractRNG, proto::T) where {T <: StaticArraysCore.SArray}
randn(rng, T)
end
@inline function wiener_randn(rng::AbstractRNG, proto)
Expand Down Expand Up @@ -32,7 +32,7 @@ end
end

@inline function WHITE_NOISE_DIST(dW, W, dt, u, p, t, rng)
if typeof(dW) <: AbstractArray && !(typeof(dW) <: SArray)
if typeof(dW) <: AbstractArray && !(typeof(dW) <: StaticArraysCore.SArray)
return @fastmath sqrt(abs(dt)) * wiener_randn(rng, dW)
else
return @fastmath sqrt(abs(dt)) * wiener_randn(rng, typeof(dW))
Expand Down