1#ifndef AMREX_MF_PARALLEL_FOR_C_H_
2#define AMREX_MF_PARALLEL_FOR_C_H_
3#include <AMReX_Config.H>
11namespace amrex::detail {
13template <FabArrayType MF,
typename F>
14void ParallelFor_doit (MF
const& mf,
IntVect const& nghost,
IntVect const& ts,
bool dynamic,
F const& f)
19 for (MFIter mfi(mf,MFItInfo().EnableTiling(ts).SetDynamic(dynamic)); mfi.isValid(); ++mfi) {
20 Box const& bx = mfi.growntilebox(nghost);
21 int const lidx = mfi.LocalIndex();
24 for (
int k = lo.z; k <= hi.z; ++k) {
25 for (
int j = lo.y; j <= hi.y; ++j) {
27 for (
int i = lo.x; i <= hi.x; ++i) {
35template <FabArrayType MF,
typename F>
36void ParallelFor_doit (MF
const& mf,
IntVect const& nghost,
int ncomp,
IntVect const& ts,
bool dynamic,
F const& f)
41 for (MFIter mfi(mf,MFItInfo().EnableTiling(ts).SetDynamic(dynamic)); mfi.isValid(); ++mfi) {
42 Box const& bx = mfi.growntilebox(nghost);
43 int const lidx = mfi.LocalIndex();
46 for (
int n = 0; n < ncomp; ++n) {
47 for (
int k = lo.z; k <= hi.z; ++k) {
48 for (
int j = lo.y; j <= hi.y; ++j) {
50 for (
int i = lo.x; i <= hi.x; ++i) {
#define AMREX_PRAGMA_SIMD
Definition AMReX_Extension.H:80
__host__ __device__ Dim3 ubound(Array4< T > const &a) noexcept
Return the inclusive upper bounds of an Array4 in Dim3 form.
Definition AMReX_Array4.H:1359
__host__ __device__ Dim3 lbound(Array4< T > const &a) noexcept
Return the inclusive lower bounds of an Array4 in Dim3 form.
Definition AMReX_Array4.H:1345
BoxND< 3 > Box
Box is an alias for amrex::BoxND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:30
IntVectND< 3 > IntVect
IntVect is an alias for amrex::IntVectND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:33