Skip to content

Commit

Permalink
Z4co: make calceta a device fucntion
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Sep 10, 2024
1 parent 4da3f80 commit 30d2ab7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Z4co/src/rhs.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,9 @@ extern "C" void Z4co_RHS(CCTK_ARGUMENTS) {
const CCTK_REAL cmuL = f_mu_L;
const CCTK_REAL cmuS = f_mu_S;
// const CCTK_REAL ceta = eta;
const auto calceta = [=](const vreal x, const CCTK_REAL y,
const CCTK_REAL z) {
const auto calceta = [=] CCTK_DEVICE(
const vreal x, const CCTK_REAL y,
const CCTK_REAL z) CCTK_ATTRIBUTE_ALWAYS_INLINE {
const vreal r = sqrt(x * x + y * y + z * z);
const CCTK_REAL is4 =
1.0 / (veta_width * veta_width * veta_width * veta_width);
Expand Down

0 comments on commit 30d2ab7

Please sign in to comment.