Block-Structured AMR Software Framework
AMReX_Loop.nolint.H File Reference

Go to the source code of this file.

Macros

#define AMREX_LOOP_3D(bx, i, j, k, block)
 
#define AMREX_LOOP_4D(bx, ncomp, i, j, k, n, block)
 

Macro Definition Documentation

◆ AMREX_LOOP_3D

#define AMREX_LOOP_3D (   bx,
  i,
  j,
  k,
  block 
)
Value:
{ \
const auto amrex_i_lo = amrex::lbound(bx); \
const auto amrex_i_hi = amrex::ubound(bx); \
for (int k = amrex_i_lo.z; k <= amrex_i_hi.z; ++k) { \
for (int j = amrex_i_lo.y; j <= amrex_i_hi.y; ++j) { \
for (int i = amrex_i_lo.x; i <= amrex_i_hi.x; ++i) { \
AMREX_D_PICK(amrex::ignore_unused(j,k),amrex::ignore_unused(k),(void)0); \
block \
}}} \
}
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 ubound(Array4< T > const &a) noexcept
Definition: AMReX_Array4.H:315
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 lbound(Array4< T > const &a) noexcept
Definition: AMReX_Array4.H:308
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void ignore_unused(const Ts &...)
This shuts up the compiler about unused variables.
Definition: AMReX.H:111

◆ AMREX_LOOP_4D

#define AMREX_LOOP_4D (   bx,
  ncomp,
  i,
  j,
  k,
  n,
  block 
)
Value:
{ \
const auto amrex_i_lo = amrex::lbound(bx); \
const auto amrex_i_hi = amrex::ubound(bx); \
for (int n = 0; n < ncomp; ++n) { \
for (int k = amrex_i_lo.z; k <= amrex_i_hi.z; ++k) { \
for (int j = amrex_i_lo.y; j <= amrex_i_hi.y; ++j) { \
for (int i = amrex_i_lo.x; i <= amrex_i_hi.x; ++i) { \
AMREX_D_PICK(amrex::ignore_unused(j,k),amrex::ignore_unused(k),(void)0); \
block \
}}}} \
}