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

Method flushTileArray

Src/Base/AMReX_FabArrayBase.cpp:2468–2503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2466}
2467
2468void
2469FabArrayBase::flushTileArray (const IntVect& tileSize, bool no_assertion) const
2470{
2471 amrex::ignore_unused(no_assertion);
2472 BL_ASSERT(no_assertion || getBDKey() == m_bdkey);
2473
2474 TACache& tao = m_TheTileArrayCache;
2475 auto tao_it = tao.find(m_bdkey);
2476 if(tao_it != tao.end())
2477 {
2478 if (tileSize == IntVect::TheZeroVector())
2479 {
2480 for (auto const& tai_it : tao_it->second)
2481 {
2482#ifdef AMREX_MEM_PROFILING
2483 m_TAC_stats.bytes -= tai_it.second.bytes();
2484#endif
2485 m_TAC_stats.recordErase(tai_it.second.nuse);
2486 }
2487 tao.erase(tao_it);
2488 }
2489 else
2490 {
2491 TAMap& tai = tao_it->second;
2492 const IntVect& crse_ratio = boxArray().crseRatio();
2493 auto tai_it = tai.find(std::pair<IntVect,IntVect>(tileSize,crse_ratio));
2494 if (tai_it != tai.end()) {
2495#ifdef AMREX_MEM_PROFILING
2496 m_TAC_stats.bytes -= tai_it->second.bytes();
2497#endif
2498 m_TAC_stats.recordErase(tai_it->second.nuse);
2499 tai.erase(tai_it);
2500 }
2501 }
2502 }
2503}
2504
2505void
2506FabArrayBase::flushTileArrayCache ()

Callers

nothing calls this directly

Calls 5

bytesMethod · 0.80
recordEraseMethod · 0.80
crseRatioMethod · 0.80
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected