From 0acf78ecf14ee5c8d2680254378e99ef3e35bd51 Mon Sep 17 00:00:00 2001 From: Vince Li Date: Fri, 8 Apr 2022 21:00:54 -0400 Subject: [PATCH 1/9] FillWindow now takes a vector of vertex ranges --- src/famgraph/graph.cpp | 39 +++++++++++++++++++------------ src/famgraph/include/famgraph.hpp | 2 +- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/src/famgraph/graph.cpp b/src/famgraph/graph.cpp index 9853fa8..35f0f0e 100644 --- a/src/famgraph/graph.cpp +++ b/src/famgraph/graph.cpp @@ -122,7 +122,7 @@ famgraph::AdjacencyList famgraph::RemoteGraph::Iterator::Next() noexcept auto const v = this->current_vertex_++; if (v >= this->current_window_.end_exclusive) { this->current_window_ = this->MaximalRange(v); - this->FillWindow(this->current_window_); + this->FillWindow({this->current_window_}); this->cursor = static_cast(this->edge_buffer_.p); } @@ -148,7 +148,7 @@ famgraph::RemoteGraph::Iterator::Iterator(std::vector &&ranges, { if (this->HasNext()) { this->current_window_ = this->MaximalRange(this->current_range_->start); - this->FillWindow(this->current_window_); + this->FillWindow({this->current_window_}); this->cursor = static_cast(this->edge_buffer_.p); } } @@ -174,30 +174,39 @@ famgraph::VertexRange famgraph::RemoteGraph::Iterator::MaximalRange( return { range_start, range_end }; } void famgraph::RemoteGraph::Iterator::FillWindow( - famgraph::VertexRange range) noexcept + std::vector range_list) noexcept { - if (range.start >= range.end_exclusive) return; + if (range_list.size() == 0) return; + if (range_list.front().start >= range_list.back().end_exclusive) return; auto *edges = static_cast(this->edge_buffer_.p); - auto const &start = this->graph_.idx_[range.start].begin; - auto const &end_exclusive = - this->graph_.idx_[range.end_exclusive - 1].end_exclusive; - auto const length = end_exclusive - start; - auto const end = length - 1; + auto end = 0; - if (length == 0) return; + // Setup FamSegment Vector + std::vector fam_segments; + for (auto& range : range_list) { + auto const &start = this->graph_.idx_[range.start].begin; + auto const &end_exclusive = + this->graph_.idx_[range.end_exclusive - 1].end_exclusive; + auto const length = end_exclusive - start; + if (length == 0) continue; + + auto const raddr = + this->graph_.adjacency_array_.raddr + start * sizeof(uint32_t); + fam_segments.push_back({raddr, (uint32_t) length}); + end = end + length; + } + end -= 1; // 1) sign edge window edges[0] = famgraph::null_vert; edges[end] = famgraph::null_vert; - // 2) post rdma - auto const raddr = - this->graph_.adjacency_array_.raddr + start * sizeof(uint32_t); + auto const rkey = this->graph_.adjacency_array_.rkey; auto const lkey = this->graph_.edge_window_.lkey; + this->graph_.fam_control_->Read(this->edge_buffer_.p, - raddr, - length * sizeof(uint32_t), + fam_segments, lkey, rkey, this->channel_); diff --git a/src/famgraph/include/famgraph.hpp b/src/famgraph/include/famgraph.hpp index a8ff63a..f218be7 100644 --- a/src/famgraph/include/famgraph.hpp +++ b/src/famgraph/include/famgraph.hpp @@ -165,7 +165,7 @@ class RemoteGraph int const channel_; VertexRange MaximalRange(uint32_t range_start) noexcept; - void FillWindow(VertexRange range) noexcept; + void FillWindow(std::vector range_list) noexcept; public: Iterator(std::vector &&ranges, From 9b46e135d75def78f5e2e01d83ca77feef1f52dc Mon Sep 17 00:00:00 2001 From: Clang Robot Date: Sat, 9 Apr 2022 01:22:13 +0000 Subject: [PATCH 2/9] :art: Committing clang-format changes --- src/famgraph/graph.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/famgraph/graph.cpp b/src/famgraph/graph.cpp index 35f0f0e..4d25df1 100644 --- a/src/famgraph/graph.cpp +++ b/src/famgraph/graph.cpp @@ -122,7 +122,7 @@ famgraph::AdjacencyList famgraph::RemoteGraph::Iterator::Next() noexcept auto const v = this->current_vertex_++; if (v >= this->current_window_.end_exclusive) { this->current_window_ = this->MaximalRange(v); - this->FillWindow({this->current_window_}); + this->FillWindow({ this->current_window_ }); this->cursor = static_cast(this->edge_buffer_.p); } @@ -148,7 +148,7 @@ famgraph::RemoteGraph::Iterator::Iterator(std::vector &&ranges, { if (this->HasNext()) { this->current_window_ = this->MaximalRange(this->current_range_->start); - this->FillWindow({this->current_window_}); + this->FillWindow({ this->current_window_ }); this->cursor = static_cast(this->edge_buffer_.p); } } @@ -183,7 +183,7 @@ void famgraph::RemoteGraph::Iterator::FillWindow( // Setup FamSegment Vector std::vector fam_segments; - for (auto& range : range_list) { + for (auto &range : range_list) { auto const &start = this->graph_.idx_[range.start].begin; auto const &end_exclusive = this->graph_.idx_[range.end_exclusive - 1].end_exclusive; @@ -192,7 +192,7 @@ void famgraph::RemoteGraph::Iterator::FillWindow( auto const raddr = this->graph_.adjacency_array_.raddr + start * sizeof(uint32_t); - fam_segments.push_back({raddr, (uint32_t) length}); + fam_segments.push_back({ raddr, (uint32_t)length }); end = end + length; } end -= 1; @@ -205,11 +205,8 @@ void famgraph::RemoteGraph::Iterator::FillWindow( auto const rkey = this->graph_.adjacency_array_.rkey; auto const lkey = this->graph_.edge_window_.lkey; - this->graph_.fam_control_->Read(this->edge_buffer_.p, - fam_segments, - lkey, - rkey, - this->channel_); + this->graph_.fam_control_->Read( + this->edge_buffer_.p, fam_segments, lkey, rkey, this->channel_); // 3) wait on data while (edges[0] == famgraph::null_vert || edges[end] == famgraph::null_vert) { From 4993747ed6de5c554c2f90733bbffb65047a5c80 Mon Sep 17 00:00:00 2001 From: Vince Li Date: Fri, 8 Apr 2022 21:00:54 -0400 Subject: [PATCH 3/9] FillWindow now takes a vector of vertex ranges --- src/famgraph/graph.cpp | 39 +++++++++++++++++++------------ src/famgraph/include/famgraph.hpp | 2 +- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/src/famgraph/graph.cpp b/src/famgraph/graph.cpp index 9853fa8..35f0f0e 100644 --- a/src/famgraph/graph.cpp +++ b/src/famgraph/graph.cpp @@ -122,7 +122,7 @@ famgraph::AdjacencyList famgraph::RemoteGraph::Iterator::Next() noexcept auto const v = this->current_vertex_++; if (v >= this->current_window_.end_exclusive) { this->current_window_ = this->MaximalRange(v); - this->FillWindow(this->current_window_); + this->FillWindow({this->current_window_}); this->cursor = static_cast(this->edge_buffer_.p); } @@ -148,7 +148,7 @@ famgraph::RemoteGraph::Iterator::Iterator(std::vector &&ranges, { if (this->HasNext()) { this->current_window_ = this->MaximalRange(this->current_range_->start); - this->FillWindow(this->current_window_); + this->FillWindow({this->current_window_}); this->cursor = static_cast(this->edge_buffer_.p); } } @@ -174,30 +174,39 @@ famgraph::VertexRange famgraph::RemoteGraph::Iterator::MaximalRange( return { range_start, range_end }; } void famgraph::RemoteGraph::Iterator::FillWindow( - famgraph::VertexRange range) noexcept + std::vector range_list) noexcept { - if (range.start >= range.end_exclusive) return; + if (range_list.size() == 0) return; + if (range_list.front().start >= range_list.back().end_exclusive) return; auto *edges = static_cast(this->edge_buffer_.p); - auto const &start = this->graph_.idx_[range.start].begin; - auto const &end_exclusive = - this->graph_.idx_[range.end_exclusive - 1].end_exclusive; - auto const length = end_exclusive - start; - auto const end = length - 1; + auto end = 0; - if (length == 0) return; + // Setup FamSegment Vector + std::vector fam_segments; + for (auto& range : range_list) { + auto const &start = this->graph_.idx_[range.start].begin; + auto const &end_exclusive = + this->graph_.idx_[range.end_exclusive - 1].end_exclusive; + auto const length = end_exclusive - start; + if (length == 0) continue; + + auto const raddr = + this->graph_.adjacency_array_.raddr + start * sizeof(uint32_t); + fam_segments.push_back({raddr, (uint32_t) length}); + end = end + length; + } + end -= 1; // 1) sign edge window edges[0] = famgraph::null_vert; edges[end] = famgraph::null_vert; - // 2) post rdma - auto const raddr = - this->graph_.adjacency_array_.raddr + start * sizeof(uint32_t); + auto const rkey = this->graph_.adjacency_array_.rkey; auto const lkey = this->graph_.edge_window_.lkey; + this->graph_.fam_control_->Read(this->edge_buffer_.p, - raddr, - length * sizeof(uint32_t), + fam_segments, lkey, rkey, this->channel_); diff --git a/src/famgraph/include/famgraph.hpp b/src/famgraph/include/famgraph.hpp index a8ff63a..f218be7 100644 --- a/src/famgraph/include/famgraph.hpp +++ b/src/famgraph/include/famgraph.hpp @@ -165,7 +165,7 @@ class RemoteGraph int const channel_; VertexRange MaximalRange(uint32_t range_start) noexcept; - void FillWindow(VertexRange range) noexcept; + void FillWindow(std::vector range_list) noexcept; public: Iterator(std::vector &&ranges, From b453a483e509178c4e0c6b06dd00c51ce8bc54d3 Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 5 Apr 2022 15:35:46 -0400 Subject: [PATCH 4/9] Referenced to constexpr for max_outstanding_wr from FAM/CMakeLists.txt Changed famgraph::RemoteGraph::Iterator::MaximalRange to return a std::vector. --- src/FAM/CMakeLists.txt | 2 +- src/famgraph/graph.cpp | 30 +++++++++++++++++++++--------- src/famgraph/include/famgraph.hpp | 8 +++++--- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/src/FAM/CMakeLists.txt b/src/FAM/CMakeLists.txt index 76a8960..d893929 100644 --- a/src/FAM/CMakeLists.txt +++ b/src/FAM/CMakeLists.txt @@ -22,4 +22,4 @@ target_link_libraries( target_include_directories(FAM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include - PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) + ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/famgraph/graph.cpp b/src/famgraph/graph.cpp index 35f0f0e..8f0a35f 100644 --- a/src/famgraph/graph.cpp +++ b/src/famgraph/graph.cpp @@ -120,7 +120,7 @@ bool famgraph::RemoteGraph::Iterator::HasNext() noexcept famgraph::AdjacencyList famgraph::RemoteGraph::Iterator::Next() noexcept { auto const v = this->current_vertex_++; - if (v >= this->current_window_.end_exclusive) { + if (v >= this->current_window_[this->current_window_.size() - 1].end_exclusive) { this->current_window_ = this->MaximalRange(v); this->FillWindow({this->current_window_}); this->cursor = static_cast(this->edge_buffer_.p); @@ -152,26 +152,38 @@ famgraph::RemoteGraph::Iterator::Iterator(std::vector &&ranges, this->cursor = static_cast(this->edge_buffer_.p); } } -famgraph::VertexRange famgraph::RemoteGraph::Iterator::MaximalRange( +std::vector famgraph::RemoteGraph::Iterator::MaximalRange( uint32_t range_start) noexcept { + std::vector vertex_runs; uint32_t range_end = range_start; auto const edge_capacity = this->edge_buffer_.length / sizeof(uint32_t); uint64_t edges_taken = 0; - while (range_end < this->current_range_->end_exclusive) { - auto const [start_inclusive, end_exclusive] = this->graph_.idx_[range_end]; - auto const num_edges = end_exclusive - start_inclusive; - edges_taken += num_edges; + while(edges_taken <= edge_capacity && vertex_runs.size() < famgraph::max_outstanding_wr) { + while (range_end < this->current_range_->end_exclusive) { - if (edges_taken <= edge_capacity) { - range_end++; + auto const [start_inclusive, end_exclusive] = + this->graph_.idx_[range_end]; + auto const num_edges = end_exclusive - start_inclusive; + edges_taken += num_edges; + + if (edges_taken <= edge_capacity) { + range_end++; + } else { + break; + } + } + vertex_runs.push_back({range_start, range_end}); + if(this->current_range_ < this->ranges_.cend()) { + ++this->current_range_; + this->current_vertex_ = this->current_range_->start; } else { break; } } - return { range_start, range_end }; + return vertex_runs; } void famgraph::RemoteGraph::Iterator::FillWindow( std::vector range_list) noexcept diff --git a/src/famgraph/include/famgraph.hpp b/src/famgraph/include/famgraph.hpp index f218be7..d108e60 100644 --- a/src/famgraph/include/famgraph.hpp +++ b/src/famgraph/include/famgraph.hpp @@ -6,7 +6,7 @@ #include #include #include - +#include #include namespace famgraph { @@ -14,6 +14,8 @@ using VertexLabel = std::uint32_t; using EdgeIndexType = std::uint64_t; constexpr uint32_t null_vert = std::numeric_limits::max(); +constexpr unsigned long max_outstanding_wr = FAM::max_outstanding_wr; + enum class TbbDispatch { USE_TBB }; struct VertexRange @@ -157,14 +159,14 @@ class RemoteGraph { std::vector const ranges_; decltype(ranges_.begin()) current_range_; - VertexRange current_window_; + std::vector current_window_; uint32_t current_vertex_; RemoteGraph const &graph_; Buffer edge_buffer_; uint32_t *cursor; int const channel_; - VertexRange MaximalRange(uint32_t range_start) noexcept; + std::vector MaximalRange(uint32_t range_start) noexcept; void FillWindow(std::vector range_list) noexcept; public: From 7c30de54d71f3d071dc3fad05af272c74bbd639e Mon Sep 17 00:00:00 2001 From: Vishal Date: Mon, 11 Apr 2022 14:59:09 -0400 Subject: [PATCH 5/9] Changed FillWindow call to remove the std::vector wrapper. --- src/famgraph/graph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/famgraph/graph.cpp b/src/famgraph/graph.cpp index 8f0a35f..0fa94d6 100644 --- a/src/famgraph/graph.cpp +++ b/src/famgraph/graph.cpp @@ -122,7 +122,7 @@ famgraph::AdjacencyList famgraph::RemoteGraph::Iterator::Next() noexcept auto const v = this->current_vertex_++; if (v >= this->current_window_[this->current_window_.size() - 1].end_exclusive) { this->current_window_ = this->MaximalRange(v); - this->FillWindow({this->current_window_}); + this->FillWindow(this->current_window_); this->cursor = static_cast(this->edge_buffer_.p); } From 818a54c71131a69077bf0914f6739372d93e4af8 Mon Sep 17 00:00:00 2001 From: Vishal Date: Mon, 18 Apr 2022 13:30:29 -0400 Subject: [PATCH 6/9] All tests passing (Without the Next Mod) --- src/famgraph/graph.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/famgraph/graph.cpp b/src/famgraph/graph.cpp index 0fa94d6..c302ab1 100644 --- a/src/famgraph/graph.cpp +++ b/src/famgraph/graph.cpp @@ -204,9 +204,12 @@ void famgraph::RemoteGraph::Iterator::FillWindow( auto const raddr = this->graph_.adjacency_array_.raddr + start * sizeof(uint32_t); - fam_segments.push_back({raddr, (uint32_t) length}); +fam_segments.push_back({raddr, (uint32_t) (length * sizeof(uint32_t))}); end = end + length; } + + if(end == 0) return; + end -= 1; // 1) sign edge window From 287c95e9c0cd46ed1345443d83c495eb2da6fd90 Mon Sep 17 00:00:00 2001 From: Clang Robot Date: Mon, 18 Apr 2022 17:32:25 +0000 Subject: [PATCH 7/9] :art: Committing clang-format changes --- src/famgraph/graph.cpp | 29 ++++++++++++++--------------- src/famgraph/include/famgraph.hpp | 3 ++- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/famgraph/graph.cpp b/src/famgraph/graph.cpp index c302ab1..66fb0a2 100644 --- a/src/famgraph/graph.cpp +++ b/src/famgraph/graph.cpp @@ -120,7 +120,8 @@ bool famgraph::RemoteGraph::Iterator::HasNext() noexcept famgraph::AdjacencyList famgraph::RemoteGraph::Iterator::Next() noexcept { auto const v = this->current_vertex_++; - if (v >= this->current_window_[this->current_window_.size() - 1].end_exclusive) { + if (v >= this->current_window_[this->current_window_.size() - 1] + .end_exclusive) { this->current_window_ = this->MaximalRange(v); this->FillWindow(this->current_window_); this->cursor = static_cast(this->edge_buffer_.p); @@ -148,19 +149,20 @@ famgraph::RemoteGraph::Iterator::Iterator(std::vector &&ranges, { if (this->HasNext()) { this->current_window_ = this->MaximalRange(this->current_range_->start); - this->FillWindow({this->current_window_}); + this->FillWindow({ this->current_window_ }); this->cursor = static_cast(this->edge_buffer_.p); } } -std::vector famgraph::RemoteGraph::Iterator::MaximalRange( - uint32_t range_start) noexcept +std::vector + famgraph::RemoteGraph::Iterator::MaximalRange(uint32_t range_start) noexcept { std::vector vertex_runs; uint32_t range_end = range_start; auto const edge_capacity = this->edge_buffer_.length / sizeof(uint32_t); uint64_t edges_taken = 0; - while(edges_taken <= edge_capacity && vertex_runs.size() < famgraph::max_outstanding_wr) { + while (edges_taken <= edge_capacity + && vertex_runs.size() < famgraph::max_outstanding_wr) { while (range_end < this->current_range_->end_exclusive) { auto const [start_inclusive, end_exclusive] = @@ -174,8 +176,8 @@ std::vector famgraph::RemoteGraph::Iterator::MaximalRange break; } } - vertex_runs.push_back({range_start, range_end}); - if(this->current_range_ < this->ranges_.cend()) { + vertex_runs.push_back({ range_start, range_end }); + if (this->current_range_ < this->ranges_.cend()) { ++this->current_range_; this->current_vertex_ = this->current_range_->start; } else { @@ -195,7 +197,7 @@ void famgraph::RemoteGraph::Iterator::FillWindow( // Setup FamSegment Vector std::vector fam_segments; - for (auto& range : range_list) { + for (auto &range : range_list) { auto const &start = this->graph_.idx_[range.start].begin; auto const &end_exclusive = this->graph_.idx_[range.end_exclusive - 1].end_exclusive; @@ -204,11 +206,11 @@ void famgraph::RemoteGraph::Iterator::FillWindow( auto const raddr = this->graph_.adjacency_array_.raddr + start * sizeof(uint32_t); -fam_segments.push_back({raddr, (uint32_t) (length * sizeof(uint32_t))}); + fam_segments.push_back({ raddr, (uint32_t)(length * sizeof(uint32_t)) }); end = end + length; } - if(end == 0) return; + if (end == 0) return; end -= 1; @@ -220,11 +222,8 @@ fam_segments.push_back({raddr, (uint32_t) (length * sizeof(uint32_t))}); auto const rkey = this->graph_.adjacency_array_.rkey; auto const lkey = this->graph_.edge_window_.lkey; - this->graph_.fam_control_->Read(this->edge_buffer_.p, - fam_segments, - lkey, - rkey, - this->channel_); + this->graph_.fam_control_->Read( + this->edge_buffer_.p, fam_segments, lkey, rkey, this->channel_); // 3) wait on data while (edges[0] == famgraph::null_vert || edges[end] == famgraph::null_vert) { diff --git a/src/famgraph/include/famgraph.hpp b/src/famgraph/include/famgraph.hpp index d108e60..2eb97db 100644 --- a/src/famgraph/include/famgraph.hpp +++ b/src/famgraph/include/famgraph.hpp @@ -166,7 +166,8 @@ class RemoteGraph uint32_t *cursor; int const channel_; - std::vector MaximalRange(uint32_t range_start) noexcept; + std::vector MaximalRange( + uint32_t range_start) noexcept; void FillWindow(std::vector range_list) noexcept; public: From 0d47f026f4c63e82603132a1fa64d5e7c37942b5 Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 20 Apr 2022 12:23:42 -0400 Subject: [PATCH 8/9] EdgeList Compare Fails --- src/FAM/FAM_rdma.cpp | 3 +-- src/famgraph/graph.cpp | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/FAM/FAM_rdma.cpp b/src/FAM/FAM_rdma.cpp index b402b53..8fe8d37 100644 --- a/src/FAM/FAM_rdma.cpp +++ b/src/FAM/FAM_rdma.cpp @@ -202,8 +202,7 @@ void FAM::FamControl::RdmaServiceImpl::Read(uint64_t laddr, auto id = this->ids[channel].get(); for (unsigned long i = 0; i < segs.size(); ++i) { auto next = i < segs.size() - 1 ? &this->wrs[channel][i + 1].wr : nullptr; - auto const flags = static_cast( - i == segs.size() - 1 ? IBV_SEND_SIGNALED : 0); + auto const flags = static_cast(i == segs.size() - 1 ? IBV_SEND_SIGNALED : 0); auto &WR = this->wrs[channel][i]; auto const [raddr, length] = segs[i]; prep_wr( diff --git a/src/famgraph/graph.cpp b/src/famgraph/graph.cpp index c302ab1..acc0bfa 100644 --- a/src/famgraph/graph.cpp +++ b/src/famgraph/graph.cpp @@ -148,7 +148,7 @@ famgraph::RemoteGraph::Iterator::Iterator(std::vector &&ranges, { if (this->HasNext()) { this->current_window_ = this->MaximalRange(this->current_range_->start); - this->FillWindow({this->current_window_}); + this->FillWindow(this->current_window_); this->cursor = static_cast(this->edge_buffer_.p); } } @@ -160,7 +160,7 @@ std::vector famgraph::RemoteGraph::Iterator::MaximalRange auto const edge_capacity = this->edge_buffer_.length / sizeof(uint32_t); uint64_t edges_taken = 0; - while(edges_taken <= edge_capacity && vertex_runs.size() < famgraph::max_outstanding_wr) { + while(edges_taken < edge_capacity && vertex_runs.size() < famgraph::max_outstanding_wr) { while (range_end < this->current_range_->end_exclusive) { auto const [start_inclusive, end_exclusive] = @@ -175,9 +175,11 @@ std::vector famgraph::RemoteGraph::Iterator::MaximalRange } } vertex_runs.push_back({range_start, range_end}); - if(this->current_range_ < this->ranges_.cend()) { + if(this->current_range_ != this->ranges_.cend()) { ++this->current_range_; this->current_vertex_ = this->current_range_->start; + range_start = this->current_vertex_; + range_end = range_start; } else { break; } @@ -226,6 +228,13 @@ fam_segments.push_back({raddr, (uint32_t) (length * sizeof(uint32_t))}); rkey, this->channel_); +// this->graph_.fam_control_->Read(this->edge_buffer_.p, +// fam_segments[0].raddr, +// fam_segments[0].length, +// lkey, +// rkey, +// this->channel_); + // 3) wait on data while (edges[0] == famgraph::null_vert || edges[end] == famgraph::null_vert) { } From 09f8e08f99bd70a4c9ea2c1451460955b5a990fb Mon Sep 17 00:00:00 2001 From: Clang Robot Date: Wed, 20 Apr 2022 16:47:32 +0000 Subject: [PATCH 9/9] :art: Committing clang-format changes --- src/FAM/FAM_rdma.cpp | 3 ++- src/famgraph/graph.cpp | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/FAM/FAM_rdma.cpp b/src/FAM/FAM_rdma.cpp index 8fe8d37..b402b53 100644 --- a/src/FAM/FAM_rdma.cpp +++ b/src/FAM/FAM_rdma.cpp @@ -202,7 +202,8 @@ void FAM::FamControl::RdmaServiceImpl::Read(uint64_t laddr, auto id = this->ids[channel].get(); for (unsigned long i = 0; i < segs.size(); ++i) { auto next = i < segs.size() - 1 ? &this->wrs[channel][i + 1].wr : nullptr; - auto const flags = static_cast(i == segs.size() - 1 ? IBV_SEND_SIGNALED : 0); + auto const flags = static_cast( + i == segs.size() - 1 ? IBV_SEND_SIGNALED : 0); auto &WR = this->wrs[channel][i]; auto const [raddr, length] = segs[i]; prep_wr( diff --git a/src/famgraph/graph.cpp b/src/famgraph/graph.cpp index d74b828..6833061 100644 --- a/src/famgraph/graph.cpp +++ b/src/famgraph/graph.cpp @@ -161,7 +161,8 @@ std::vector auto const edge_capacity = this->edge_buffer_.length / sizeof(uint32_t); uint64_t edges_taken = 0; - while(edges_taken < edge_capacity && vertex_runs.size() < famgraph::max_outstanding_wr) { + while (edges_taken < edge_capacity + && vertex_runs.size() < famgraph::max_outstanding_wr) { while (range_end < this->current_range_->end_exclusive) { auto const [start_inclusive, end_exclusive] = @@ -175,8 +176,8 @@ std::vector break; } } - vertex_runs.push_back({range_start, range_end}); - if(this->current_range_ != this->ranges_.cend()) { + vertex_runs.push_back({ range_start, range_end }); + if (this->current_range_ != this->ranges_.cend()) { ++this->current_range_; this->current_vertex_ = this->current_range_->start; range_start = this->current_vertex_;