From caa48011aa003fb3602d88102351b00e4053323d Mon Sep 17 00:00:00 2001 From: Meyer Zinn Date: Thu, 21 Mar 2024 17:05:55 +0000 Subject: [PATCH] improve compaction performance by reducing lock contention --- .../include/galois/graphs/LS_LC_CSR_Graph.h | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/libgalois/include/galois/graphs/LS_LC_CSR_Graph.h b/libgalois/include/galois/graphs/LS_LC_CSR_Graph.h index 9da3160e5..6b51bd9a6 100644 --- a/libgalois/include/galois/graphs/LS_LC_CSR_Graph.h +++ b/libgalois/include/galois/graphs/LS_LC_CSR_Graph.h @@ -234,25 +234,7 @@ class LS_LC_CSR_Graph : private boost::noncopyable { VertexMetadata& vertex_meta = m_vertices[vertex_id]; if (vertex_meta.buffer == 0) { - uint64_t new_begin; - m_edges_lock.lock(); - { - new_begin = m_edges[1].size(); - m_edges[1].resize(new_begin + vertex_meta.degree); - } - m_edges_lock.unlock(); - - uint64_t new_end = new_begin + vertex_meta.degree; - - std::copy_if(&getEdgeMetadata(0, vertex_meta.begin), - &getEdgeMetadata(0, vertex_meta.end), - &getEdgeMetadata(1, new_begin), - [](EdgeMetadata& edge_meta) { - return !edge_meta.is_tomb(); - }); - - vertex_meta.begin = new_begin; - vertex_meta.end = new_end; + this->addEdgesTopologyOnly(vertex_id, {}); } // we are about to swap the buffers, so all vertices will