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

Method flushCPCache

Src/Base/AMReX_FabArrayBase.cpp:555–573  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553}
554
555void
556FabArrayBase::flushCPCache ()
557{
558 std::vector<CPC*> cpcs;
559 for (auto const& it : m_TheCPCache)
560 {
561 if (it.first == it.second->m_srcbdk) {
562 m_CPC_stats.recordErase(it.second->m_nuse);
563 cpcs.push_back(it.second);
564 }
565 }
566 for (auto& c : cpcs) {
567 delete c;
568 }
569 m_TheCPCache.clear();
570#ifdef AMREX_MEM_PROFILING
571 m_CPC_stats.bytes = 0L;
572#endif
573}
574
575const FabArrayBase::CPC&
576FabArrayBase::getCPC (const IntVect& dstng, const FabArrayBase& src, const IntVect& srcng,

Callers

nothing calls this directly

Calls 3

recordEraseMethod · 0.80
push_backMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected