Skip to content

Commit

Permalink
switch order of these loops.
Browse files Browse the repository at this point in the history
  • Loading branch information
atmyers committed Jun 28, 2017
1 parent 3506f5a commit c38add9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Src/Particle/AMReX_OMPDepositionHelper_1d.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ subroutine amrex_atomic_accumulate_fab(local_fab, tile_lo, tile_hi, &

integer :: i, comp

do i = tile_lo(1), tile_hi(1)
do comp = 1, nc
do comp = 1, nc
do i = tile_lo(1), tile_hi(1)
!$omp atomic
global_fab(i, comp) = global_fab(i, comp) + local_fab(i, comp)
!$omp end atomic
Expand Down
6 changes: 3 additions & 3 deletions Src/Particle/AMReX_OMPDepositionHelper_2d.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ subroutine amrex_atomic_accumulate_fab(local_fab, tile_lo, tile_hi, &

integer :: i,j, comp

do j = tile_lo(2), tile_hi(2)
do i = tile_lo(1), tile_hi(1)
do comp = 1, nc
do comp = 1, nc
do j = tile_lo(2), tile_hi(2)
do i = tile_lo(1), tile_hi(1)
!$omp atomic
global_fab(i,j,comp) = global_fab(i,j,comp) + local_fab(i,j,comp)
!$omp end atomic
Expand Down
8 changes: 4 additions & 4 deletions Src/Particle/AMReX_OMPDepositionHelper_3d.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ subroutine amrex_atomic_accumulate_fab(local_fab, tile_lo, tile_hi, &

integer :: i,j,k,comp

do k = tile_lo(3), tile_hi(3)
do j = tile_lo(2), tile_hi(2)
do i = tile_lo(1), tile_hi(1)
do comp = 1, nc
do comp = 1, nc
do k = tile_lo(3), tile_hi(3)
do j = tile_lo(2), tile_hi(2)
do i = tile_lo(1), tile_hi(1)
!$omp atomic
global_fab(i,j,k,comp) = global_fab(i,j,k,comp) + local_fab(i,j,k,comp)
!$omp end atomic
Expand Down

0 comments on commit c38add9

Please sign in to comment.