Working version. Comparison with one field seem ok.

This commit is contained in:
Alberto Ramos 2021-10-15 15:52:21 +02:00
parent 30baeade9f
commit f0ca0bbde1
6 changed files with 85 additions and 72 deletions

View file

@ -11,10 +11,12 @@
function scalar_action(U, Phi, lp::SpaceParm, sp::ScalarParm, ymws::YMworkspace{T}) where {T <: AbstractFloat}
CUDA.@sync begin
CUDA.@cuda threads=lp.bsz blocks=lp.rsz krnl_act!(ymws.rm, U, Phi, sp, lp)
@timeit "Scalar action" begin
CUDA.@sync begin
CUDA.@cuda threads=lp.bsz blocks=lp.rsz krnl_act!(ymws.rm, U, Phi, sp, lp)
end
end
S = CUDA.reduce(+, ymws.rm)
return S
end