We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Many operations can be sped up by considering batch evaluation of f/g/dg, i.e.,
f/g/dg
A*x[i] B*u[i] -> A*X B*U
See LTI implementation here
Maybe an option that calls dynamics with the full particle vector would make this possible.
Vector{SVector}
X/U
reinterpret
x[i] = f(xp[j[i]], u, t, noise)
copyto!
Such reinterpreted arrays can be modified inplace
julia> a = [SVector(1.0, 2.0) for _ in 1:3] 3-element Array{SArray{Tuple{2},Float64,1,2},1}: [1.0, 2.0] [1.0, 2.0] [1.0, 2.0] julia> b = reinterpret(Float64, a) 6-element reinterpret(Float64, ::Array{SArray{Tuple{2},Float64,1,2},1}): 1.0 2.0 1.0 2.0 1.0 2.0 julia> b . = 3 6-element reinterpret(Float64, ::Array{SArray{Tuple{2},Float64,1,2},1}): 4.0 5.0 4.0 5.0 4.0 5.0
The text was updated successfully, but these errors were encountered:
KernelAbstractions.jl can automatically take a function $f$ written to operate on a single particle and rewrite it to operate on all particles at the same time, on CPU or GPU. This can yield a pretty nice speedup. Some details and examples https://github.com/JuliaComputing/JuliaSimCompiler.jl/issues/128#issuecomment-1952076080
One downside is that KernelAbstractions is still somewhat experimental, and error messages can be hard to understand and debug.
Sorry, something went wrong.
No branches or pull requests
Many operations can be sped up by considering batch evaluation of
f/g/dg
, i.e.,See LTI implementation here
Maybe an option that calls dynamics with the full particle vector would make this possible.
Vector{SVector}
has the same layout asX/U
above, justreinterpret
.x[i] = f(xp[j[i]], u, t, noise)
. Maybe by customcopyto!
.Such reinterpreted arrays can be modified inplace
The text was updated successfully, but these errors were encountered: