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

Particle filter example #53

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

FredericWantiez
Copy link
Member

Small example of a particle filter using the new API. Since Metal.jl doesn't really support rand() / Distributions, it's hard to make this more complex.

Discussed here #43

Comment on lines +16 to +17

function rejection_resampling(rng::AbstractRNG, weights::AbstractArray{T}, n::Int=length(weights)) where {T<:Real}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
function rejection_resampling(rng::AbstractRNG, weights::AbstractArray{T}, n::Int=length(weights)) where {T<:Real}
function rejection_resampling(
rng::AbstractRNG, weights::AbstractArray{T}, n::Int=length(weights)
) where {T<:Real}

return a
end


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

end
end


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

@yebai
Copy link
Member

yebai commented Aug 29, 2024

@FredericWantiez does the vectorisation help?

@FredericWantiez
Copy link
Member Author

Haven't done a proper benchmark but it seems like its helping a bit, but not much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants