3 #include <AMReX_Config.H>
17 template<
class T>
class FabArray;
79 unsigned char flags_=0);
88 unsigned char flags_=0);
95 const IntVect& tilesize,
unsigned char flags_=0);
176 std::unique_ptr<FabArrayBase>
m_fa;
199 explicit operator bool() const noexcept {
return flag; }
#define AMREX_EXPORT
Definition: AMReX_Extension.H:191
A collection of Boxes stored in an Array.
Definition: AMReX_BoxArray.H:550
static bool SameRefs(const BoxArray &lhs, const BoxArray &rhs)
whether two BoxArrays share the same data
Definition: AMReX_BoxArray.H:820
Calculates the distribution of FABs to MPI processes.
Definition: AMReX_DistributionMapping.H:41
Base class for FabArray.
Definition: AMReX_FabArrayBase.H:41
static AMREX_EXPORT IntVect mfiter_tile_size
Default tilesize in MFIter.
Definition: AMReX_FabArrayBase.H:288
const BoxArray & boxArray() const noexcept
Return a constant reference to the BoxArray that defines the valid region associated with this FabArr...
Definition: AMReX_FabArrayBase.H:94
const DistributionMapping & DistributionMap() const noexcept
Return constant reference to associated DistributionMapping.
Definition: AMReX_FabArrayBase.H:130
Box box(int K) const noexcept
Return the Kth Box in the BoxArray. That is, the valid region of the Kth grid.
Definition: AMReX_FabArrayBase.H:100
Box fabbox(int K) const noexcept
Return the Kth FABs Box in the FabArray. That is, the region the Kth fab is actually defined on.
Definition: AMReX_MFIter.H:57
int LocalTileIndex() const noexcept
The current local tile index in the current grid;.
Definition: AMReX_MFIter.H:150
static AMREX_EXPORT int nextDynamicIndex
Definition: AMReX_MFIter.H:210
const Vector< Box > * tile_array
Definition: AMReX_MFIter.H:206
unsigned char flags
Definition: AMReX_MFIter.H:182
IndexType typ
Definition: AMReX_MFIter.H:187
bool dynamic
Definition: AMReX_MFIter.H:189
Box growntilebox(int ng=-1000000) const noexcept
Return the tile box at the current index grown to include ghost cells.
Definition: AMReX_MFIter.cpp:472
Box fabbox() const noexcept
Return the Box of the FAB at which we currently point.
Definition: AMReX_MFIter.H:135
int length() const noexcept
The number of indices.
Definition: AMReX_MFIter.H:147
bool finalized
Definition: AMReX_MFIter.H:190
static int allowMultipleMFIters(int allow)
Definition: AMReX_MFIter.cpp:14
int tileIndex() const noexcept
Definition: AMReX_MFIter.H:164
int endIndex
Definition: AMReX_MFIter.H:185
Box tilebox() const noexcept
Return the tile Box at the current index.
Definition: AMReX_MFIter.cpp:385
static AMREX_EXPORT int depth
Definition: AMReX_MFIter.H:211
const DistributionMapping & DistributionMap() const noexcept
Definition: AMReX_MFIter.H:166
MFIter(MFIter const &)=delete
DeviceSync device_sync
Definition: AMReX_MFIter.H:202
bool isValid() const noexcept
Is the iterator valid i.e. is it associated with a FAB?
Definition: AMReX_MFIter.H:141
int streams
Definition: AMReX_MFIter.H:186
int beginIndex
Definition: AMReX_MFIter.H:184
MFIter(MFIter &&rhs)=default
const Vector< int > * local_tile_index_map
Definition: AMReX_MFIter.H:207
Box validbox() const noexcept
Return the valid Box in which the current tile resides.
Definition: AMReX_MFIter.H:132
Box nodaltilebox(int dir=-1) const noexcept
Return the dir-nodal (or all nodal if dir<0) Box at the current index.
Definition: AMReX_MFIter.cpp:444
void Finalize()
Definition: AMReX_MFIter.cpp:227
const FabArrayBase & theFabArrayBase() const noexcept
Constant reference to FabArray over which we're iterating.
Definition: AMReX_MFIter.H:162
const Vector< int > * local_index_map
Definition: AMReX_MFIter.H:205
const Vector< int > * num_local_tiles
Definition: AMReX_MFIter.H:208
int index() const noexcept
The index into the underlying BoxArray of the current FAB.
Definition: AMReX_MFIter.H:144
MFIter(const FabArrayBase &fabarray, unsigned char flags_=0)
The default constructor does not enable tiling (flags_ is set to 0 by default). However,...
Definition: AMReX_MFIter.cpp:31
~MFIter()
Definition: AMReX_MFIter.cpp:221
static AMREX_EXPORT int allow_multiple_mfiters
Definition: AMReX_MFIter.H:212
MFIter & operator=(MFIter const &)=delete
int LocalIndex() const noexcept
Return local index into the vector of fab pointers, m_fabs_v When AllBoxes is on, local_index_map is ...
Definition: AMReX_MFIter.H:159
int currentIndex
Definition: AMReX_MFIter.H:183
const Vector< int > * index_map
Definition: AMReX_MFIter.H:204
static int currentDepth()
Definition: AMReX_MFIter.cpp:21
void Initialize()
Definition: AMReX_MFIter.cpp:274
std::unique_ptr< FabArrayBase > m_fa
This must be the first member!
Definition: AMReX_MFIter.H:176
Box grownnodaltilebox(int dir=-1, int ng=-1000000) const noexcept
Return the dir-nodal (or all nodal if dir<0) box grown to include ghost cells.
Definition: AMReX_MFIter.cpp:506
IntVect tile_size
Definition: AMReX_MFIter.H:180
void operator++() noexcept
Increment iterator to the next tile we own.
Definition: AMReX_MFIter.cpp:522
Flags
Flags that specify tiling modes. All these flags are off by default.
Definition: AMReX_MFIter.H:60
@ Tiling
Tiling: Enabling the tiling mode.
Definition: AMReX_MFIter.H:62
@ AllBoxes
AllBoxes: If on, all threads/workers loop over all boxes without tiling. This essentially loops over ...
Definition: AMReX_MFIter.H:68
@ NoTeamBarrier
NoTeamBarrier: This option is for Team only. If on, there is no barrier in MFIter dtor.
Definition: AMReX_MFIter.H:70
int numLocalTiles() const noexcept
The the number of tiles in the current grid;.
Definition: AMReX_MFIter.H:153
const FabArrayBase * fabArray
Definition: AMReX_MFIter.H:178
bool notInLaunchRegion() noexcept
Definition: AMReX_GpuControl.H:87
int numGpuStreams() noexcept
Definition: AMReX_GpuDevice.H:225
bool inNoSyncRegion() noexcept
Definition: AMReX_GpuControl.H:146
static int f(amrex::Real t, N_Vector y_data, N_Vector y_rhs, void *user_data)
Definition: AMReX_SundialsIntegrator.H:44
Definition: AMReX_Amr.cpp:49
bool isMFIterSafe(const FabArrayBase &x, const FabArrayBase &y)
Definition: AMReX_MFIter.H:219
bool TilingIfNotGPU() noexcept
Definition: AMReX_MFIter.H:12
Definition: AMReX_MFIter.H:20
int num_streams
Definition: AMReX_MFIter.H:24
MFItInfo & SetDeviceSync(bool f) noexcept
Definition: AMReX_MFIter.H:42
MFItInfo & SetNumStreams(int n) noexcept
Definition: AMReX_MFIter.H:46
MFItInfo & EnableTiling(const IntVect &ts=FabArrayBase::mfiter_tile_size) noexcept
Definition: AMReX_MFIter.H:29
MFItInfo & SetDynamic(bool f) noexcept
Definition: AMReX_MFIter.H:34
MFItInfo() noexcept
Definition: AMReX_MFIter.H:26
MFItInfo & UseDefaultStream() noexcept
Definition: AMReX_MFIter.H:50
IntVect tilesize
Definition: AMReX_MFIter.H:25
bool do_tiling
Definition: AMReX_MFIter.H:21
MFItInfo & DisableDeviceSync() noexcept
Definition: AMReX_MFIter.H:38
bool device_sync
Definition: AMReX_MFIter.H:23
bool dynamic
Definition: AMReX_MFIter.H:22
Definition: AMReX_MFIter.H:192
DeviceSync(DeviceSync &&rhs) noexcept
Definition: AMReX_MFIter.H:194
DeviceSync(bool f)
Definition: AMReX_MFIter.H:193
DeviceSync & operator=(DeviceSync const &)=delete
DeviceSync(DeviceSync const &)=delete
bool flag
Definition: AMReX_MFIter.H:200