Skip to content

Commit

Permalink
fixup! compact into a CSR
Browse files Browse the repository at this point in the history
  • Loading branch information
meyerzinn committed Apr 17, 2024
1 parent 047b475 commit d6c6c37
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions libgalois/include/galois/graphs/LS_LC_CSR_Graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,25 +408,8 @@ class LS_LC_CSR_Graph : private boost::noncopyable {
Compaction policy utilities.
*/

// Returns an estimated memory usage in bytes for the entire data structure.
inline size_t getMemoryUsageBytes() {
size_t estimate = m_vertices.size() * sizeof(VertexMetadata);
if constexpr (HasVertexData) {
estimate += m_vertices.size() * sizeof(VertexData);
}
m_edges_lock.lock();
{
estimate +=
(m_edges[0].size() + m_edges_tail.load(std::memory_order_relaxed)) *
sizeof(EdgeMetadata);
}
m_edges_lock.unlock();
if constexpr (HasEdgeData) {
estimate += m_edge_data.size() *
(sizeof(EdgeData) +
sizeof(std::pair<VertexTopologyID, VertexTopologyID>));
}
return estimate;
inline size_t getCSRMemoryUsageBytes() {
return m_edges[0].size() * sizeof(EdgeMetadata);
}

// Returns the number of bytes used for the log.
Expand Down

0 comments on commit d6c6c37

Please sign in to comment.