Wrap threadIdx, etc in an inline function

This commit is contained in:
Alberto Ramos 2022-01-05 20:04:55 +01:00
parent 65a619e554
commit 584b92edb0
7 changed files with 21 additions and 18 deletions

View file

@ -64,7 +64,7 @@ end
function krnl_Dw!(so, U, si, m0, th, lp::SpaceParm{4,6,B,D}) where {B,D}
b, r = CUDA.threadIdx().x, CUDA.blockIdx().x
b, r = assign_thx()
# For SF:
# - cttilde affects mass term at x0 = a, T-a
@ -85,7 +85,7 @@ end
function krnl_g5Dw!(so, U, si, m0, th, lp::SpaceParm{4,6,B,D}) where {B,D}
b, r = CUDA.threadIdx().x, CUDA.blockIdx().x
b, r = assign_thx()
@inbounds begin
so[b,r] = (4+m0)*si[b,r]