| 1219 | } |
| 1220 | |
| 1221 | Cluster* GenericClusterImpl::CopyToStaging(TxGraphImpl& graph) const noexcept |
| 1222 | { |
| 1223 | // Construct an empty Cluster. |
| 1224 | auto ret = graph.CreateEmptyGenericCluster(); |
| 1225 | auto ptr = ret.get(); |
| 1226 | // Copy depgraph, mapping, and linearization. |
| 1227 | ptr->m_depgraph = m_depgraph; |
| 1228 | ptr->m_mapping = m_mapping; |
| 1229 | ptr->m_linearization = m_linearization; |
| 1230 | // Insert the new Cluster into the graph. |
| 1231 | graph.InsertCluster(/*level=*/1, std::move(ret), m_quality); |
| 1232 | // Update its Locators. |
| 1233 | ptr->Updated(graph, /*level=*/1, /*rename=*/false); |
| 1234 | // Update memory usage. |
| 1235 | graph.GetClusterSet(/*level=*/1).m_cluster_usage += ptr->TotalMemoryUsage(); |
| 1236 | return ptr; |
| 1237 | } |
| 1238 | |
| 1239 | Cluster* SingletonClusterImpl::CopyToStaging(TxGraphImpl& graph) const noexcept |
| 1240 | { |
no test coverage detected