mirror of
https://igit.ific.uv.es/alramos/latticegpu.jl.git
synced 2025-08-23 07:54:41 +02:00
Option to store cpu src field in propagator func.
This commit is contained in:
parent
fdb262bdec
commit
d2adc5c8c5
1 changed files with 5 additions and 1 deletions
|
@ -43,7 +43,7 @@ function propagator!(pro, U, dpar::DiracParam{T}, dws::DiracWorkspace, lp::Space
|
|||
return niter
|
||||
end
|
||||
|
||||
function propagator!(pro, U, dpar::DiracParam{T}, dws::DiracWorkspace, lp::SpaceParm, maxiter::Int64, tol::Float64, time::Int64) where {T}
|
||||
function propagator!(pro, U, dpar::DiracParam{T}, dws::DiracWorkspace, lp::SpaceParm, maxiter::Int64, tol::Float64, time::Int64, psi0 = nothing) where {T}
|
||||
|
||||
function krnlg5!(src)
|
||||
b=Int64(CUDA.threadIdx().x)
|
||||
|
@ -57,6 +57,10 @@ function propagator!(pro, U, dpar::DiracParam{T}, dws::DiracWorkspace, lp::Space
|
|||
|
||||
pfrandomize!(dws.sp,lp,time)
|
||||
|
||||
if !isnothing(psi0)
|
||||
psi0 .= Array(dws.sp)
|
||||
end
|
||||
|
||||
CUDA.@sync begin
|
||||
CUDA.@cuda threads=lp.bsz blocks=lp.rsz krnlg5!(dws.sp)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue