Skip to content

Commit

Permalink
Moved post increment to pre-increment
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit-Kakodkar committed Jan 9, 2024
1 parent 401414b commit 6747e10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ KOKKOS_INLINE_FUNCTION void specfem::domain::impl::elements::element<
#ifdef KOKKOS_ENABLE_CUDA
#pragma unroll
#endif
for (int l = 0; l < NGLL; l++) {
for (int l = 0; l < NGLL; ++l) {
dchi_dxi += s_hprime_xx(ix, l, 0) * field_chi(iz, l, 0);
dchi_dgamma += s_hprime_zz(iz, l, 0) * field_chi(l, ix, 0);
}
Expand Down Expand Up @@ -290,7 +290,7 @@ KOKKOS_INLINE_FUNCTION void specfem::domain::impl::elements::element<
#ifdef KOKKOS_ENABLE_CUDA
#pragma unroll
#endif
for (int l = 0; l < NGLL; l++) {
for (int l = 0; l < NGLL; ++l) {
temp1l += s_hprimewgll_xx(ix, l, 0) * stress_integrand_xi(iz, l, 0);
temp2l += s_hprimewgll_zz(iz, l, 0) * stress_integrand_gamma(l, ix, 0);
}
Expand Down
4 changes: 2 additions & 2 deletions include/domain/impl/elements/elastic/elastic2d_isotropic.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ KOKKOS_INLINE_FUNCTION void specfem::domain::impl::elements::element<
#ifdef KOKKOS_ENABLE_CUDA
#pragma unroll
#endif
for (int l = 0; l < NGLL; l++) {
for (int l = 0; l < NGLL; ++l) {
du_dxi[0] += s_hprime_xx(ix, l, 0) * u(iz, l, 0);
du_dxi[1] += s_hprime_xx(ix, l, 0) * u(iz, l, 1);
du_dgamma[0] += s_hprime_zz(iz, l, 0) * u(l, ix, 0);
Expand Down Expand Up @@ -325,7 +325,7 @@ KOKKOS_INLINE_FUNCTION void specfem::domain::impl::elements::element<
#ifdef KOKKOS_ENABLE_CUDA
#pragma unroll
#endif
for (int l = 0; l < NGLL; l++) {
for (int l = 0; l < NGLL; ++l) {
tempx1 += s_hprimewgll_xx(ix, l, 0) * stress_integrand_xi(iz, l, 0);
tempz1 += s_hprimewgll_xx(ix, l, 0) * stress_integrand_xi(iz, l, 1);
tempx3 += s_hprimewgll_zz(iz, l, 0) * stress_integrand_gamma(l, ix, 0);
Expand Down

0 comments on commit 6747e10

Please sign in to comment.