MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / getTileArray

Method getTileArray

Src/Base/AMReX_FabArrayBase.cpp:2341–2374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2339}
2340
2341const FabArrayBase::TileArray*
2342FabArrayBase::getTileArray (const IntVect& tilesize) const
2343{
2344 TileArray* p;
2345
2346#ifdef AMREX_USE_OMP
2347#pragma omp critical(gettilearray)
2348#endif
2349 {
2350 BL_ASSERT(getBDKey() == m_bdkey);
2351
2352 const IntVect& crse_ratio = boxArray().crseRatio();
2353 p = &FabArrayBase::m_TheTileArrayCache[m_bdkey][std::pair<IntVect,IntVect>(tilesize,crse_ratio)];
2354 if (p->nuse == -1) {
2355 buildTileArray(tilesize, *p);
2356 p->nuse = 0;
2357 m_TAC_stats.recordBuild();
2358#ifdef AMREX_MEM_PROFILING
2359 m_TAC_stats.bytes += p->bytes();
2360 m_TAC_stats.bytes_hwm = std::max(m_TAC_stats.bytes_hwm,
2361 m_TAC_stats.bytes);
2362#endif
2363 }
2364#ifdef AMREX_USE_OMP
2365#pragma omp master
2366#endif
2367 {
2368 ++(p->nuse);
2369 m_TAC_stats.recordUse();
2370 }
2371 }
2372
2373 return p;
2374}
2375
2376void
2377FabArrayBase::buildTileArray (const IntVect& tileSize, TileArray& ta) const

Callers 1

InitializeMethod · 0.80

Calls 4

crseRatioMethod · 0.80
bytesMethod · 0.80
recordUseMethod · 0.80
recordBuildMethod · 0.45

Tested by

no test coverage detected