| 1339 | } |
| 1340 | |
| 1341 | void GenericClusterImpl::MoveToMain(TxGraphImpl& graph) noexcept |
| 1342 | { |
| 1343 | for (auto i : m_linearization) { |
| 1344 | GraphIndex idx = m_mapping[i]; |
| 1345 | auto& entry = graph.m_entries[idx]; |
| 1346 | entry.m_locator[1].SetMissing(); |
| 1347 | } |
| 1348 | auto quality = m_quality; |
| 1349 | // Subtract memory usage from staging and add it to main. |
| 1350 | graph.GetClusterSet(/*level=*/1).m_cluster_usage -= TotalMemoryUsage(); |
| 1351 | graph.GetClusterSet(/*level=*/0).m_cluster_usage += TotalMemoryUsage(); |
| 1352 | // Remove cluster itself from staging and add it to main. |
| 1353 | auto cluster = graph.ExtractCluster(1, quality, m_setindex); |
| 1354 | graph.InsertCluster(/*level=*/0, std::move(cluster), quality); |
| 1355 | Updated(graph, /*level=*/0, /*rename=*/false); |
| 1356 | } |
| 1357 | |
| 1358 | void SingletonClusterImpl::MoveToMain(TxGraphImpl& graph) noexcept |
| 1359 | { |
no test coverage detected