Skip to content

Commit

Permalink
Disable optimization for computeRoundOffDomain
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Dec 29, 2023
1 parent 75571e2 commit 5c6702f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Src/Base/AMReX_Geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,14 @@ Geometry::growPeriodicDomain (int ngrow) const noexcept
return growPeriodicDomain(IntVect(ngrow));
}

#if defined(__clang__)
[[clang::optnone]]
#elif defined(__GNUC__)
__attribute__ ((gnu::optimize(0)))
#elif defined(_WIN32)
#define AMREX_WIN32_OPTIMIZE_OFF
#pragma optimize("", off)
#endif
void
Geometry::computeRoundoffDomain ()
{
Expand Down Expand Up @@ -685,6 +693,9 @@ Geometry::computeRoundoffDomain ()
}
}
}
#if defined(AMREX_WIN32_OPTIMIZE_OFF)
#pragma optimize("", on)
#endif

bool
Geometry::outsideRoundoffDomain (AMREX_D_DECL(ParticleReal x, ParticleReal y, ParticleReal z)) const
Expand Down

0 comments on commit 5c6702f

Please sign in to comment.