Skip to content

Commit

Permalink
Small clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgrote committed Oct 7, 2024
1 parent d05f6af commit 7238bfb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Initialization/DivCleaner/ProjectionDivCleaner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,19 @@ ProjectionDivCleaner::ProjectionDivCleaner(std::string const& a_field_name) :
#endif


if (m_h_stencil_coefs_x.size() > 0) {
if (!m_h_stencil_coefs_x.empty()) {
m_stencil_coefs_x.resize(m_h_stencil_coefs_x.size());
amrex::Gpu::copyAsync(amrex::Gpu::hostToDevice,
m_h_stencil_coefs_x.begin(), m_h_stencil_coefs_x.end(),
m_stencil_coefs_x.begin());
}
if (m_h_stencil_coefs_y.size() > 0) {
if (!m_h_stencil_coefs_y.empty()) {
m_stencil_coefs_y.resize(m_h_stencil_coefs_y.size());
amrex::Gpu::copyAsync(amrex::Gpu::hostToDevice,
m_h_stencil_coefs_y.begin(), m_h_stencil_coefs_y.end(),
m_stencil_coefs_y.begin());
}
if (m_h_stencil_coefs_z.size() > 0) {
if (!m_h_stencil_coefs_z.empty()) {
m_stencil_coefs_z.resize(m_h_stencil_coefs_z.size());
amrex::Gpu::copyAsync(amrex::Gpu::hostToDevice,
m_h_stencil_coefs_z.begin(), m_h_stencil_coefs_z.end(),
Expand Down

0 comments on commit 7238bfb

Please sign in to comment.