Skip to content

Commit

Permalink
Update GPU blocking code as well
Browse files Browse the repository at this point in the history
  • Loading branch information
jipolanco committed Nov 25, 2024
1 parent 07392e6 commit f8d9d19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/blocking/gpu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ end
@Const(transform::F),
) where {F}
I = @index(Global, Linear)
@inbounds x⃗ = xp[I]
y⃗ = to_unit_cell_gpu(transform(Tuple(x⃗))) :: NTuple
x⃗ = unsafe_get_point_as_tuple(typeof(Δxs), xp, I)
y⃗ = to_unit_cell_gpu(transform(x⃗)) :: NTuple
n = block_index(y⃗, Δxs, block_dims, nblocks_per_dir)

# Note: here index_within_block is the value *after* incrementing (≥ 1).
Expand Down Expand Up @@ -200,8 +200,8 @@ end
@Const(transform::F),
) where {F}
I = @index(Global, Linear)
@inbounds x⃗ = xp[I]
y⃗ = to_unit_cell_gpu(transform(Tuple(x⃗))) :: NTuple
x⃗ = unsafe_get_point_as_tuple(typeof(Δxs), xp, I)
y⃗ = to_unit_cell_gpu(transform(x⃗)) :: NTuple
n = block_index(y⃗, Δxs, block_dims, nblocks_per_dir)
@inbounds J = cumulative_npoints_per_block[n] + blockidx[I]
@inbounds pointperm[J] = I
Expand Down

0 comments on commit f8d9d19

Please sign in to comment.