Skip to content

Commit

Permalink
Update benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
vavrines committed Jun 9, 2023
1 parent ac5ece1 commit f36b419
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
24 changes: 24 additions & 0 deletions benchmark/cpu-vs-gpu.jl
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
using KitBase, CUDA

u = collect(-5.0:0.0001:5.0)
primL = [1.0, 0.0, 0.5]
primR = [0.125, 0.0, 0.625]
dt = 1.0

fL = maxwellian(u, primL)
fR = maxwellian(u, primR)
ff = similar(fL)
sfL = zero(fL)
sfR = zero(fR)

@time flux_kfvs!(ff, fL, fR, u, dt, sfL, sfR)
```0.001932 seconds (6 allocations: 2.289 MiB)```

u = collect(-5.0:0.0001:5.0) |> CuArray
fL = maxwellian(u, primL)
fR = maxwellian(u, primR)
ff = similar(fL)
sfL = zero(fL)
sfR = zero(fR)

@time flux_kfvs!(ff, fL, fR, u, dt, sfL, sfR)
```0.000219 seconds (203 allocations: 15.125 KiB)```
1 change: 0 additions & 1 deletion benchmark/parallel_thread.jl

This file was deleted.

0 comments on commit f36b419

Please sign in to comment.