Skip to content

Commit

Permalink
Fix warnings in DenseBins::build with serial bin policy (AMReX-Codes#…
Browse files Browse the repository at this point in the history
  • Loading branch information
atmyers authored Jan 23, 2024
1 parent 0c59bad commit 2fc8a34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/Particle/AMReX_DenseBins.H
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public:
m_offsets.resize(0);
m_offsets.resize(nbins+1);

for (int i = 0; i < nitems; ++i) {
for (N i = 0; i < nitems; ++i) {
m_bins[i] = call_f(f,v,i);
++m_counts[m_bins[i]];
}
Expand All @@ -490,7 +490,7 @@ public:

Gpu::copy(Gpu::deviceToDevice, m_offsets.begin(), m_offsets.end(), m_counts.begin());

for (int i = 0; i < nitems; ++i) {
for (N i = 0; i < nitems; ++i) {
index_type index = m_counts[m_bins[i]]++;
m_perm[index] = i;
}
Expand Down

0 comments on commit 2fc8a34

Please sign in to comment.