| 2123 | } |
| 2124 | |
| 2125 | void |
| 2126 | FabArrayBase::flushFPinfo (bool no_assertion) const |
| 2127 | { |
| 2128 | amrex::ignore_unused(no_assertion); |
| 2129 | BL_ASSERT(no_assertion || getBDKey() == m_bdkey); |
| 2130 | |
| 2131 | std::vector<FPinfoCacheIter> others; |
| 2132 | |
| 2133 | auto er_it = m_TheFillPatchCache.equal_range(m_bdkey); |
| 2134 | |
| 2135 | for (auto it = er_it.first; it != er_it.second; ++it) |
| 2136 | { |
| 2137 | const BDKey& srckey = it->second->m_srcbdk; |
| 2138 | const BDKey& dstkey = it->second->m_dstbdk; |
| 2139 | |
| 2140 | BL_ASSERT((srckey==dstkey && srckey==m_bdkey) || |
| 2141 | (m_bdkey==srckey) || (m_bdkey==dstkey)); |
| 2142 | |
| 2143 | if (srckey != dstkey) { |
| 2144 | const BDKey& otherkey = (m_bdkey == srckey) ? dstkey : srckey; |
| 2145 | std::pair<FPinfoCacheIter,FPinfoCacheIter> o_er_it = m_TheFillPatchCache.equal_range(otherkey); |
| 2146 | |
| 2147 | for (auto oit = o_er_it.first; oit != o_er_it.second; ++oit) |
| 2148 | { |
| 2149 | if (it->second == oit->second) { |
| 2150 | others.push_back(oit); |
| 2151 | } |
| 2152 | } |
| 2153 | } |
| 2154 | |
| 2155 | #ifdef AMREX_MEM_PROFILING |
| 2156 | m_FPinfo_stats.bytes -= it->second->bytes(); |
| 2157 | #endif |
| 2158 | m_FPinfo_stats.recordErase(it->second->m_nuse); |
| 2159 | delete it->second; |
| 2160 | } |
| 2161 | |
| 2162 | m_TheFillPatchCache.erase(er_it.first, er_it.second); |
| 2163 | |
| 2164 | for (auto const& it : others) { |
| 2165 | m_TheFillPatchCache.erase(it); |
| 2166 | } |
| 2167 | } |
| 2168 | |
| 2169 | FabArrayBase::CFinfo::CFinfo (const FabArrayBase& finefa, |
| 2170 | const Geometry& finegm, |
nothing calls this directly
no test coverage detected