File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,25 +85,25 @@ class ConcurrentTopoQueue
8585
8686 // Determine current min level
8787 minLevel_ = INT_MAX;
88- for (auto & buf : collectBuffer_)
88+ for (const auto & buf : collectBuffer_)
8989 if (minLevel_ > buf.MinLevel )
9090 minLevel_ = buf.MinLevel ;
9191
92+ // For each thread local buffer...
9293 for (auto & buf : collectBuffer_)
9394 {
9495 auto & v = buf.Data ;
9596
9697 // Swap min level nodes to end of v
97- Comp_ comp{ minLevel_ };
98- auto p = std::partition (v.begin (), v.end (), comp);
98+ auto p = std::partition (v.begin (), v.end (), Comp_{ minLevel_ });
9999
100- // Copy them to nextNodes_
100+ // Copy them to global nextNodes_
101101 std::copy (p, v.end (), std::back_inserter (nextNodes_));
102102
103103 // Truncate remaining
104104 v.resize (std::distance (v.begin (), p));
105105
106- // Set new min level
106+ // Calc new min level for this buffer
107107 buf.MinLevel = INT_MAX;
108108 for (const T* x : v)
109109 if (buf.MinLevel > x->Level )
You can’t perform that action at this time.
0 commit comments