Skip to content

Commit 2d15eb9

Browse files
committed
Fixes
1 parent c29b40e commit 2d15eb9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/function/gds/louvain.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ class RunIterationVC : public InMemVertexCompute {
242242
offset_t endCSROffset, vector<weight_t>& intraCommWeights,
243243
unordered_map<offset_t, offset_t>& commToWeightsIndex) const {
244244
weight_t selfLoopWeight = 0;
245-
commToWeightsIndex[state.currComm.get(nodeId, memory_order_relaxed)] =
246-
0; // current community.
245+
auto currComm = state.currComm.get(nodeId, memory_order_relaxed);
246+
commToWeightsIndex[currComm] = 0;
247247
intraCommWeights.push_back(0);
248248
offset_t nextIndex = 1;
249249
for (auto offset = startCSROffset; offset < endCSROffset; offset++) {
@@ -297,7 +297,7 @@ class RunIterationVC : public InMemVertexCompute {
297297
// ((degree_n+degree_{other nodes in c})^2+(degree_{other nodes in d})^2)/(2m)^2
298298
// sumWeightedDegrees after move =
299299
// ((degree_{other nodes in c})^2+(degree_n+degree_{other nodes in d})^2)/(2m)^2
300-
// sumWeightedDegrees after move =
300+
// sumWeightedDegrees diff =
301301
// 2*degree_n*(degree_{other nodes in d}-degree_{other nodes in c})/(2m)^2
302302
auto changeSumWeightedDegrees = 2 * degree * state.modularityConstant *
303303
(newWeightedDegrees - prevWeightedDegrees);
@@ -363,9 +363,6 @@ std::atomic<weight_t> ComputeModularityVC::sumWeightedDegrees{0};
363363

364364
class UpdateCommInfosVC : public InMemVertexCompute {
365365
public:
366-
static std::atomic<weight_t> sumIntra;
367-
static std::atomic<weight_t> sumTotal;
368-
369366
explicit UpdateCommInfosVC(PhaseState& state) : state{state} {}
370367

371368
void vertexCompute(offset_t startOffset, offset_t endOffset) override {

0 commit comments

Comments
 (0)