dpar.rep modified in randomize

parent ffebdccd
...@@ -324,22 +324,20 @@ end ...@@ -324,22 +324,20 @@ end
function pfrandomize!(f,lp::SpaceParm,dpar::DiracParam,t::Int64=0) #DiracParam to apply dirac operator later? function pfrandomize!(f,lp::SpaceParm,dpar::DiracParam{T,SU3fund},t::Int64=0) where {T}
if dpar.rep == SU3fund && lp.ndim == 4
@timeit "Randomize pseudofermion field" begin @timeit "Randomize pseudofermion field" begin
p = ntuple(i->CUDA.randn(Float64, lp.bsz, 3, lp.rsz,2),4) # complex generation not suported for Julia 1.5.4 p = ntuple(i->CUDA.randn(Float64, lp.bsz, 3, lp.rsz,2),4) # complex generation not suported for Julia 1.5.4
CUDA.@sync begin CUDA.@sync begin
CUDA.@cuda threads=lp.bsz blocks=lp.rsz krnl_assign_pf!(f,p,lp,t) CUDA.@cuda threads=lp.bsz blocks=lp.rsz krnl_assign_pf!(f,p,lp,t)
end end
end end
end
return nothing return nothing
end end
function krnl_assign_pf!(f::AbstractArray{T}, p ,lp::SpaceParm, t::Int64) where {T} #only valid for SU3fund for now. Check performance and maybe change it for the tuple gen in the krnl function krnl_assign_pf!(f::AbstractArray{T}, p ,lp::SpaceParm, t::Int64) where {T}
@inbounds begin @inbounds begin
b = Int64(CUDA.threadIdx().x) b = Int64(CUDA.threadIdx().x)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment